Compare commits
181 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5fccb67c83 | ||
|
|
75e3f1b200 | ||
|
|
2b92ccc44e | ||
|
|
014fb4be55 | ||
|
|
aef7c608e5 | ||
|
|
e560a86670 | ||
|
|
1d5275b0da | ||
|
|
ef827517ad | ||
|
|
db0eed2f1d | ||
|
|
8ca0468202 | ||
|
|
ae4e9def87 | ||
|
|
be2d37df00 | ||
|
|
a83cfaab25 | ||
|
|
aa261b49ef | ||
|
|
24be79c412 | ||
|
|
8cac042a18 | ||
|
|
a6f2f1ed76 | ||
|
|
5562d74c0b | ||
|
|
e85945947a | ||
|
|
1e51a6e17e | ||
|
|
8ca394459d | ||
|
|
97b51f1567 | ||
|
|
9b098fdcdd | ||
|
|
278bba0cb3 | ||
|
|
d94a93c33f | ||
|
|
84f998afb8 | ||
|
|
d792b2e8e9 | ||
|
|
52ea23a2d8 | ||
|
|
9100d971fb | ||
|
|
af9fd4ee77 | ||
|
|
e1ec21ce12 | ||
|
|
8a33084de9 | ||
|
|
f2687bf860 | ||
|
|
ec54ca5625 | ||
|
|
f79d47d61e | ||
|
|
e6321f3950 | ||
|
|
ea174b2182 | ||
|
|
1ad6c54538 | ||
|
|
7d3eb6e80a | ||
|
|
61f9af1415 | ||
|
|
2395cb9425 | ||
|
|
f5da11c337 | ||
|
|
d61b56c0ce | ||
|
|
9c9ebb0ed1 | ||
|
|
64d013618f | ||
|
|
504cab42bb | ||
|
|
bf726088ad | ||
|
|
4fe70f09bb | ||
|
|
aa8c31d246 | ||
|
|
1271e5f0ac | ||
|
|
afca8f8be9 | ||
|
|
f5ac0dff61 | ||
|
|
959c99fb19 | ||
|
|
8ee161481e | ||
|
|
3c23b6dbe9 | ||
|
|
b4f905e745 | ||
|
|
4c48d9a2a1 | ||
|
|
7379e81277 | ||
|
|
3f1702b34c | ||
|
|
aacf79007e | ||
|
|
180b63db37 | ||
|
|
46cf0c2939 | ||
|
|
69b2254542 | ||
|
|
c9b1fc5f7f | ||
|
|
0024032861 | ||
|
|
b9fb0b7e53 | ||
|
|
38d14e2239 | ||
|
|
b0bf7da8b1 | ||
|
|
3dd2c19c4c | ||
|
|
f0d9ccaf0f | ||
|
|
6021514ab7 | ||
|
|
e6acb80f4d | ||
|
|
bd1b165971 | ||
|
|
4eb2dece2c | ||
|
|
c89156211b | ||
|
|
fcefe89f17 | ||
|
|
1d68d0e6e3 | ||
|
|
5a49ccb7b3 | ||
|
|
c16309f670 | ||
|
|
cedea781a1 | ||
|
|
d8ff8aa41e | ||
|
|
3c4ec3a0c1 | ||
|
|
dcf3bb360a | ||
|
|
c42002db8f | ||
|
|
e0726590ab | ||
|
|
4baab48716 | ||
|
|
b9791be5e3 | ||
|
|
1714e8705e | ||
|
|
0cf53a6997 | ||
|
|
7c4fdb80a7 | ||
|
|
888aa6fc45 | ||
|
|
5a298f6ee1 | ||
|
|
80f48331df | ||
|
|
746e20f2f0 | ||
|
|
1c15d6578c | ||
|
|
ba85bb496d | ||
|
|
609b78dda3 | ||
|
|
4c7449ce54 | ||
|
|
ad3e86b146 | ||
|
|
b2b7985f7e | ||
|
|
b632db96b1 | ||
|
|
e9fbafca18 | ||
|
|
16b01504a6 | ||
|
|
c8a4fb25d3 | ||
|
|
7da91d7293 | ||
|
|
9fa4159ae0 | ||
|
|
73f29a5e72 | ||
|
|
3937febb46 | ||
|
|
4b5dc7ecf1 | ||
|
|
00f13403f5 | ||
|
|
9ccc7ce602 | ||
|
|
ca5cf261f3 | ||
|
|
4cc7185090 | ||
|
|
0d172707aa | ||
|
|
1313aeab4b | ||
|
|
a2d85aa0a5 | ||
|
|
dbd43e9809 | ||
|
|
141ea497f6 | ||
|
|
291146779d | ||
|
|
098ef8f69d | ||
|
|
d27138e086 | ||
|
|
bb288bd5b0 | ||
|
|
0cdc513cb8 | ||
|
|
5ae04a98ca | ||
|
|
7b4197a2cd | ||
|
|
37c3588348 | ||
|
|
3b7ef36212 | ||
|
|
fe88b2774d | ||
|
|
44ce41d9db | ||
|
|
1065dbe714 | ||
|
|
dcbefb6daa | ||
|
|
4d1a3f08d7 | ||
|
|
2b5f8a751a | ||
|
|
6df2ee9757 | ||
|
|
813589bfdc | ||
|
|
51a1c514ae | ||
|
|
c881d1c01c | ||
|
|
93a7c7c642 | ||
|
|
bada1dcecb | ||
|
|
e080f9f7d0 | ||
|
|
fea04ae118 | ||
|
|
fade1f95d2 | ||
|
|
ccb7347e54 | ||
|
|
6ab5abae09 | ||
|
|
00f7005bce | ||
|
|
219761c512 | ||
|
|
cd363ca4b9 | ||
|
|
fda33df813 | ||
|
|
ee1c23e34f | ||
|
|
22db1baac7 | ||
|
|
2981e634d2 | ||
|
|
5e8d0aca42 | ||
|
|
9e0caa54c2 | ||
|
|
5c4f60d4fd | ||
|
|
669fb26114 | ||
|
|
d655d8f8bd | ||
|
|
027a76f2ab | ||
|
|
d765dc9ec2 | ||
|
|
63aebf738a | ||
|
|
116ba0d2e3 | ||
|
|
34460eb9e7 | ||
|
|
1d68495f57 | ||
|
|
fee97bed40 | ||
|
|
c797aec7f7 | ||
|
|
b68358f6b2 | ||
|
|
9109c69fc3 | ||
|
|
d56dbd1659 | ||
|
|
8b8c1460eb | ||
|
|
f1a1247a43 | ||
|
|
54fcfe9f2b | ||
|
|
dfd91d9632 | ||
|
|
dc027e89c4 | ||
|
|
9617b233b0 | ||
|
|
7b2458ac8a | ||
|
|
02d97d7eba | ||
|
|
28c4a6144a | ||
|
|
e2e426493f | ||
|
|
f9f205f1d5 | ||
|
|
d070facc13 | ||
|
|
be0c84aa28 | ||
|
|
091effc92c |
7
.github/workflows/api_doc.yml
vendored
@@ -6,7 +6,8 @@ on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
branches:
|
||||
- develop
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -36,13 +37,13 @@ jobs:
|
||||
uses: actions/configure-pages@v4
|
||||
- name: Build docs
|
||||
run: |
|
||||
npm install -g jsdoc
|
||||
npm install
|
||||
npm run doc
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
# Upload entire repository
|
||||
path: './doc'
|
||||
path: './docs'
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
16
.github/workflows/codemeta_validator.yml
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
name: test_codemeta
|
||||
|
||||
on:
|
||||
release:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: gitlab-registry.in2p3.fr/escape2020/wp3/eossr:v1.0
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: validate codemeta
|
||||
run: eossr-metadata-validator codemeta.json
|
||||
2
.github/workflows/npm-publish.yml
vendored
@@ -24,8 +24,6 @@ jobs:
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
source "$HOME/.cargo/env"
|
||||
rustup default nightly
|
||||
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||
- name: "Install wasm-pack"
|
||||
run: |
|
||||
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y
|
||||
|
||||
7
.github/workflows/test.yml
vendored
@@ -22,8 +22,6 @@ jobs:
|
||||
run: |
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
source "$HOME/.cargo/env"
|
||||
rustup default nightly
|
||||
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||
- name: "Install wasm-pack"
|
||||
run: |
|
||||
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y
|
||||
@@ -32,8 +30,7 @@ jobs:
|
||||
npm install
|
||||
- name: "Build Aladin Lite"
|
||||
run: |
|
||||
npm run build
|
||||
- name: "Run some tests"
|
||||
npm run build:dbg
|
||||
- name: "Run the rust tests"
|
||||
run: |
|
||||
npm run test:build
|
||||
npm run test:unit
|
||||
52
CHANGELOG.md
@@ -1,5 +1,55 @@
|
||||
# Changelogs
|
||||
|
||||
## 3.5.1-beta
|
||||
|
||||
* [feat] Add support for name removing in `removeOverlay` method
|
||||
* [test] Add support of playwright. Instructions in the readme for running the test matching snapshots [PR #176]
|
||||
* [fix] Order of overlays in the stack now matches the addMOC/addCatalog/addOverlay calls ordering
|
||||
* [doc] Expose the API of Coo class
|
||||
* [fix] Insert aladin css inside the aladin lite so that it should be compliant with the use of shadow DOMs [cds-astro/ipyaladin#113], [marimo-team/marimo#2106]
|
||||
* [feat] Add possibility of giving a local JS FileList to load a locally-stored HiPS without starting an HTTP server [cds-astro/aladin-lite#103]
|
||||
* [fix] removeOverlayByName
|
||||
|
||||
## 3.5.0-beta
|
||||
|
||||
* [enhancement] add `options.colnames` to A.catalogFromVizieR to tell VizieR we want absolutely want to retrieve specific columns
|
||||
* [feat] provide a new drawAxes option to A.ellipse. This is useful for plotting error ellipsis.
|
||||
|
||||
## 3.4.5-beta
|
||||
|
||||
* [feat] add `layerChanged` event when a layer is added or removed
|
||||
* [deprecate] of `select` event, use `objectsSelected` event instead
|
||||
* [ui] add the ability to switch the tile format to download
|
||||
|
||||
## 3.4.3-beta
|
||||
|
||||
* [bugfix] zoom control buttons
|
||||
* [feat] save a MOC as a JSON file from the UI <https://github.com/cds-astro/aladin-lite/issues/154>
|
||||
* [feat] save a source selection from the measurement table as a CSV file
|
||||
* [feat] allow to display jpeg/jpg images with a wcs passed as a JS dictionary: <https://github.com/cds-astro/aladin-lite/issues/173>
|
||||
|
||||
## 3.4.2-beta
|
||||
|
||||
* [impr] Improve smartphone support by setting media queries + a better logic for deploying the contextual menu sub options.
|
||||
* [impr] Improve `WCS` view export with 3rd euler rotation encoding: <https://github.com/cds-astro/aladin-lite/issues/170>. Still some cases are to be handled like: crval on the equator or cylindrical with a galactic frame rotation.
|
||||
* [fixed] Change `RADECSYS` to `RADESYS` for `Aladin#getViewWCS` to follow fits standard deprecation
|
||||
* [feat] Add new method `Aladin#getViewImageBuffer` to get the current view as a PNG buffer
|
||||
* [feat] New line rasterizer using GL instancing. This enhances the rendering speed of MOCs.
|
||||
|
||||
## 3.3.3
|
||||
|
||||
* [feat] UI: add HiPS basic filter that filters the `hipsList` given
|
||||
* [feat] New `hipsList` option parameter when instancing a new Aladin object.
|
||||
* [feat] Zoom smoothing using hermite cubic interpolation functions
|
||||
* [feat] shape option of Catalog and ProgressiveCat accepts a function returning a Footprint. This allow user to
|
||||
associate a footprint to a specific source
|
||||
* [feat] Hover color support by @pmatsson and @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/145>
|
||||
|
||||
## 3.3.2
|
||||
|
||||
* [fixed] do not allow to query the properties several times for an imageHiPS
|
||||
* [fixed] Detecting raytracing rendering mode. Adapt the rendering mode in function of the fov value and the projection used. Some projections do have more distortions with wide FoVs so it is better to use the raytracing rendering mode when fov >= smaller FoV threshold.
|
||||
|
||||
## 3.3.0
|
||||
|
||||
* [fixed] multiple calls to setImageSurvey with the same survey object led to strange behaviour.
|
||||
@@ -339,4 +389,4 @@ New in the API:
|
||||
### Fin 2013
|
||||
|
||||
* ajout catalogue progressif
|
||||
* ajout on select, objectClicked, objectHovered
|
||||
* ajout on select, objectClicked, objectHovered
|
||||
|
||||
177
README.md
@@ -1,4 +1,4 @@
|
||||
# Aladin Lite v3
|
||||
# [Aladin Lite](https://aladin.u-strasbg.fr/AladinLite)
|
||||
|
||||
**An astronomical HiPS visualizer in the browser** <img src="aladin-logo.png" alt="Aladin Lite logo" width="220">
|
||||
|
||||
@@ -9,22 +9,42 @@ See [A&A 578, A114 (2015)](https://arxiv.org/abs/1505.02291) and [IVOA HiPS Reco
|
||||
Aladin Lite is built to be easily embeddable in any web page. It powers astronomical portals like [ESASky](https://sky.esa.int/), [ESO Science Archive portal](http://archive.eso.org/scienceportal/) and [ALMA Portal](https://almascience.eso.org/asax/).
|
||||
|
||||
More details on [Aladin Lite documentation page](http://aladin.u-strasbg.fr/AladinLite/doc/).
|
||||
A new [API technical documentation](https://cds-astro.github.io/aladin-lite/) is now available.
|
||||
|
||||
[](https://github.com/cds-astro/aladin-lite/actions/workflows/test.yml)
|
||||
[](https://cds-astro.github.io/aladin-lite)
|
||||
[](https://cds-astro.github.io/aladin-lite)
|
||||
[](https://aladin.cds.unistra.fr/AladinLite/doc/release/)
|
||||
|
||||
# How to test it ?
|
||||
Aladin Lite is available [at this link](https://aladin.u-strasbg.fr/AladinLite).
|
||||
|
||||
Aladin Lite v3 is out! Please play with [Aladin Lite v3 at this link](https://aladin.u-strasbg.fr/AladinLite).
|
||||
## Running & editable JS examples
|
||||
|
||||
<!-- Examples -->
|
||||
<table><tbody>
|
||||
<tr><td>Basic Aladin Lite setup</td><td>Load SIMBAD & NED catalog data</td><td>Load a FITS image</td></tr>
|
||||
<tr><td align="left"><a href="https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/AL-in-responsive-div/"><img height="200" src="https://github.com/cds-astro/aladin-lite/blob/develop/assets/vignettes/Basic%20Aladin%20Lite%20instanciation.png?raw=true"></img></a></td>
|
||||
<td align="center"><a href="https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/easy-access-simbad-ned/"><img height="200" src="https://github.com/cds-astro/aladin-lite/blob/develop/assets/vignettes/Load%20SIMBAD%20&%20NED%20catalogs%20data.png?raw=true"></img></a></td>
|
||||
<td align="right"><a href="https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/load-FITS-image-URL/"><img height="200" src="https://github.com/cds-astro/aladin-lite/blob/develop/assets/vignettes/Load%20a%20FITS%20image.png?raw=true"></img></a></td></tr><tr>
|
||||
<td>American Astronomical Society 225<br/>example</td><td>Display proper motion vectors</td><td>Visualization of Mars</td></tr><tr>
|
||||
<td align="left"><a href="https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/AAS225/"><img height="200" src="https://github.com/cds-astro/aladin-lite/blob/develop/assets/vignettes/American%20Astronomical%20Society%20225%20demonstration.png?raw=true"></img></a></td>
|
||||
<td align="center"><a href="https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/show-proper-motions/"><img height="200" src="https://github.com/cds-astro/aladin-lite/blob/develop/assets/vignettes/Display%20proper%20motions.png?raw=true"></img></a></td>
|
||||
<td align="right"><a href="https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/mars-visualisation/"><img height="200" src="https://github.com/cds-astro/aladin-lite/blob/develop/assets/vignettes/Visualization%20of%20Mars.png?raw=true"></img></a></td></tr></tbody></table>
|
||||
<!-- Examples -->
|
||||
|
||||
## Releases
|
||||
|
||||
For integrating Aladin Lite into your personal website, please refer to this [release page](https://aladin.cds.unistra.fr/AladinLite/doc/release/).
|
||||
Always prefer using the latest version. If you want the new features without minding about the bugs coming with it, then the beta is the good way to go.
|
||||
A [release page](https://aladin.cds.unistra.fr/AladinLite/doc/release/) keeps track of all the current and previous builds.
|
||||
A ``release`` and ``beta`` versions, regularly updated are available. The ``beta`` version is usually more advanced than the ``release`` one but features more error prone and not production-ready code.
|
||||
|
||||
## API documentation
|
||||
> [!TIP]
|
||||
> If you are working on a project that uses Aladin Lite, prefer working with a fixed version. Every build is tagged with a version number and accessible with:
|
||||
>
|
||||
> ```https://aladin.cds.unistra.fr/AladinLite/api/v3/<version>/aladin.js```
|
||||
|
||||
There is a new in progress API documentation at [this link](https://cds-astro.github.io/aladin-lite).
|
||||
## Documentation
|
||||
|
||||
There is a new API documentation available [here](https://cds-astro.github.io/aladin-lite).
|
||||
Editable examples showing the API can also be found [here](https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/).
|
||||
|
||||
## Embed it into your projects
|
||||
|
||||
@@ -34,7 +54,7 @@ You can embed Aladin Lite it into your webpages in two ways
|
||||
|
||||
Please include [the javascript script of Aladin Lite v3](https://aladin.cds.unistra.fr/AladinLite/api/v3/latest/aladin.js) into your project. API differences from the v2 are minimal, here is a snippet of code you can use to embed it into your webpages:
|
||||
|
||||
```js
|
||||
```html
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
@@ -57,60 +77,37 @@ Please include [the javascript script of Aladin Lite v3](https://aladin.cds.unis
|
||||
</html>
|
||||
```
|
||||
|
||||
### Using the aladin lite NPM package
|
||||
### NPM deployment
|
||||
|
||||
First, install it with npm:
|
||||
A [NPM package](https://www.npmjs.com/package/aladin-lite) is deployed and maintained. It is used by [ipyaladin](https://github.com/cds-astro/ipyaladin), a jupyter widget allowing to run aladin lite in a notebook.
|
||||
|
||||
```npm i aladin-lite```
|
||||
|
||||
Second, you can use it that way:
|
||||
|
||||
```js
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<!-- Mandatory when setting up Aladin Lite v3 for a smartphones/tablet usage -->
|
||||
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
||||
Aladin Lite can be imported with:
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import A from 'aladin-lite';
|
||||
|
||||
A.init.then(() => {
|
||||
let aladin = A.aladin('#aladin-lite-div', {fov: 360, projection: "AIT", cooFrame: 'equatorial', showCooGridControl: true, showSimbadPointerControl: true, showCooGrid: true});
|
||||
});
|
||||
// your code...
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
## Goals of v3
|
||||
## New features
|
||||
|
||||
- Rust/WebGL new core integration
|
||||
|
||||
- Remove jQuery dep
|
||||
|
||||
- UI dev, better support for smartphones
|
||||
|
||||
- FITS images support
|
||||
|
||||
- easy sharing of current « view »
|
||||
|
||||
- support of all VOTable serializations (using votable.js?)
|
||||
|
||||
- support of FITS tables?
|
||||
|
||||
- creating HiPS instance from an URL
|
||||
|
||||
- multiple mirrors handling for HiPS tile retrival
|
||||
|
||||
## Source code
|
||||
|
||||
Source code is available in the ``src`` directory.
|
||||
* [X] Rust/WebGL2 new rendering engine
|
||||
* [X] Remove jQuery dep
|
||||
* [ ] UI dev, better support for smartphones
|
||||
* [X] FITS images support
|
||||
* [X] WCS parsing, displaying an (JPEG/PNG) image in aladin lite view
|
||||
* [X] Display customized shapes (e.g. proper motions) from astronomical catalog data
|
||||
* [X] AVM tags parsing support
|
||||
* [X] Easy sharing of current « view »
|
||||
* [ ] All VOTable serializations
|
||||
* [ ] FITS tables
|
||||
* [X] Creating HiPS instance from an URL
|
||||
* [X] Local HiPS loading
|
||||
* [X] Multiple mirrors handling for HiPS tile retrival
|
||||
* [ ] HiPS cube
|
||||
|
||||
## Licence
|
||||
|
||||
@@ -118,7 +115,7 @@ Aladin Lite is currently licensed under GPL v3.0
|
||||
|
||||
If you think this license might prevent you from using Aladin Lite in your pages/application/portal, please open an issue or [contact us](mailto:cds-question@unistra.fr)
|
||||
|
||||
## Contributing
|
||||
## Contribution guidelines
|
||||
|
||||
There are several ways to contribute to Aladin Lite:
|
||||
|
||||
@@ -129,12 +126,12 @@ There are several ways to contribute to Aladin Lite:
|
||||
- **develop new features/provide code fixing bugs**. As open development is a new thing for us, we will in a first time only take into consideration code contribution (_i.e._ Pull Requests) from our close partners.
|
||||
In any case, please get in touch before starting a major update or rewrite.
|
||||
|
||||
### Building the application steps
|
||||
### Building steps
|
||||
|
||||
First you need to install the dependencies from the package.json
|
||||
Please run:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
@@ -145,51 +142,73 @@ You will also need [wasm-pack](https://rustwasm.github.io/wasm-pack/), a tool he
|
||||
|
||||
Once it's installed you will need to switch to the nightly rust version:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
rustup default nightly
|
||||
```
|
||||
|
||||
Then you can build the project:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm run build
|
||||
```
|
||||
|
||||
:warning: **If you are experimenting rust error compilations**:
|
||||
> [!WARNING]
|
||||
> **If you are experimenting Rust compiling issues:**
|
||||
> - Make sure you have your **wasm-pack** version updated. To do so:
|
||||
> ```sh
|
||||
> cargo install wasm-pack --version ~0.12
|
||||
> ```
|
||||
> - Make sure you are using the rust **nightly** toolchain
|
||||
> ```sh
|
||||
> rustup default nightly
|
||||
> ```
|
||||
> - Remove your `src/core/Cargo.lock` file and `src/core/target` directory -- this ensures that you'd escape any bad compilation state:
|
||||
> ```sh
|
||||
> git clean -di
|
||||
> ```
|
||||
> - then recompile with `npm run build`.
|
||||
|
||||
- Make sure you have your **wasm-pack** version updated. To do so:
|
||||
It will generate the aladin lite compiled code into a `dist/` directory located at the root of the repository. This directory contains two javascript files. `aladin.umd.cjs` follows the UMD module export convention and it is the one you need to use for your project.
|
||||
|
||||
```bash
|
||||
cargo install wasm-pack --version ~0.12
|
||||
```
|
||||
### Testing guidelines
|
||||
|
||||
- Make sure you are using the rust **nightly** toolchain
|
||||
- Remove your `src/core/Cargo.lock` file and `src/core/target` directory -- this ensures that you'd escape any bad compilation state:
|
||||
#### Run the examples
|
||||
|
||||
```bash
|
||||
git clean -di
|
||||
```
|
||||
|
||||
- then recompile with `npm run build`.
|
||||
A bunch of examples are located into the `examples` directory.
|
||||
To run them, start a localhost server:
|
||||
|
||||
It will generate the aladin lite compiled code into a `dist/` directory located at the root of the repository. This directory contains two javascript files. `aladin.umd.cjs` follows the UMD module export convention and it is the one you can use for your project.
|
||||
|
||||
To run the examples, you can start a localhost server with the following command:
|
||||
|
||||
```bash
|
||||
```sh
|
||||
npm run serve
|
||||
```
|
||||
|
||||
For just compiling the rust core, from the root location do:
|
||||
#### Rust tests
|
||||
|
||||
```bash
|
||||
These can be executed separately from the JS part:
|
||||
|
||||
* Compile the Rust code:
|
||||
|
||||
```sh
|
||||
cd src/core
|
||||
cargo check --features webgl2
|
||||
```
|
||||
|
||||
and run the tests:
|
||||
* Run the tests:
|
||||
|
||||
```bash
|
||||
cd src/core
|
||||
```sh
|
||||
cargo test --features webgl2
|
||||
```
|
||||
|
||||
#### Snapshot comparisons
|
||||
|
||||
We use [playwright](https://playwright.dev/) for snapshot comparison testing. Only ground truth snapshots have been generated for MacOS/Darwin architecture.
|
||||
First install playwright:
|
||||
|
||||
```sh
|
||||
npx playwright install
|
||||
```
|
||||
|
||||
Run the tests, advises are given for opening the UI mode or for generating your own ground truth snapshots.
|
||||
|
||||
```sh
|
||||
npm run test:playwright
|
||||
```
|
||||
|
||||
5
assets/icons/add.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11 8C11 7.44772 11.4477 7 12 7C12.5523 7 13 7.44771 13 8V11H16C16.5523 11 17 11.4477 17 12C17 12.5523 16.5523 13 16 13H13V16C13 16.5523 12.5523 17 12 17C11.4477 17 11 16.5523 11 16V13H8C7.44772 13 7 12.5523 7 12C7 11.4477 7.44771 11 8 11H11V8Z" fill="#0F0F0F"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M23 4C23 2.34315 21.6569 1 20 1H4C2.34315 1 1 2.34315 1 4V20C1 21.6569 2.34315 23 4 23H20C21.6569 23 23 21.6569 23 20V4ZM21 4C21 3.44772 20.5523 3 20 3H4C3.44772 3 3 3.44772 3 4V20C3 20.5523 3.44772 21 4 21H20C20.5523 21 21 20.5523 21 20V4Z" fill="#0F0F0F"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 811 B |
4
assets/icons/download.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M17 17H17.01M17.4 14H18C18.9319 14 19.3978 14 19.7654 14.1522C20.2554 14.3552 20.6448 14.7446 20.8478 15.2346C21 15.6022 21 16.0681 21 17C21 17.9319 21 18.3978 20.8478 18.7654C20.6448 19.2554 20.2554 19.6448 19.7654 19.8478C19.3978 20 18.9319 20 18 20H6C5.06812 20 4.60218 20 4.23463 19.8478C3.74458 19.6448 3.35523 19.2554 3.15224 18.7654C3 18.3978 3 17.9319 3 17C3 16.0681 3 15.6022 3.15224 15.2346C3.35523 14.7446 3.74458 14.3552 4.23463 14.1522C4.60218 14 5.06812 14 6 14H6.6M12 15V4M12 15L9 12M12 15L15 12" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 834 B |
4
assets/icons/filter-off.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15 15L21 21M21 15L15 21M10 21V14.6627C10 14.4182 10 14.2959 9.97237 14.1808C9.94787 14.0787 9.90747 13.9812 9.85264 13.8917C9.7908 13.7908 9.70432 13.7043 9.53137 13.5314L3.46863 7.46863C3.29568 7.29568 3.2092 7.2092 3.14736 7.10828C3.09253 7.01881 3.05213 6.92127 3.02763 6.81923C3 6.70414 3 6.58185 3 6.33726V4.6C3 4.03995 3 3.75992 3.10899 3.54601C3.20487 3.35785 3.35785 3.20487 3.54601 3.10899C3.75992 3 4.03995 3 4.6 3H19.4C19.9601 3 20.2401 3 20.454 3.10899C20.6422 3.20487 20.7951 3.35785 20.891 3.54601C21 3.75992 21 4.03995 21 4.6V6.33726C21 6.58185 21 6.70414 20.9724 6.81923C20.9479 6.92127 20.9075 7.01881 20.8526 7.10828C20.7908 7.2092 20.7043 7.29568 20.5314 7.46863L17 11" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1012 B |
4
assets/icons/filter-on.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3 4.6C3 4.03995 3 3.75992 3.10899 3.54601C3.20487 3.35785 3.35785 3.20487 3.54601 3.10899C3.75992 3 4.03995 3 4.6 3H19.4C19.9601 3 20.2401 3 20.454 3.10899C20.6422 3.20487 20.7951 3.35785 20.891 3.54601C21 3.75992 21 4.03995 21 4.6V6.33726C21 6.58185 21 6.70414 20.9724 6.81923C20.9479 6.92127 20.9075 7.01881 20.8526 7.10828C20.7908 7.2092 20.7043 7.29568 20.5314 7.46863L14.4686 13.5314C14.2957 13.7043 14.2092 13.7908 14.1474 13.8917C14.0925 13.9812 14.0521 14.0787 14.0276 14.1808C14 14.2959 14 14.4182 14 14.6627V17L10 21V14.6627C10 14.4182 10 14.2959 9.97237 14.1808C9.94787 14.0787 9.90747 13.9812 9.85264 13.8917C9.7908 13.7908 9.70432 13.7043 9.53137 13.5314L3.46863 7.46863C3.29568 7.29568 3.2092 7.2092 3.14736 7.10828C3.09253 7.01881 3.05213 6.92127 3.02763 6.81923C3 6.70414 3 6.58185 3 6.33726V4.6Z" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
2
assets/icons/hips.svg
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 3.078a12.674 12.674 0 0 0-4.52-.878c-3.847 0-3.891 1.6-7.74 1.6a15.028 15.028 0 0 1-4.52-.722L1 20.783A13.093 13.093 0 0 0 6.424 21.8c5.242 0 6.792-1.634 12.034-1.634a13.093 13.093 0 0 1 5.423 1.017zM6.425 20.8a13.724 13.724 0 0 1-4.3-.65l1.063-6.173 7.9 6.296a20.11 20.11 0 0 1-4.663.527zm-1.909-6.973l3.272-2.607 3.258 2.597-3.271 2.607zm4.199 3.346l3.271-2.607 3.286 2.618L12 19.791zm4.211-3.356l3.273-2.608 3.285 2.618-3.272 2.608zm.737 5.859L21 13.828 16.197 10l-4.213 3.357-4.196-3.345-4.54 3.619 1.6-9.288A16.193 16.193 0 0 0 8.57 4.8a9.957 9.957 0 0 0 2.888-.38L7.5 7.5l4.484 3.5L16.5 7.5l-4.286-3.334c.21-.08.413-.161.607-.241a7.791 7.791 0 0 1 3.49-.725 11.86 11.86 0 0 1 3.63.615l2.674 15.872a16.248 16.248 0 0 0-4.157-.52 21.93 21.93 0 0 0-4.796.509zM12 5.156L15.01 7.5l-3.024 2.344-3-2.342z"/><path opacity=".5" d="M4.512 13.827l3.272-2.607 3.258 2.597-3.271 2.607-3.259-2.597z"/><path opacity=".25" d="M12.923 13.818l3.272-2.608 3.286 2.619-3.273 2.608-3.285-2.619z"/><path fill="none" d="M0 0h24v24H0z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 60 KiB |
BIN
assets/vignettes/Basic Aladin Lite instanciation.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
assets/vignettes/Display proper motions.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
assets/vignettes/Load SIMBAD & NED catalogs data.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
assets/vignettes/Load a FITS image.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
assets/vignettes/Visualization of Mars.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
83
codemeta.json
Normal file
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
|
||||
"@type": "SoftwareSourceCode",
|
||||
"license": "https://spdx.org/licenses/GPL-3.0",
|
||||
"codeRepository": "https://github.com/cds-astro/aladin-lite",
|
||||
"dateCreated": "2013-05-01",
|
||||
"datePublished": "2013-05-01",
|
||||
"dateModified": "2023-01-31",
|
||||
"issueTracker": "https://github.com/cds-astro/aladin-lite/issues",
|
||||
"name": "Aladin Lite",
|
||||
"version": "3.6.0-beta",
|
||||
"softwareVersion": "3.6.0-beta",
|
||||
"description": "An astronomical HiPS visualizer in the browser.",
|
||||
"identifier": "10.5281/zenodo.7638833",
|
||||
"applicationCategory": "Astronomy, Visualization",
|
||||
"funding": "ESCAPE 824064",
|
||||
"referencePublication": "http://aspbooks.org/publications/532/007.pdf",
|
||||
"readme": "https://aladin.cds.unistra.fr/AladinLite/doc/",
|
||||
"releaseNotes": "https://aladin.cds.unistra.fr/AladinLite/doc/#release-notes",
|
||||
"funder": {
|
||||
"@type": "Organization",
|
||||
"name": "European Commission Framework Programme Horizon 2020 Research and Innovation action"
|
||||
},
|
||||
"keywords": [
|
||||
"IVOA",
|
||||
"Astronomy"
|
||||
],
|
||||
"programmingLanguage": [
|
||||
"Rust",
|
||||
"Javascript"
|
||||
],
|
||||
"relatedLink": [
|
||||
"https://aladin.cds.unistra.fr/"
|
||||
],
|
||||
"author": [
|
||||
{
|
||||
"@type": "Person",
|
||||
"@id": "https://orcid.org/0000-0002-7123-773X",
|
||||
"givenName": "Matthieu",
|
||||
"familyName": "Baumann",
|
||||
"email": "matthieu.baumann@unistra.fr",
|
||||
"affiliation": {
|
||||
"@type": "Organization",
|
||||
"name": "Universit\u00e9 de Strasbourg, CNRS, Observatoire astronomique de Strasbourg, UMR 7550, F-67000 Strasbourg, France"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Person",
|
||||
"@id": "https://orcid.org/0000-0001-5818-2781",
|
||||
"givenName": "Thomas",
|
||||
"familyName": "Boch",
|
||||
"email": "thomas.boch@astro.unistra.fr",
|
||||
"affiliation": {
|
||||
"@type": "Organization",
|
||||
"name": "Universit\u00e9 de Strasbourg, CNRS, Observatoire astronomique de Strasbourg, UMR 7550, F-67000 Strasbourg, France"
|
||||
}
|
||||
}
|
||||
],
|
||||
"maintainer": [
|
||||
{
|
||||
"@type": "Person",
|
||||
"@id": "https://orcid.org/0000-0002-7123-773X",
|
||||
"givenName": "Matthieu",
|
||||
"familyName": "Baumann",
|
||||
"email": "matthieu.baumann@unistra.fr",
|
||||
"affiliation": {
|
||||
"@type": "Organization",
|
||||
"name": "Universit\u00e9 de Strasbourg, CNRS, Observatoire astronomique de Strasbourg, UMR 7550, F-67000 Strasbourg, France"
|
||||
}
|
||||
},
|
||||
{
|
||||
"@type": "Person",
|
||||
"@id": "https://orcid.org/0000-0001-5818-2781",
|
||||
"givenName": "Thomas",
|
||||
"familyName": "Boch",
|
||||
"email": "thomas.boch@astro.unistra.fr",
|
||||
"affiliation": {
|
||||
"@type": "Organization",
|
||||
"name": "Universit\u00e9 de Strasbourg, CNRS, Observatoire astronomique de Strasbourg, UMR 7550, F-67000 Strasbourg, France"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -9,16 +9,16 @@
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', { fov:0.15, target: 'Arp 240', showReticle: false, fullScreen: true });
|
||||
aladin.setBaseImageLayer(aladin.newImageSurvey('P/SDSS9/g', {colormap: "rainbow", stretch: "Linear"}));
|
||||
aladin.setBaseImageLayer(aladin.newImageSurvey('P/SDSS9/g', {colormap: "eosb", stretch: "linear"}));
|
||||
|
||||
var simbad = A.catalog({name: 'Simbad', sourceSize: 16, color: '#4050F0'});
|
||||
aladin.addCatalog(simbad);
|
||||
simbad.addSources([A.marker(204.97010833333336, 0.8400166666666667, {popupTitle: 'NGC 5257', popupDesc: '<em>Object type:</em> HII galaxy<br/><em>Morphological type:</em> Sbc<br/><br/>More info <a href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=NGC+5257">in Simbad</a>'}), A.marker(204.9903125, 0.8309694444444445, {popupTitle: 'NGC 5258', popupDesc: '<em>Object type:</em> Galaxy in Pair of Galaxies <br/><em>Morphological type:</em> Sb<br/><br/>More info <a href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=NGC+5258">in Simbad</a>'})]);
|
||||
|
||||
var overlay = A.graphicOverlay({color: '#aa2222', lineWidth: 4});
|
||||
overlay.addFootprints(A.polygon([[204.970214, 0.81206], [204.97110047, 0.80993368], [204.978723, 0.79165], [204.999152, 0.800162], [204.99482125, 0.81055582], [205.002941, 0.813851], [204.99986816, 0.82141125], [205.010312, 0.825578], [205.002112, 0.846123], [204.981546, 0.837916], [204.98157771, 0.83783654], [204.962977, 0.830202], [204.9703941, 0.81213504]]));
|
||||
|
||||
aladin.addOverlay(overlay);
|
||||
overlay.addFootprints(A.polygon([[204.970214, 0.81206], [204.97110047, 0.80993368], [204.978723, 0.79165], [204.999152, 0.800162], [204.99482125, 0.81055582], [205.002941, 0.813851], [204.99986816, 0.82141125], [205.010312, 0.825578], [205.002112, 0.846123], [204.981546, 0.837916], [204.98157771, 0.83783654], [204.962977, 0.830202], [204.9703941, 0.81213504]]));
|
||||
|
||||
aladin.displayJPG('http://images.ipac.caltech.edu/esahubble/heic0810at/esahubble_heic0810at_1600.jpg');
|
||||
});
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: ["P/PanSTARRS/DR1/color-i-r-g"], showReticle: false, gridOptions: {opacity: 0.5, color: 'rgba(255, 0, 0)'}, projection: "AIT", cooFrame: 'icrs', target: "stephan's quintet", fov: 1000, showGotoControl: false, showFrame: false, fullScreen: true, showLayersControl: true, showCooGrid: true, showCooGridControl: false});
|
||||
let startFov = 1000;
|
||||
aladin = A.aladin('#aladin-lite-div', {showSettingsControl: true, survey: "P/PanSTARRS/DR1/color-z-zg-g", showReticle: false, projection: "AIT", cooFrame: 'icrs', target: "stephan's quintet", fov: startFov, showGotoControl: false, showFrame: false, fullScreen: true, showLayersControl: true, showCooGridControl: false});
|
||||
|
||||
const chft = aladin.createImageSurvey('CFHT', "CFHT deep view of NGC7331 and Stephan's quintet u+g+r", "https://cds.unistra.fr/~derriere/PR_HiPS/2022_Duc/", null, null, {imgFormat: 'png'});
|
||||
const nircamJWST = aladin.createImageSurvey('Nircam', "Stephans Quintet NIRCam+MIRI", "http://alasky.cds.unistra.fr/JWST/CDS_P_JWST_Stephans-Quintet_NIRCam+MIRI/", null, null, {imgFormat: 'png', colormap: "viridis"});
|
||||
@@ -21,7 +22,7 @@
|
||||
aladin.getOverlayImageLayer("CFHT").toggle();
|
||||
aladin.getOverlayImageLayer("Nircam").toggle();
|
||||
|
||||
let fov = 360;
|
||||
let fov = startFov;
|
||||
let rotation = 0;
|
||||
|
||||
setInterval(function zoom() {
|
||||
@@ -29,7 +30,7 @@
|
||||
fov *= 0.997;
|
||||
rotation += 0.07;
|
||||
|
||||
aladin.setRotation(rotation)
|
||||
aladin.setViewCenter2NorthPoleAngle(rotation)
|
||||
aladin.setFoV(fov);
|
||||
|
||||
if (fov < 3 && fov > 0.5) {
|
||||
|
||||
@@ -14,11 +14,11 @@ A.init.then(() => {
|
||||
hscGreenSurvey.setColormap("green", { stretch: "asinh" });
|
||||
hscGreenSurvey.setCuts(-0.2186, 5.30322);
|
||||
|
||||
const HSCRedSurvey = aladin.newImageSurvey('CDS/P/HSC/DR2/deep/r', {imgFormat: 'fits', colormap: "red", minCut: 0.34228, maxCut: 2.75785, additive: true, stretch: "asinh"});
|
||||
const HSCBlueSurvey = aladin.newImageSurvey('CDS/P/HSC/DR2/deep/z', {imgFormat: 'fits', colormap: "blue", minCut: -0.01218, maxCut: 2.27397, additive: true, stretch: "asinh"});
|
||||
const HSCRedSurvey = aladin.newImageSurvey('P/HSC/DR2/deep/r', {imgFormat: 'fits', colormap: "red", minCut: 0.34228, maxCut: 2.75785, additive: true, stretch: "asinh"});
|
||||
const HSCBlueSurvey = aladin.newImageSurvey('P/HSC/DR2/deep/z', {imgFormat: 'fits', colormap: "blue", minCut: -0.01218, maxCut: 2.27397, additive: true, stretch: "asinh"});
|
||||
|
||||
aladin.setOverlayImageLayer('CDS/P/HSC/DR2/deep/r', 'hsc red layer');
|
||||
aladin.setOverlayImageLayer('CDS/P/HSC/DR2/deep/z', 'hsc blue layer');
|
||||
aladin.setOverlayImageLayer('P/HSC/DR2/deep/r', 'hsc red layer');
|
||||
aladin.setOverlayImageLayer('P/HSC/DR2/deep/z', 'hsc blue layer');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -11699,7 +11699,7 @@
|
||||
aladin.addOverlay(overlay);
|
||||
var polygons = [];
|
||||
verticesArr.forEach(function(vertices) {
|
||||
polygons.push(A.polygon(vertices, {color: '#808080', fillColor: '#808080', opacity: .4, lineWidth: 1, fill: true}))
|
||||
polygons.push(A.polygon(vertices, {closed: true, color: '#808080', fillColor: '#808080', opacity: .4, lineWidth: 1, fill: true}))
|
||||
});
|
||||
overlay.addFootprints(polygons);
|
||||
aladin.gotoRaDec(156.2162606, 63.8522344);
|
||||
|
||||
@@ -15,10 +15,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
var aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {projection: 'MOL', cooFrame: 'galactic', fov: 360, fullScreen: true, showCooGrid: false, showReticle: false})
|
||||
aladin.gotoRaDec(79.9525321, -69.2742586)
|
||||
@@ -52,8 +51,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
aladin.view.setGridConfig({opacity: 0, color: {r: 51/255, g: 209/255, b: 1}})
|
||||
aladin.view.setGridConfig({enabled: true})
|
||||
aladin.setCooGrid({enabled: true, opacity: 0, color: {r: 51, g: 209, b: 255}})
|
||||
|
||||
async function s_1() {
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -98,7 +96,7 @@
|
||||
|
||||
async function showGrid() {
|
||||
for await(const it of interval(50, 40)) {
|
||||
aladin.view.setGridConfig({opacity: it / 40})
|
||||
aladin.setCooGrid({opacity: it / 40})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +153,7 @@
|
||||
|
||||
async function hideGrid() {
|
||||
for await(const it of interval(50, 40)) {
|
||||
aladin.view.setGridConfig({opacity: 1 - it / 40})
|
||||
aladin.setCooGrid({opacity: 1 - it / 40})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,7 +195,7 @@
|
||||
|
||||
async function s10() {
|
||||
for await(const it of interval(50, 80)) {
|
||||
aladin.setRotation(0.5 * it)
|
||||
aladin.setViewCenter2NorthPoleAngle(0.5 * it)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -266,7 +264,7 @@
|
||||
for await(const it of interval(intervalMs, nbIt+1)) {
|
||||
fov = fovStart / Math.pow(fovEnd/fovStart, -it/nbIt)
|
||||
aladin.setFoV(fov)
|
||||
aladin.setRotation(40 - 40 * it/nbIt)
|
||||
aladin.setViewCenter2NorthPoleAngle(40 - 40 * it/nbIt)
|
||||
}
|
||||
aladin.setFoV(fovEnd)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 256px;"></div>
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
@@ -19,7 +19,6 @@
|
||||
target: '19 24 51.556 +45 16 44.36', // initial target
|
||||
cooFrame: 'equatorial', // set galactic frame
|
||||
showCooGrid: true, // set the grid
|
||||
fullScreen: true,
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
45
examples/al-cat-galaxy-shape.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
<script>let aladin;</script>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
A.init.then(() => {
|
||||
// Start up Aladin Lite
|
||||
aladin = A.aladin('#aladin-lite-div', {
|
||||
target: "M31",
|
||||
fov: 89.78,
|
||||
showContextMenu: true,
|
||||
fullScreen: true,
|
||||
showSimbadPointerControl: true,
|
||||
showShareControl: true,
|
||||
showSettingsControl: true,
|
||||
showStackLayerControl: true,
|
||||
samp: true,
|
||||
});
|
||||
|
||||
aladin.addCatalog(A.catalogFromVizieR("VII/237/pgc", "M31", 3, {
|
||||
limit: 1000,
|
||||
//orderBy: 'nb_ref',
|
||||
onClick: 'showTable',
|
||||
color: 'yellow',
|
||||
hoverColor: 'blue',
|
||||
shape: (s) => {
|
||||
let coo = A.coo();
|
||||
coo.parse(s.data['RAJ2000'] + ' ' + s.data['DEJ2000'])
|
||||
|
||||
let a = (0.1 * Math.pow(10, +s.data.logD25)) / 60;
|
||||
let b = (1.0 / Math.pow(10, +s.data.logR25)) * a
|
||||
|
||||
return A.ellipse(coo.lon, coo.lat, a, b, +s.data.PA, {lineWidth: 3});
|
||||
}
|
||||
}));
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
110
examples/al-cat-proper-motion.html
Normal file
@@ -0,0 +1,110 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, height=device-height, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
<script>let aladin;</script>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
A.init.then(() => {
|
||||
// Start up Aladin Lite
|
||||
aladin = A.aladin('#aladin-lite-div', {
|
||||
target: "LMC",
|
||||
fov: 10,
|
||||
showContextMenu: true,
|
||||
fullScreen: true,
|
||||
showSimbadPointerControl: true,
|
||||
showShareControl: true,
|
||||
showSettingsControl: true,
|
||||
showStackLayerControl: true,
|
||||
samp: true,
|
||||
});
|
||||
|
||||
let pmraMean = null, pmdecMean = null;
|
||||
|
||||
const pmCat = A.catalogFromURL('./data/votable/proper_motion.xml', {
|
||||
onClick: 'showTable',
|
||||
name: 'mean pm over HPX cells around LMC from GaiaDR2',
|
||||
hoverColor: 'yellow',
|
||||
selectionColor: 'white',
|
||||
// Footprint associated to sources
|
||||
shape: (s) => {
|
||||
// discard drawing a vector for big pm
|
||||
let totalPmSquared = s.data.pmra*s.data.pmra + s.data.pmdec*s.data.pmdec;
|
||||
if (totalPmSquared > 6) {
|
||||
return;
|
||||
}
|
||||
|
||||
let color = rainbowColorMap((totalPmSquared - 2.5) / 2)
|
||||
|
||||
// Compute the mean of pm over the catalog sources
|
||||
if (!pmraMean || !pmdecMean) {
|
||||
pmraMean = 0, pmdecMean = 0;
|
||||
for (var s of pmCat.getSources()) {
|
||||
pmraMean += +s.data.pmra;
|
||||
pmdecMean += +s.data.pmdec;
|
||||
}
|
||||
|
||||
const numSources = pmCat.getSources().length;
|
||||
|
||||
pmraMean /= numSources
|
||||
pmdecMean /= numSources
|
||||
}
|
||||
|
||||
let dra = +s.data.pmra - pmraMean;
|
||||
let ddec = +s.data.pmdec - pmdecMean;
|
||||
|
||||
return A.vector(
|
||||
s.ra,
|
||||
s.dec,
|
||||
s.ra + dra,
|
||||
s.dec + ddec,
|
||||
{color}
|
||||
)
|
||||
}
|
||||
});
|
||||
aladin.addCatalog(pmCat);
|
||||
});
|
||||
|
||||
function rainbowColorMap(value) {
|
||||
// Ensure value is within range [0, 1]
|
||||
value = Math.max(0, Math.min(1, value));
|
||||
|
||||
// Convert value to hue
|
||||
var hue = (1 - value) * 240; // 240 is the maximum hue value for blue
|
||||
|
||||
// Convert HSV to RGB
|
||||
var chroma = 1;
|
||||
var x = chroma * (1 - Math.abs((hue / 60) % 2 - 1));
|
||||
var r1, g1, b1;
|
||||
|
||||
if (hue >= 0 && hue < 60) {
|
||||
[r1, g1, b1] = [chroma, x, 0];
|
||||
} else if (hue >= 60 && hue < 120) {
|
||||
[r1, g1, b1] = [x, chroma, 0];
|
||||
} else if (hue >= 120 && hue < 180) {
|
||||
[r1, g1, b1] = [0, chroma, x];
|
||||
} else if (hue >= 180 && hue < 240) {
|
||||
[r1, g1, b1] = [0, x, chroma];
|
||||
}
|
||||
|
||||
var m = 1 - chroma;
|
||||
var r = r1 + m;
|
||||
var g = g1 + m;
|
||||
var b = b1 + m;
|
||||
|
||||
// Convert RGB to HEX
|
||||
r = Math.round(r * 255);
|
||||
g = Math.round(g * 255);
|
||||
b = Math.round(b * 255);
|
||||
var colorHex = "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
|
||||
|
||||
return colorHex;
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,42 +1,64 @@
|
||||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<head> </head>
|
||||
<body>
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
<script type="module">
|
||||
import A from "../src/js/A.js";
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin("#aladin-lite-div", {
|
||||
target: "03 36 31.65 -35 17 43.1",
|
||||
survey: "CDS/P/DES-DR2/ColorIRG",
|
||||
fov: 3 / 60,
|
||||
fullScreen: true,
|
||||
showContextMenu: true,
|
||||
showZoomControl: true,
|
||||
showSettingsControl: true,
|
||||
showSimbadPointerControl: true,
|
||||
samp: true,
|
||||
});
|
||||
// define custom draw function
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {target: 'LMC', fov: 55, showContextMenu: true});
|
||||
// define custom draw function
|
||||
var drawFunction = function(source, canvasCtx, viewParams) {
|
||||
canvasCtx.beginPath();
|
||||
canvasCtx.arc(source.x, source.y, source.data['coo_err_min'] * 5, 0, 2 * Math.PI, false);
|
||||
canvasCtx.closePath();
|
||||
canvasCtx.strokeStyle = '#c38';
|
||||
canvasCtx.lineWidth = 3;
|
||||
canvasCtx.globalAlpha = 0.7,
|
||||
canvasCtx.stroke();
|
||||
var fov = Math.max(viewParams['fov'][0], viewParams['fov'][1]);
|
||||
/*var hips = A.catalogHiPS(
|
||||
"https://axel.u-strasbg.fr/HiPSCatService/Simbad",
|
||||
{
|
||||
onClick: "showTable",
|
||||
name: "Simbad",
|
||||
color: "cyan",
|
||||
hoverColor: "red",
|
||||
shape: (s) => {
|
||||
let galaxy = ["Seyfert","Seyfert_1", "Seyfert_2","LSB_G","PartofG","RadioG","Gin","GinPair","HII_G","LensedG","BClG","BlueCompG","EmG","GinCl","GinGroup","StarburstG","LINER","AGN","Galaxy"].some((n) => s.data.main_type.indexOf(n) >= 0);
|
||||
if (!galaxy) return;
|
||||
|
||||
// object name is displayed only if fov<10°
|
||||
if (fov>10) {
|
||||
return;
|
||||
}
|
||||
let a = +s.data.size_maj;
|
||||
let b = +s.data.size_min;
|
||||
|
||||
canvasCtx.globalAlpha = 0.9;
|
||||
canvasCtx.globalAlpha = 1;
|
||||
};
|
||||
let theta = +s.data.size_angle || 0.0;
|
||||
return A.ellipse(s.ra, s.dec, a / 60, b / 60, theta, { color: "cyan" });
|
||||
},
|
||||
}
|
||||
);*/
|
||||
var hips = A.catalogHiPS(
|
||||
"https://axel.cds.unistra.fr/HiPSCatService/II/371/des_dr2",
|
||||
{
|
||||
onClick: "showTable",
|
||||
name: "Simbad",
|
||||
color: "cyan",
|
||||
hoverColor: "red",
|
||||
shape: (s) => {
|
||||
let a = +s.data['Aimg']/3600;
|
||||
let b = +s.data['Bimg']/3600;
|
||||
|
||||
var hips = A.catalogHiPS('https://axel.u-strasbg.fr/HiPSCatService/Simbad', {onClick: 'showTable', name: 'Simbad', shape: drawFunction});
|
||||
aladin.addCatalog(hips);
|
||||
});
|
||||
</script>
|
||||
let theta = +s.data['PA'];
|
||||
|
||||
</body>
|
||||
return A.ellipse(s.ra, s.dec, a, b, theta, { color: "cyan" });
|
||||
},
|
||||
}
|
||||
)
|
||||
aladin.addCatalog(hips);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {target: 'LMC', fov: 55, showContextMenu: true});
|
||||
var hips = A.catalogHiPS('https://axel.u-strasbg.fr/HiPSCatService/Simbad', {onClick: 'showPopup', name: 'Simbad'});
|
||||
var hips = A.catalogHiPS('https://axel.u-strasbg.fr/HiPSCatService/Simbad', {hoverColor: 'yellow', onClick: 'showPopup', name: 'Simbad'});
|
||||
aladin.addCatalog(hips);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
<div id="aladin-lite-div" style="width: 512px; height: 512px"></div>
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: "P/PanSTARRS/DR1/color-z-zg-g", fov:1.5, target: "NGC 7318B"});
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: "data/hips/PanSTARRS_DR1_color-z-zg-g", fov:2.0, target: "22 35 58.39 +33 57 57.8", showSettingsControl: true, log: false});
|
||||
aladin.setProjection('AIT');
|
||||
let cfht = aladin.createImageSurvey("CFHT", "CFHT MegaCam u+g+r", "https://cds.unistra.fr/~derriere/PR_HiPS/2022_Duc/", "equatorial", 10, {imgFormat: 'png'});
|
||||
let jwst1 = aladin.createImageSurvey("CDS/P/JWST/Stephans-Quintet/NIRCam+MIRI", "JWST NIRCam+MIRI", "http://alasky.cds.unistra.fr/JWST/CDS_P_JWST_Stephans-Quintet_NIRCam+MIRI", null, null, {imgFormat: 'png'});
|
||||
let jwst2 = aladin.createImageSurvey("JWST2", "JWST MIRI", "http://alasky.cds.unistra.fr/JWST/CDS_P_JWST_Stephans-Quintet_MIRI", "equatorial", 12, {imgFormat: 'png'});
|
||||
let cfht = aladin.createImageSurvey("CFHT", "CFHT MegaCam u+g+r", "./data/hips/CFHT", "equatorial", 10, {imgFormat: 'png'});
|
||||
let jwst1 = aladin.createImageSurvey("CDS/P/JWST/Stephans-Quintet/NIRCam+MIRI", "JWST NIRCam+MIRI", "data/hips/JWST_NIRCam_MIRI", null, null, {imgFormat: 'png'});
|
||||
let jwst2 = aladin.createImageSurvey("JWST2", "JWST MIRI", "data/hips/JWST_MIRI", "equatorial", 12, {imgFormat: 'png'});
|
||||
aladin.setOverlayImageLayer('CFHT', 'overlay_CFHT');
|
||||
aladin.setOverlayImageLayer('CDS/P/JWST/Stephans-Quintet/NIRCam+MIRI', 'overlay_JWST1');
|
||||
aladin.setOverlayImageLayer('JWST2', 'overlay_JWST2');
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
|
||||
A.init.then(() => {
|
||||
var hipsDir="http://alasky.u-strasbg.fr/CDS_P_Coronelli";
|
||||
aladin = A.aladin("#aladin-lite-div", {showSimbadPointerControl: true, realFullscreen: true, fov: 100, allowFullZoomout: true, showReticle: false });
|
||||
aladin = A.aladin("#aladin-lite-div", {showSimbadPointerControl: true, expandLayersControl: true, realFullscreen: true, fov: 100, allowFullZoomout: true, showReticle: false });
|
||||
aladin.createImageSurvey('illenoroC', 'illenoroC', hipsDir, 'equatorial', 4, {imgFormat: 'jpg', longitudeReversed: false});
|
||||
aladin.createImageSurvey('Coronelli', 'Coronelli', hipsDir, 'equatorial', 4, {imgFormat: 'jpg', longitudeReversed: true});
|
||||
aladin.setImageSurvey('Coronelli');
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, height=device-height, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
@@ -22,6 +23,7 @@
|
||||
reticleColor: '#ff89ff', // change reticle color
|
||||
reticleSize: 64, // change reticle size
|
||||
showContextMenu: true,
|
||||
fullScreen: true,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -75,11 +77,7 @@
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.aladin-stack-control {
|
||||
position: absolute;
|
||||
top: 10rem;
|
||||
left: 10rem;
|
||||
}
|
||||
|
||||
|
||||
.myBox {
|
||||
top: unset;
|
||||
@@ -89,16 +87,12 @@
|
||||
|
||||
.myButton {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
bottom: 100px;
|
||||
left: 0;
|
||||
|
||||
background-color: pink;
|
||||
}
|
||||
|
||||
.aladin-cooFrame {
|
||||
position: absolute;
|
||||
top: 10rem;
|
||||
}
|
||||
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -5,30 +5,23 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width:440px;height:300px"></div>
|
||||
<div id="aladin-lite-div" style="width: 512px; height: 512px"></div>
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {cooFrame: "icrs", fullScreen: true});
|
||||
aladin = A.aladin('#aladin-lite-div', {cooFrame: "icrs", log: false});
|
||||
|
||||
aladin.displayFITS(
|
||||
//'https://fits.gsfc.nasa.gov/samples/FOCx38i0101t_c0f.fits', // url of the fits file
|
||||
'data/fits/HorseHead.fits',
|
||||
//'data/fits/neowise.fits',
|
||||
//'data/fits/irac.fits',
|
||||
//'data/fits/FOCx38i0101t_c0f.fits',
|
||||
'data/fits/panstarrs-g-m61.fits',
|
||||
{
|
||||
minCut: 5000,
|
||||
maxCut: 17000,
|
||||
name: 'm61',
|
||||
colormap: 'viridis'
|
||||
}, // no optional params
|
||||
(ra, dec, fov, image) => {
|
||||
(ra, dec, fov, _) => {
|
||||
// ra, dec and fov are centered around the fits image
|
||||
console.log("jjj", image)
|
||||
image.setColormap("magma", {stretch: "asinh"});
|
||||
|
||||
aladin.gotoRaDec(ra, dec);
|
||||
aladin.setFoV(fov);
|
||||
},
|
||||
|
||||
@@ -42,7 +42,7 @@ Image Opacity: <br/> <input id="slider" type="range" value=1 min=0 max=1 step=0.
|
||||
'https://noirlab.edu/public/media/archives/images/large/noirlab1912a.jpg',
|
||||
// no options
|
||||
{
|
||||
transparency: 0.6,
|
||||
transparency: 1.0,
|
||||
},
|
||||
// A callback fn once the overlay is set
|
||||
callback
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
aladin.setBaseImageLayer("P/PanSTARRS/DR1/g", {imgFormat: "fits"});
|
||||
aladin.getBaseImageLayer().setColormap('redtemperature', {stretch: "Asinh"});*/
|
||||
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: 'CDS/P/SDSS9/color', fov: 60, target: '0 90', fullScreen: true, cooFrame: 'equatorial', showCooGridControl: true, showSimbadPointerControl: true, showCooGrid: true});
|
||||
aladin.setProjection('SIN');
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: 'CDS/P/SDSS9/color', fov: 150, target: '0 90', fullScreen: true, cooFrame: 'equatorial', showCooGridControl: true, showSimbadPointerControl: true, showCooGrid: true});
|
||||
|
||||
//let survey = aladin.createImageSurvey("P/PanSTARRS/DR1/g", null, null, null, null, );
|
||||
/*aladin.setBaseImageLayer("P/PanSTARRS/DR1/g");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
});
|
||||
|
||||
aladin.addCatalog(A.catalogFromSimbad('M 82', 0.1, {onClick: 'showTable'}));
|
||||
aladin.addCatalog(A.catalogFromNED('09 55 52.4 +69 40 47', 0.1, {onClick: 'showPopup', shape: 'plus'}));
|
||||
aladin.addCatalog(A.catalogFromNED('09 55 52.4 +69 40 47', 0.1, {onClick: 'showPopup', shape: 'plus'}));
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -21,22 +21,20 @@ var pessto = 'https://archive.eso.org/tap_cat/sync?REQUEST=doQuery&LANG=ADQL&MAX
|
||||
|
||||
A.init.then(() => {
|
||||
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: 'https://alasky.cds.unistra.fr/DSS/DSSColor/', target: 'LMC', fov: 5, showContextMenu: true});
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: 'https://alasky.cds.unistra.fr/DSS/DSSColor/', target: 'LMC', fov: 5, showContextMenu: true, showSettingsControl:true, samp:true});
|
||||
|
||||
aladin.addCatalog(A.catalogFromURL('https://vizier.u-strasbg.fr/viz-bin/votable?-source=HIP2&-c=LMC&-out.add=_RAJ,_DEJ&-oc.form=dm&-out.meta=DhuL&-out.max=9999&-c.rm=180', {sourceSize:12, color: '#f08080'}));
|
||||
|
||||
|
||||
|
||||
aladin.addCatalog(A.catalogFromURL(vmc_cepheids, {onClick: 'showTable', sourceSize:14, color: '#fff080'}));
|
||||
|
||||
|
||||
|
||||
aladin.addCatalog(A.catalogFromURL(pessto, {onClick: 'showPopup', sourceSize:14, color: '#00f080'}));
|
||||
aladin.on('select', (objs) => {
|
||||
console.log(objs, "are selected");
|
||||
})
|
||||
|
||||
aladin.select();
|
||||
aladin.select('circle');
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -19,11 +19,11 @@
|
||||
overlay.addFootprints([
|
||||
A.polygon([[83.64287, 22.01713], [83.59872, 22.01692], [83.59852, 21.97629], [83.64295, 21.97629]]),
|
||||
A.polygon([[83.62807, 22.06330], [83.58397, 22.02280], [83.62792, 22.02258]]),
|
||||
A.ellipse(10.6833, 41.2669, 3.33333/2, 1.1798333/2, 35, {color: 'cyan'}),
|
||||
A.ellipse(10.6833, 41.2669, 3.33333/2, 1.1798333/2, 10, {color: 'cyan'}),
|
||||
// NGC 3048
|
||||
A.ellipse(180.470842, -18.867589, 5.2/120, 3.1/120, 80, {color: 'cyan'}),
|
||||
A.ellipse(180.470842, -18.867589, 5.2/120, 3.1/120, 10, {color: 'cyan'}),
|
||||
// NGC 3049
|
||||
A.ellipse(180.4742, -18.8850, 3.1/120, 1.6/120, 50, {color: 'cyan'}),
|
||||
A.ellipse(180.4742, -18.8850, 3.1/120, 1.6/120, 10, {color: 'cyan'}),
|
||||
]);
|
||||
//overlay.add(); // radius in degrees
|
||||
});
|
||||
|
||||
38
examples/al-error-ellipse.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css">
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
var aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: 'https://alasky.cds.unistra.fr/DSS/DSSColor/', target: 'm1', fov: 5, showContextMenu: true, showSettingsControl:true, samp:true});
|
||||
|
||||
var customImg = new Image();
|
||||
customImg.onload = function() {
|
||||
const cat = A.catalogFromVizieR('II/246/out', 'm1', 0.1, {onClick: 'showTable', hoverColor: 'purple', limit: 1000, colnames: ["errMin", "errMaj", "errPA"], shape: (s) => {
|
||||
if (+s.data['Jmag'] > 15) {
|
||||
return;
|
||||
} else {
|
||||
let a = +s.data['errMaj']/36;
|
||||
let b = +s.data['errMin']/36;
|
||||
|
||||
let theta = +s.data['errPA'];
|
||||
|
||||
return A.ellipse(s.ra, s.dec, a, b, theta, {fillColor: 'rgba(255, 0, 255, 0.2)', drawAxes: true})
|
||||
}
|
||||
}});
|
||||
aladin.addCatalog(cat);
|
||||
};
|
||||
customImg.src = 'https://aladin.u-strasbg.fr/AladinLite/doc/API/examples/img/star.png';
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -4,19 +4,23 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
<div id='infoDiv'> </div>
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
A.init.then(() => {
|
||||
var aladin = A.aladin('#aladin-lite-div', {target: '05 37 58 +08 17 35', fov: 12, backgroundColor: 'rgb(120, 0, 0)'});
|
||||
var cat = A.catalog({sourceSize: 20});
|
||||
var aladin = A.aladin('#aladin-lite-div', {showContextMenu: true, target: '05 37 58 +08 17 35', fov: 12, backgroundColor: 'rgb(120, 0, 0)'});
|
||||
var cat = A.catalog({sourceSize: 20, onClick: (s) => {console.log("kjk", s)}});
|
||||
aladin.addCatalog(cat);
|
||||
cat.addSources([A.source(83.784490, 9.934156, {name: 'Meissa'}), A.source(88.792939, 7.407064, {name: 'Betelgeuse'}), A.source(81.282764, 6.349703, {name: 'Bellatrix'})]);
|
||||
var msg;
|
||||
|
||||
// define function triggered when a source is hovered
|
||||
aladin.on('click', function(e) {
|
||||
console.log(e)
|
||||
});
|
||||
|
||||
let infoDiv = document.querySelector("#infoDiv");
|
||||
aladin.on('objectHovered', function(object, xyMouseCoords) {
|
||||
if (object) {
|
||||
msg = 'You hovered object ' + object.data.name + ' located at ' + object.ra + ', ' + object.dec + '; mouse coords - x: '
|
||||
@@ -25,7 +29,7 @@
|
||||
else {
|
||||
msg = 'No object hovered';
|
||||
}
|
||||
$('#infoDiv').html(msg);
|
||||
infoDiv.innerText = msg;
|
||||
});
|
||||
|
||||
aladin.on('objectHoveredStop', function(object, xyMouseCoords) {
|
||||
@@ -33,7 +37,7 @@
|
||||
msg = 'You stopped hove object ' + object.data.name + ' located at ' + object.ra + ', ' + object.dec + '; mouse coords - x: '
|
||||
+ xyMouseCoords.x + ', y: ' + xyMouseCoords.y;
|
||||
}
|
||||
$('#infoDiv').html(msg);
|
||||
infoDiv.innerText = msg;
|
||||
});
|
||||
|
||||
// define function triggered when an object is clicked
|
||||
@@ -49,8 +53,22 @@
|
||||
objClicked.deselect();
|
||||
msg = 'You clicked in void';
|
||||
}
|
||||
$('#infoDiv').html(msg);
|
||||
infoDiv.innerText = msg;
|
||||
});
|
||||
|
||||
aladin.on('resizeChanged', function() {
|
||||
console.log("resize")
|
||||
});
|
||||
|
||||
aladin.on('projectionChanged', function(proj) {
|
||||
console.log(proj)
|
||||
});
|
||||
|
||||
aladin.on('layerChanged', function(imageLayer, layer, state){
|
||||
console.log(imageLayer, layer, state)
|
||||
});
|
||||
|
||||
cat.sources[0].actionClicked();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -12,15 +12,16 @@
|
||||
A.init.then(() => {
|
||||
// Start up Aladin Lite
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: "CDS/P/DSS2/color", target: 'M 1', fov: 0.2, showContextMenu: true, fullScreen: true});
|
||||
var overlay = A.graphicOverlay({color: '#ee2345', lineWidth: 3});
|
||||
aladin.addOverlay(overlay);
|
||||
var overlay = A.graphicOverlay({color: '#ee2345', lineWidth: 3, lineDash: [2, 2]});
|
||||
/*aladin.addOverlay(overlay);
|
||||
overlay.addFootprints([
|
||||
A.polygon([[83.64287, 22.01713], [83.59872, 22.01692], [83.59852, 21.97629], [83.64295, 21.97629]]),
|
||||
A.polygon([[83.64287, 22.01713], [83.59872, 22.01692], [83.59852, 21.97629], [83.64295, 21.97629]], {hoverColor: 'green'}),
|
||||
A.polygon([[83.62807, 22.06330], [83.58397, 22.02280], [83.62792, 22.02258]]),
|
||||
A.polygon([[8.62807, 220.06330], [83.58397, 10.02280], [150.62792, 87.02258]])
|
||||
]);
|
||||
overlay.add(A.circle(83.66067, 22.03081, 0.04, {color: 'cyan'})); // radius in degrees
|
||||
|
||||
overlay.add(A.vector(83.66067, 22.03081, 0.04, {color: 'cyan'})); // radius in degrees
|
||||
*/
|
||||
aladin.on("footprintClicked", (footprint, xyMouseCoords) => {
|
||||
console.log("footprint clicked catched: ", footprint, "mouse coords xy: ", xyMouseCoords.x, xyMouseCoords.y);
|
||||
})
|
||||
@@ -34,7 +35,7 @@
|
||||
console.log("Object hovered stopped: ", object, "mouse coords xy: ", xyMouseCoords.x, xyMouseCoords.y);
|
||||
})
|
||||
|
||||
const cat = A.catalogFromVizieR('B/assocdata/obscore', 'M 1', 100, {onClick: 'showTable', limit: 1000});
|
||||
const cat = A.catalogFromVizieR('B/assocdata/obscore', 'M 1', 10, {onClick: 'showTable', selectionColor: "orange", hoverColor: 'red', limit: 10000});
|
||||
aladin.addCatalog(cat);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{
|
||||
survey: 'P/allWISE/color', // set initial image survey
|
||||
projection: 'AIT', // set a projection
|
||||
fov: 1.5, // initial field of view in degrees
|
||||
fov: 0.1, // initial field of view in degrees
|
||||
target: 'NGC 2175', // initial target
|
||||
cooFrame: 'galactic', // set galactic frame
|
||||
reticleColor: '#00ff00', // change reticle color
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
@@ -10,9 +12,9 @@
|
||||
import A from '../src/js/A.js';
|
||||
//let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {showReticle: true, showSurveyStackControl: true, showOverlayStackControl: false, projection: "TAN", target: '15 16 57.636 -60 55 7.49', showProjectionControl: true, realFullscreen: true, showZoomControl: true, showSimbadPointerControl: true, showShareControl: true, showContextMenu: true, showCooGridControl: true, fullScreen: true, showCooGrid: true, fov: 90});
|
||||
|
||||
var moc_0_99 = A.MOCFromURL("./data//gw/gw_0.9.fits",{ name: "GW 90%", color: "#ff0000", opacity: 0.0, lineWidth: 3, fill: false, perimeter: true});
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: "data/hips/CDS_P_DSS2_color", showReticle: true, showSurveyStackControl: true, showOverlayStackControl: false, projection: "TAN", target: '15 16 57.636 -60 55 7.49', showProjectionControl: true, realFullscreen: true, showZoomControl: true, showSimbadPointerControl: true, showShareControl: true, showContextMenu: true, showCooGridControl: true, fullScreen: true, showCooGrid: true, fov: 180, log: false});
|
||||
|
||||
var moc_0_99 = A.MOCFromURL("./data/gw/gw_0.9.fits",{ name: "GW 90%", color: "#ff0000", opacity: 0.0, lineWidth: 10, fill: false, perimeter: true});
|
||||
var moc_0_95 = A.MOCFromURL("./data/gw/gw_0.6.fits",{ name: "GW 60%", color: "#00ff00", opacity: 0.5, lineWidth: 3, fill: true, perimeter: true});
|
||||
var moc_0_5 = A.MOCFromURL("./data/gw/gw_0.3.fits",{ name: "GW 30%", color: "#00ffff", opacity: 0.5, lineWidth: 3, fill: true, perimeter: true});
|
||||
var moc_0_2 = A.MOCFromURL("./data/gw/gw_0.1.fits",{ name: "GW 10%", color: "#ff00ff", opacity: 0.5, lineWidth: 3, fill: true, perimeter: true});
|
||||
|
||||
52
examples/al-hips-cube.html
Normal file
@@ -0,0 +1,52 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div id="aladin-lite-div" style="width: 768px; height: 512px"></div>
|
||||
<script>let aladin; let hips;</script>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin(
|
||||
'#aladin-lite-div',
|
||||
{
|
||||
showSimbadPointerControl: true,
|
||||
projection: 'AIT', // set a projection
|
||||
fov: 360, // initial field of view in degrees
|
||||
target: '169.58868 +45.74914', // initial target
|
||||
cooFrame: 'icrs', // set galactic frame
|
||||
reticleColor: '#ff89ff', // change reticle color
|
||||
reticleSize: 64, // change reticle size
|
||||
showContextMenu: true,
|
||||
showFrame: true,
|
||||
showZoomControl:true,
|
||||
showSettingsControl:true,
|
||||
showCooGrid: true,
|
||||
fullScreen: true,
|
||||
samp: true,
|
||||
}
|
||||
);
|
||||
|
||||
//hips = aladin.newImageSurvey("https://alasky.cds.unistra.fr/GALFAHI/GALFAHI-Narrow-DR2/");
|
||||
//aladin.setImageLayer(hips)
|
||||
|
||||
/*let id;
|
||||
aladin.on("zoomChanged", () => {
|
||||
if (id)
|
||||
clearTimeout(id);
|
||||
id = setTimeout(() => {
|
||||
console.log("wheel stopped, new cone search here")
|
||||
}, 500);
|
||||
})*/
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.aladin-cat-browser-box {
|
||||
width: 600px;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
@@ -4,16 +4,14 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
<div id="aladin-lite-div" style="width: 512px; height: 512px"></div>
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {target: 'galactic center'});
|
||||
|
||||
let survey = aladin.createImageSurvey('hips gaia', "hips gaia name", "data/hips/gaia", undefined, undefined, {colormap:"viridis"});
|
||||
aladin.setBaseImageLayer(survey);
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: "data/hips/CDS_P_DSS2_color", target: "05 40 59.12 -02 27 04.1", fov: 2, log: false});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,34 +1,35 @@
|
||||
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, height=device-height, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 500px"></div>
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
|
||||
var aladin;
|
||||
A.init.then(() => {
|
||||
// Start up Aladin Lite
|
||||
let aladin = A.aladin('#aladin-lite-div', {target: 'Sgr a*', fov: 0.5, showContextMenu: true});
|
||||
aladin = A.aladin('#aladin-lite-div', {fullScreen: true, cooFrame: "ICRSd", showSimbadPointerControl: true, showShareControl: true, showShareControl: true, survey: 'https://alasky.cds.unistra.fr/DSS/DSSColor/', fov: 180, showContextMenu: true});
|
||||
// manage URL parameters
|
||||
let survey1 = aladin.getBaseImageLayer();
|
||||
survey1.setColormap('magma', {stretch: 'linear'});
|
||||
|
||||
let survey2 = aladin.newImageSurvey("CDS/P/2MASS6X/H");
|
||||
|
||||
let survey2 = aladin.newImageSurvey("CSIRO/P/RACS/mid/I");
|
||||
aladin.setImageLayer(survey2)
|
||||
survey2.setColormap('rdbu', {stretch: 'asinh'});
|
||||
|
||||
let survey3 = aladin.newImageSurvey("https://alasky.cds.unistra.fr/CFHTLS-T0007b/Deep/UALLSKY/");
|
||||
survey2.setColormap('rdbu', {stretch: 'linear'});
|
||||
|
||||
let survey3 = aladin.newImageSurvey("CSIRO/P/RACS/low/I");
|
||||
aladin.setImageLayer(survey3)
|
||||
survey3.setColormap('cubehelix', {stretch: 'asinh'});
|
||||
aladin.setImageLayer(survey3)
|
||||
aladin.setImageLayer(survey3)
|
||||
survey3.setColormap('cubehelix', {stretch: 'linear'});
|
||||
|
||||
aladin.setImageLayer(survey2);
|
||||
aladin.setImageLayer(survey3);
|
||||
aladin.setImageLayer(survey3);
|
||||
|
||||
//aladin.setOverlayImageLayer(survey2);
|
||||
aladin.setImageLayer(survey3)
|
||||
aladin.setImageLayer(survey2);
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
27
examples/al-image-with-AVM-tags.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
A.init.then(() => {
|
||||
let aladin = A.aladin('#aladin-lite-div', {fov: 30, survey: "CDS/P/DSS2/color", target: "280 +0", projection: "AIT", showShareControl:true, showSettingsControl: true, showContextMenu:true});
|
||||
|
||||
aladin.setOverlayImageLayer(A.image(
|
||||
"https://www.virtualastronomy.org/images/sig05-013.jpg",
|
||||
{
|
||||
name: "sig05-017",
|
||||
successCallback: (ra, dec, fov, image) => {
|
||||
console.log(ra, dec)
|
||||
aladin.gotoRaDec(ra, dec);
|
||||
aladin.setFoV(fov * 5)
|
||||
}
|
||||
},
|
||||
));
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
46
examples/al-image-with-WCS.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
A.init.then(() => {
|
||||
let aladin = A.aladin('#aladin-lite-div', {fov: 30, survey: "CDS/P/GALEXGR6/AIS/FUV", target: "280 +0", projection: "AIT", showShareControl:true, showSettingsControl: true, showContextMenu:true});
|
||||
|
||||
aladin.setOverlayImageLayer(A.image(
|
||||
"https://nova.astrometry.net/image/25038473?filename=M61.jpg",
|
||||
{
|
||||
name: "M61",
|
||||
wcs: {
|
||||
NAXIS: 0, // Minimal header
|
||||
CTYPE1: 'RA---TAN', // TAN (gnomic) projection
|
||||
CTYPE2: 'DEC--TAN', // TAN (gnomic) projection
|
||||
EQUINOX: 2000.0, // Equatorial coordinates definition (yr)
|
||||
LONPOLE: 180.0, // no comment
|
||||
LATPOLE: 0.0, // no comment
|
||||
CRVAL1: 185.445488837, // RA of reference point
|
||||
CRVAL2: 4.47896032431, // DEC of reference point
|
||||
CRPIX1: 588.995094299, // X reference pixel
|
||||
CRPIX2: 308.307905197, // Y reference pixel
|
||||
CUNIT1: 'deg', // X pixel scale units
|
||||
CUNIT2: 'deg', // Y pixel scale units
|
||||
CD1_1: -0.000223666022989, // Transformation matrix
|
||||
CD1_2: -0.000296578064584, // no comment
|
||||
CD2_1: -0.000296427555509, // no comment
|
||||
CD2_2: 0.000223774308964, // no comment
|
||||
NAXIS1: 1080, // Image width, in pixels.
|
||||
NAXIS2: 705 // Image height, in pixels.
|
||||
},
|
||||
successCallback: (ra, dec, fov, image) => {
|
||||
aladin.gotoRaDec(ra, dec);
|
||||
aladin.setFoV(fov * 5)
|
||||
}
|
||||
},
|
||||
));
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
32
examples/al-in-shadow-dom.html
Normal file
@@ -0,0 +1,32 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="shadow-host"></div>
|
||||
|
||||
<script type="text/javascript" src="./../dist/aladin.umd.cjs" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
const shadowEl = document.querySelector(".shadow-host");
|
||||
const shadow = shadowEl.attachShadow({mode: 'open'});
|
||||
|
||||
let aladinLiteEl = document.createElement('div');
|
||||
aladinLiteEl.id = "aladin-lite-div"
|
||||
aladinLiteEl.style = "width: 768px; height: 512px";
|
||||
shadow.appendChild(aladinLiteEl)
|
||||
|
||||
A.init.then(() => {
|
||||
let aladin = A.aladin(
|
||||
aladinLiteEl,
|
||||
{
|
||||
survey: 'P/allWISE/color', // set initial image survey
|
||||
projection: 'AIT', // set a projection
|
||||
fov: 1.5, // initial field of view in degrees
|
||||
target: 'orion', // initial target
|
||||
}
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,42 +1,50 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 768px; height: 512px"></div>
|
||||
<script>let aladin;</script>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
var aladin;
|
||||
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin(
|
||||
'#aladin-lite-div',
|
||||
{
|
||||
showSimbadPointerControl: true,
|
||||
survey: 'P/allWISE/color', // set initial image survey
|
||||
projection: 'AIT', // set a projection
|
||||
fov: 1.5, // initial field of view in degrees
|
||||
target: 'NGC 2175', // initial target
|
||||
cooFrame: 'galactic', // set galactic frame
|
||||
reticleColor: '#00ff00', // change reticle color
|
||||
reticleSize: 40, // change reticle size
|
||||
gridOptions: {color: 'pink'},
|
||||
showCooGrid: true, // set the grid
|
||||
fullScreen: true,
|
||||
showStatusBar: false,
|
||||
showShareControl: true,
|
||||
showSettingsControl: true,
|
||||
showLayersControl: true,
|
||||
showZoomControl: true,
|
||||
fov: 360, // initial field of view in degrees
|
||||
target: 'orion', // initial target
|
||||
cooFrame: 'icrs', // set galactic frame
|
||||
reticleColor: '#ff89ff', // change reticle color
|
||||
reticleSize: 64, // change reticle size
|
||||
showContextMenu: true,
|
||||
showCooGridControl: true,
|
||||
//showSimbadPointerControl: true,
|
||||
showFullscreenControl: true,
|
||||
showFrame: true,
|
||||
showZoomControl:true,
|
||||
showSettingsControl:true,
|
||||
showCooGrid: true,
|
||||
fullScreen: true,
|
||||
samp: true,
|
||||
}
|
||||
);
|
||||
|
||||
/*let id;
|
||||
aladin.on("zoomChanged", () => {
|
||||
if (id)
|
||||
clearTimeout(id);
|
||||
id = setTimeout(() => {
|
||||
console.log("wheel stopped, new cone search here")
|
||||
}, 500);
|
||||
})*/
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.aladin-cat-browser-box {
|
||||
width: 600px;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -44,6 +44,12 @@
|
||||
landingSites.addSources([A.marker(-225.71, 47.64, {popupTitle: 'Viking 2', popupDesc: 'Landing date: September 3, 1976 22:37:50'})]);
|
||||
landingSites.addSources([A.marker(175.472636, -14.5684, {popupTitle: 'Spirit', popupDesc: 'Landing date: January 4, 2004, 04:35 UTC '})]);
|
||||
landingSites.addSources([A.marker(137.4417, -4.5895, {popupTitle: 'Curiosity', popupDesc: 'Landing date: August 6, 2012, 05:17 UTC '})])
|
||||
|
||||
var cat = A.catalog({name: "Temp", sourceSize: 18, onClick: 'showPopup'});
|
||||
aladin.addCatalog(cat);
|
||||
cat.addSources(A.source(105.69239256, -8.45235969, {a: 1, b: 2, c:3}));
|
||||
cat.addSources(A.source(105.70779763, -8.31350997, {a: 4, b: 5, c:6}));
|
||||
cat.addSources(A.source(105.74242906, -8.34776709, {a: 7, b: 8, c:9}));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, height=device-height, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px">
|
||||
<div id="ui" class="ui">
|
||||
@@ -11,13 +12,15 @@
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {target: '00 00 00 +07 00 00', fov: 130, survey: 'P/Mellinger/color'});
|
||||
var moc11 = A.MOCFromURL('http://skies.esac.esa.int/HST/NICMOS/Moc.fits', {color: '#84f', lineWidth: 3, fill: true}, (moc) => {
|
||||
aladin = A.aladin('#aladin-lite-div', {inertia: false, target: '00 00 00 +07 00 00', fov: 130, survey: 'P/Mellinger/color', showContextMenu: true, fullScreen: true});
|
||||
var moc11 = A.MOCFromURL('http://skies.esac.esa.int/HST/NICMOS/Moc.fits', {color: '#84f', lineWidth: 3}, (moc) => {
|
||||
// moc is ready
|
||||
console.log(moc.contains(205.9019247, +2.4492764));
|
||||
console.log(moc.contains(-205.9019247, +2.4492764));
|
||||
|
||||
console.log(moc.serialize("json"))
|
||||
});
|
||||
var moc10 = A.MOCFromURL('https://alasky.unistra.fr/MocServer/query?ivorn=ivo%3A%2F%2FCDS%2FV%2F139%2Fsdss9&get=moc&order=11&fmt=fits', {color: '#ffffff', perimeter: true, fillColor: '#aabbcc', opacity: 0.1, lineWidth: 3});
|
||||
var moc10 = A.MOCFromURL('https://alasky.unistra.fr/MocServer/query?ivorn=ivo%3A%2F%2FCDS%2FV%2F139%2Fsdss9&get=moc&order=11&fmt=fits', {color: '#ffffff', perimeter: true, fillColor: '#aabbcc', opacity: 0.3, lineWidth: 3});
|
||||
var moc9 = A.MOCFromURL('https://alasky.unistra.fr/MocServer/query?ivorn=ivo%3A%2F%2FCDS%2FV%2F139%2Fsdss9&get=moc&order=4&fmt=fits', {color: '#00ff00', opacity: 0.5, lineWidth: 3, perimeter: true});
|
||||
|
||||
aladin.addMOC(moc11);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {projection: 'MOL', fullScreen: true, fov: 360, survey: ['P/DM/vizMine', 'P/HST/GOODS/color', 'P/MATLAS/g'], target: '0 0', showProjectionControl: true, showSettingsControl: true, showCooGrid: true});
|
||||
aladin = A.aladin('#aladin-lite-div', {projection: 'MOL', fullScreen: true, fov: 360, survey: ['P/DM/vizMine', 'P/HST/GOODS/color', 'P/MATLAS/g'], target: '0 0', showProjectionControl: false, showSettingsControl: false, showLayersControl: false, showCooGrid: false, showFrame: false, showCooLocation: false});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -6,18 +6,16 @@
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
|
||||
<script>var aladin;</script>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
// Start up Aladin Lite
|
||||
aladin = A.aladin('#aladin-lite-div', {
|
||||
fov: 360,
|
||||
target: '0 0',
|
||||
fullScreen: true,
|
||||
survey: ["fsdfsd", "jfjfj", "jfj", "P/allWISE/color"],
|
||||
showCooGrid: true,
|
||||
survey: ["azef", "jfjfj", "jfj", "P/allWISE/color"],
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {target: 'NGC 1367', fov: 360, samp: false, projection: 'AIT', fullScreen: true, showContextMenu: true});
|
||||
|
||||
A.catalogFromURL('https://raw.githubusercontent.com/VisIVOLab/SKA-Discovery-Service-Mockup/main/ObsCore/ObsCore_003.xml', {onClick: 'showTable'}, (catalog) => {
|
||||
A.catalogFromURL('https://raw.githubusercontent.com/VisIVOLab/SKA-Discovery-Service-Mockup/main/ObsCore/ObsCore_003.xml', {onClick: 'showTable', hoverColor: 'purple'}, (catalog) => {
|
||||
aladin.addCatalog(catalog)
|
||||
});
|
||||
|
||||
aladin.addCatalog(A.catalogFromVizieR("B/assocdata/obscore", "0 +0", 20, {limit: 1000}))
|
||||
aladin.addCatalog(A.catalogFromVizieR("B/assocdata/obscore", "0 +0", 20, {onClick: 'showTable', hoverColor: 'yellow', limit: 1000}))
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
||||
<div id="aladin-lite-div" style="width: 512px; height: 512px"></div>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: 'P/DSS2/red', target: 'M1', fov: 0.3});
|
||||
var cat = A.catalogFromURL('http://cdsxmatch.u-strasbg.fr/QueryCat/QueryCat?catName=SIMBAD&mode=cone&pos=M1&r=50arcmin&format=votable&limit=3000', {sourceSize:12, color: '#cc99bb', displayLabel: true, labelColumn: 'main_id', labelColor: '#ae4', labelFont: '9px sans-serif'});
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: 'data/hips/CDS_P_DSS2_color', target: '05 34 30.89 +22 00 52.9', fov: 0.3, log: false, showSettingsControl: true});
|
||||
var cat = A.catalogFromURL('data/votable/labels.vot', {sourceSize:12, color: '#cc99bb', displayLabel: true, labelColumn: 'main_id', labelColor: '#ae4', labelFont: '9px sans-serif'});
|
||||
aladin.addCatalog(cat);
|
||||
});
|
||||
</script>
|
||||
|
||||
88
examples/al-onthefly.html
Normal file
@@ -0,0 +1,88 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {
|
||||
fullScreen: true,
|
||||
target: "ngc 1436",
|
||||
fov: 2,
|
||||
projection: 'TAN',
|
||||
showContextMenu: true,
|
||||
showSimbadPointerControl: true,
|
||||
expandLayersControl: true,
|
||||
hipsList: [
|
||||
// High energy (Gamma and X-rays)
|
||||
'CDS/P/HGPS/Flux',
|
||||
'CDS/P/Fermi/5',
|
||||
'CDS/P/Fermi/4',
|
||||
'CDS/P/Fermi/3',
|
||||
'ov-gso/P/Fermi/Band2',
|
||||
'ov-gso/P/BAT/150-195keV',
|
||||
'ov-gso/P/BAT/35-50keV',
|
||||
'ov-gso/P/BAT/14-20keV',
|
||||
'erosita/dr1/rate/023',
|
||||
'erosita/dr1/rate/024',
|
||||
// Uv/Optical/Infrared
|
||||
'CDS/P/GALEXGR6_7/FUV',
|
||||
'CDS/P/GALEXGR6_7/NUV',
|
||||
'CDS/P/DSS2/color',
|
||||
'CDS/P/PanSTARRS/DR1/g',
|
||||
'CDS/P/PanSTARRS/DR1/r',
|
||||
'CDS/P/Finkbeiner',
|
||||
'CDS/P/PanSTARRS/DR1/i',
|
||||
'CDS/P/PanSTARRS/DR1/color-i-r-g',
|
||||
'CDS/P/PanSTARRS/DR1/z',
|
||||
'CDS/P/PanSTARRS/DR1/y',
|
||||
'CDS/P/DES-DR2/ColorIRG',
|
||||
'CDS/P/2MASS/color',
|
||||
'ov-gso/P/GLIMPSE/irac1',
|
||||
'ov-gso/P/GLIMPSE/irac2',
|
||||
'CDS/P/unWISE/color-W2-W1W2-W1',
|
||||
'ov-gso/P/GLIMPSE/irac3',
|
||||
'ov-gso/P/GLIMPSE/irac4',
|
||||
'CDS/P/IRIS/color',
|
||||
'ESAVO/P/AKARI/N60',
|
||||
'ESAVO/P/AKARI/WideL',
|
||||
'ESAVO/P/HERSCHEL/SPIRE-250',
|
||||
'ESAVO/P/HERSCHEL/SPIRE-350',
|
||||
'ESAVO/P/HERSCHEL/SPIRE-500',
|
||||
// sub-mm/mm/radio
|
||||
'CDS/P/PLANCK/R3/HFI/color',
|
||||
'CDS/P/ACT_Planck/DR5/f220',
|
||||
'CDS/P/CO',
|
||||
'CDS/P/PLANCK/R3/HFI100',
|
||||
'CDS/P/PLANCK/R3/LFI30',
|
||||
'CDS/P/NVSS',
|
||||
'CSIRO/P/RACS/mid/I',
|
||||
'ov-gso/P/CGPS/VGPS',
|
||||
'CDS/C/HI4PI/HI',
|
||||
'CDS/P/MeerKAT/Galactic-Centre-1284MHz-StokesI',
|
||||
'CSIRO/P/RACS/low/I',
|
||||
'astron.nl/P/tgssadr',
|
||||
'ov-gso/P/GLEAM/170-231',
|
||||
'ov-gso/P/GLEAM/139-170',
|
||||
'astron.nl/P/lotss_dr2_high',
|
||||
'ov-gso/P/GLEAM/103-134',
|
||||
'ov-gso/P/GLEAM/072-103'
|
||||
]
|
||||
});
|
||||
|
||||
aladin.addCatalog(
|
||||
A.catalogFromSKAORucio("ngc 1436", 15, {
|
||||
onClick: 'showTable',
|
||||
hoverColor: "yellow",
|
||||
})
|
||||
);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -11,11 +11,11 @@
|
||||
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {target: 'Gamma Cas', fov: 10});
|
||||
aladin = A.aladin('#aladin-lite-div', {target: 'Gamma Cas', fov: 10, cooFrame: 'icrs'});
|
||||
|
||||
var overlay = A.graphicOverlay({color: '#ee2345', lineWidth: 2});
|
||||
var overlay = A.graphicOverlay({lineWidth: 2});
|
||||
aladin.addOverlay(overlay);
|
||||
overlay.add(A.polyline([ [2.29452158, 59.14978110], [10.12683778, 56.53733116], [14.1772154, 60.7167403], [21.45396446, 60.23528403], [28.59885697, 63.67010079] ]));
|
||||
overlay.add(A.polyline([ [2.29452158, 59.14978110], [10.12683778, 56.53733116], [14.1772154, 60.7167403], [21.45396446, 60.23528403], [28.59885697, 63.67010079] ], {color: 'green'}));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
38
examples/al-save-colormap.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<!--<link rel="stylesheet" href="./layers.css" />-->
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
|
||||
<script>var aladin;</script>
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {fullScreen: true, cooFrame: "ICRSd", showSimbadPointerControl: true, showShareControl: true, showShareControl: true, survey: 'https://alasky.cds.unistra.fr/DSS/DSSColor/', fov: 180, showContextMenu: true});
|
||||
// manage URL parameters
|
||||
let survey1 = aladin.getBaseImageLayer();
|
||||
survey1.setColormap('magma', {stretch: 'linear'});
|
||||
|
||||
let survey2 = aladin.newImageSurvey("CSIRO/P/RACS/low/I");
|
||||
aladin.setImageLayer(survey2)
|
||||
survey2.setColormap('rdbu', {stretch: 'linear'});
|
||||
|
||||
let survey3 = aladin.newImageSurvey("CSIRO/P/RACS/mid/I");
|
||||
aladin.setImageLayer(survey3)
|
||||
survey3.setColormap('cubehelix', {stretch: 'asinh'});
|
||||
|
||||
aladin.setImageLayer(survey2);
|
||||
|
||||
setTimeout(() => {
|
||||
aladin.removeHiPSFromFavorites(survey3)
|
||||
}, 5000);
|
||||
|
||||
|
||||
aladin.addColormap('mycmap', ["lightblue", "red", "violet", "lightgreen"])
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
95
examples/al-ska-hips-list.html
Normal file
@@ -0,0 +1,95 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {
|
||||
fullScreen: true,
|
||||
target: "centaurus A",
|
||||
fov: 10,
|
||||
projection: 'TAN',
|
||||
showContextMenu: true,
|
||||
showSimbadPointerControl: true,
|
||||
expandLayersControl: true,
|
||||
hipsList: [
|
||||
// High energy (Gamma and X-rays)
|
||||
'CDS/P/HGPS/Flux',
|
||||
'CDS/P/Fermi/5',
|
||||
'CDS/P/Fermi/4',
|
||||
'CDS/P/Fermi/3',
|
||||
'ov-gso/P/Fermi/Band2',
|
||||
'ov-gso/P/BAT/150-195keV',
|
||||
'ov-gso/P/BAT/35-50keV',
|
||||
'ov-gso/P/BAT/14-20keV',
|
||||
'erosita/dr1/rate/023',
|
||||
'erosita/dr1/rate/024',
|
||||
// Uv/Optical/Infrared
|
||||
'CDS/P/GALEXGR6_7/FUV',
|
||||
'CDS/P/GALEXGR6_7/NUV',
|
||||
'CDS/P/DSS2/color',
|
||||
'CDS/P/PanSTARRS/DR1/g',
|
||||
'CDS/P/PanSTARRS/DR1/r',
|
||||
'CDS/P/Finkbeiner',
|
||||
'CDS/P/PanSTARRS/DR1/i',
|
||||
'CDS/P/PanSTARRS/DR1/color-i-r-g',
|
||||
'CDS/P/PanSTARRS/DR1/z',
|
||||
'CDS/P/PanSTARRS/DR1/y',
|
||||
'CDS/P/DES-DR2/ColorIRG',
|
||||
'CDS/P/2MASS/color',
|
||||
'ov-gso/P/GLIMPSE/irac1',
|
||||
'ov-gso/P/GLIMPSE/irac2',
|
||||
'CDS/P/unWISE/color-W2-W1W2-W1',
|
||||
'ov-gso/P/GLIMPSE/irac3',
|
||||
'ov-gso/P/GLIMPSE/irac4',
|
||||
'CDS/P/IRIS/color',
|
||||
'ESAVO/P/AKARI/N60',
|
||||
'ESAVO/P/AKARI/WideL',
|
||||
'ESAVO/P/HERSCHEL/SPIRE-250',
|
||||
'ESAVO/P/HERSCHEL/SPIRE-350',
|
||||
'ESAVO/P/HERSCHEL/SPIRE-500',
|
||||
// sub-mm/mm/radio
|
||||
'CDS/P/PLANCK/R3/HFI/color',
|
||||
'CDS/P/ACT_Planck/DR5/f220',
|
||||
'CDS/P/CO',
|
||||
'CDS/P/PLANCK/R3/HFI100',
|
||||
'CDS/P/PLANCK/R3/LFI30',
|
||||
'CDS/P/NVSS',
|
||||
'CSIRO/P/RACS/mid/I',
|
||||
'ov-gso/P/CGPS/VGPS',
|
||||
'CDS/C/HI4PI/HI',
|
||||
'CDS/P/MeerKAT/Galactic-Centre-1284MHz-StokesI',
|
||||
'CSIRO/P/RACS/low/I',
|
||||
'astron.nl/P/tgssadr',
|
||||
'ov-gso/P/GLEAM/170-231',
|
||||
'ov-gso/P/GLEAM/139-170',
|
||||
'astron.nl/P/lotss_dr2_high',
|
||||
'ov-gso/P/GLEAM/103-134',
|
||||
'ov-gso/P/GLEAM/072-103'
|
||||
]
|
||||
});
|
||||
|
||||
const gleam072_103 = aladin.newImageSurvey('ov-gso/P/GLEAM/072-103', {imgFormat: 'fits', colormap: "red", stretch: "asinh"});
|
||||
const gleam103_134 = aladin.newImageSurvey('ov-gso/P/GLEAM/103-134', {imgFormat: 'fits', colormap: "green", additive: true, stretch: "asinh"});
|
||||
const gleam170_231 = aladin.newImageSurvey('ov-gso/P/GLEAM/170-231', {imgFormat: 'fits', colormap: "blue", additive: true, stretch: "asinh"});
|
||||
|
||||
//const HSCBlueSurvey = aladin.newImageSurvey('CDS/P/HSC/DR2/deep/z', {imgFormat: 'fits', colormap: "blue", minCut: -0.01218, maxCut: 2.27397, additive: true, stretch: "asinh"});
|
||||
|
||||
aladin.setBaseImageLayer(gleam072_103);
|
||||
aladin.setOverlayImageLayer(gleam103_134, 'gl2');
|
||||
aladin.setOverlayImageLayer(gleam170_231, 'gl3');
|
||||
|
||||
//aladin.setOverlayImageLayer('CDS/P/HSC/DR2/deep/z', 'hsc blue layer');
|
||||
|
||||
//const c1 = A.catalogFromURL('./data/eso.xml', {onClick: 'showTable'});
|
||||
//aladin.addCatalog(c1);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -12,7 +12,7 @@
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {fullScreen: true, target: "orion", fov: 10, projection: 'SIN', showContextMenu: true});
|
||||
|
||||
const c1 = A.catalogFromURL('./data/eso.xml', {onClick: 'showTable'});
|
||||
const c1 = A.catalogFromURL('./data/votable/eso.xml', {onClick: 'showTable'});
|
||||
aladin.addCatalog(c1);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {fullScreen: true, target: "Abell 194", fov: 180, projection: 'AIT', showContextMenu: true});
|
||||
aladin.setImageSurvey('astron.nl/P/lotss_dr2_high')
|
||||
A.catalogFromSKAORucio("Abell 194", 90, {onClick: 'showTable'}, (cat) => {
|
||||
aladin.addCatalog(cat);
|
||||
});
|
||||
|
||||
/*A.catalogFromURL('https://aladin.cds.unistra.fr/AladinLite/ska/obscoreRucio.xml', {onClick: 'showTable'}, (cat) => {
|
||||
aladin.addCatalog(cat);
|
||||
});
|
||||
|
||||
A.catalogFromURL('data/votable/CDS-B-jcmt-obscore.xml', {onClick: 'showTable'}, (cat) => {
|
||||
aladin.addCatalog(cat);
|
||||
});*/
|
||||
A.catalogFromURL('https://aladin.cds.unistra.fr/ObsCoreRucioScs.xml', {onClick: 'showTable'}, (cat) => {
|
||||
aladin.addCatalog(cat);
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -11,10 +11,10 @@
|
||||
|
||||
A.init.then(() => {
|
||||
// Start up Aladin Lite
|
||||
let aladin = A.aladin('#aladin-lite-div', {survey: "CDS/P/DSS2/color", target: 'Sgr a*', fov: 0.5, showContextMenu: true});
|
||||
let aladin = A.aladin('#aladin-lite-div', {survey: "CDS/P/DSS2/color", target: 'Sgr a*', fov: 0.5, showContextMenu: true, showCooGrid: true});
|
||||
// This table contains a s_region column containing stcs expressed regions
|
||||
// that are automatically parsed
|
||||
aladin.addCatalog(A.catalogFromURL('https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/data/alma-footprints.xml', {name: 'ALMA footprints', onClick: 'showTable'}));
|
||||
aladin.addCatalog(A.catalogFromURL('https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/data/alma-footprints.xml', {name: 'ALMA footprints', onClick: 'showTable', hoverColor: 'lightgreen'}));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
43
examples/al-ui-off.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, height=device-height, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
<div id="aladin-lite-div" style="width: 512px; height: 512px"></div>
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
|
||||
var aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div',
|
||||
{
|
||||
cooFrame: "ICRSd",
|
||||
survey: "data/hips/CDS_P_DSS2_color",
|
||||
target: "05 40 59.12 -02 27 04.1",
|
||||
fov: 2,
|
||||
showSimbadPointerControl: false,
|
||||
showShareControl: false,
|
||||
showContextMenu: false,
|
||||
showCatalog: false,
|
||||
showFov: false,
|
||||
showCooGrid: false,
|
||||
showFrame: false,
|
||||
showCooGridControl: false,
|
||||
showCooLocation: false,
|
||||
showFullscreenControl: false,
|
||||
showLayersControl: false,
|
||||
showProjectionControl: false,
|
||||
showReticle: false,
|
||||
showSettingsControl: false,
|
||||
showStatusBar: false,
|
||||
showZoomControl: false,
|
||||
log: false, // disable the log for the test
|
||||
}
|
||||
);
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
43
examples/al-ui-on.html
Normal file
@@ -0,0 +1,43 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, height=device-height, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
|
||||
</head>
|
||||
<body>
|
||||
<div id="aladin-lite-div" style="width: 512px; height: 512px"></div>
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
|
||||
var aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div',
|
||||
{
|
||||
cooFrame: "ICRSd",
|
||||
survey: "data/hips/CDS_P_DSS2_color",
|
||||
target: "05 40 59.12 -02 27 04.1",
|
||||
fov: 2,
|
||||
showSimbadPointerControl: true,
|
||||
showShareControl: true,
|
||||
showContextMenu: true,
|
||||
showCatalog: true,
|
||||
showFov: true,
|
||||
showCooGrid: true,
|
||||
showFrame: true,
|
||||
showCooGridControl: true,
|
||||
showCooLocation: true,
|
||||
showFullscreenControl: true,
|
||||
showLayersControl: true,
|
||||
showProjectionControl: true,
|
||||
showReticle: true,
|
||||
showSettingsControl: true,
|
||||
showStatusBar: true,
|
||||
showZoomControl: true,
|
||||
log: false, // disable the log for the test
|
||||
}
|
||||
);
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
34
examples/al-v2VSv3.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Trifid interactive map</h1>
|
||||
|
||||
<!-- Aladin Lite container at requested dimensions -->
|
||||
<div id="aladin-lite-div" style="width:700px;height:400px;"></div>
|
||||
|
||||
<!-- our script needs jQuery -->
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.min.js" charset="utf-8"></script>
|
||||
<!-- V2-->
|
||||
<div id="aladin-lite-div-old" style="width:700px;height:400px;"></div>
|
||||
|
||||
<!-- Aladin Lite V2 JS code -->
|
||||
<script type="text/javascript" src="https://aladin.u-strasbg.fr/AladinLite/api/v2/latest/aladin.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var aladinold = A.aladin('#aladin-lite-div-old', {survey: "P/allWISE/color", fov:1.5, target: "14 03 12.583 +54 20 55.5"});
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="./../dist/aladin.umd.cjs" charset="utf-8"></script>
|
||||
|
||||
<!-- Aladin Lite V3 JS code -->
|
||||
<!-- Creation of Aladin Lite instance with initial parameters -->
|
||||
<script type="text/javascript">
|
||||
//import A from '../src/js/A.js';
|
||||
|
||||
let aladin;
|
||||
A.init.then(() => {
|
||||
aladin = A.aladin('#aladin-lite-div', {survey: "P/allWISE/color", fov:1.5, target: "14 03 12.583 +54 20 55.5", });
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -8,15 +8,20 @@
|
||||
|
||||
<script type="module">
|
||||
import A from '../src/js/A.js';
|
||||
import {AladinUtils} from '../src/js/AladinUtils.js';
|
||||
|
||||
A.init.then(() => {
|
||||
let vertices = AladinUtils.HEALPix.vertices(8, 0n)
|
||||
let vertices = A.Utils.HEALPix.vertices(Math.pow(2, 3), BigInt(276))
|
||||
let lonlat = A.Utils.HEALPix.pix2ang(8, 0n)
|
||||
let ipix = A.Utils.HEALPix.ang2pix(8, 0.1, 0.4)
|
||||
console.log("vertices", vertices, lonlat, ipix)
|
||||
|
||||
let lonlat = AladinUtils.HEALPix.pix2ang(8, 0n)
|
||||
|
||||
let ipix = AladinUtils.HEALPix.ang2pix(8, 0.1, 0.4)
|
||||
console.log(vertices, lonlat, ipix)
|
||||
A.Utils.Sesame.resolveAstronomicalName("M101", (o) => {
|
||||
console.log("object found", o)
|
||||
},
|
||||
(err) => {
|
||||
console.error("errr", err)
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
@@ -14,17 +14,16 @@
|
||||
aladin = A.aladin('#aladin-lite-div', {target: "30 0", fov: 360, fullScreen: true, cooFrame: 'galactic', showCooGridControl: true, showSimbadPointerControl: true, showCooGrid: true});
|
||||
aladin.setProjection('AIT');
|
||||
|
||||
|
||||
aladin.on("zoomChanged", () => {
|
||||
console.log("zoomChanged")
|
||||
})
|
||||
aladin.on("positionChanged", ({ra, dec, dragging}) => {
|
||||
console.log("positionChanged", ra, dec)
|
||||
aladin.on("positionChanged", ({ra, dec}) => {
|
||||
console.log('call to aladin', aladin.pix2world(300, 300))
|
||||
console.log('positionChanged in icrs', ra, dec)
|
||||
})
|
||||
|
||||
aladin.gotoRaDec(0, 20);
|
||||
|
||||
|
||||
aladin.on('rightClickMove', (x, y) => {
|
||||
console.log("right click move", x, y)
|
||||
})
|
||||
|
||||
BIN
examples/data/fits/panstarrs-g-m61.fits
Normal file
BIN
examples/data/gw/gw_0.1.fits
Normal file
BIN
examples/data/gw/gw_0.3.fits
Normal file
BIN
examples/data/gw/gw_0.6.fits
Normal file
BIN
examples/data/gw/gw_0.9.fits
Normal file
BIN
examples/data/hips/CDS_P_DSS2_color/Moc.fits
Normal file
BIN
examples/data/hips/CDS_P_DSS2_color/Norder0/Dir0/Npix0.jpg
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder0/Dir0/Npix1.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder0/Dir0/Npix10.jpg
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder0/Dir0/Npix11.jpg
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder0/Dir0/Npix2.jpg
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder0/Dir0/Npix3.jpg
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder0/Dir0/Npix4.jpg
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder0/Dir0/Npix5.jpg
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder0/Dir0/Npix6.jpg
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder0/Dir0/Npix7.jpg
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder0/Dir0/Npix8.jpg
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder0/Dir0/Npix9.jpg
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder1/Dir0/Npix22.jpg
Normal file
|
After Width: | Height: | Size: 8.4 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder1/Dir0/Npix23.jpg
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder2/Dir0/Npix89.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder2/Dir0/Npix94.jpg
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder3/Allsky.jpg
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder3/Dir0/Npix357.jpg
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder3/Dir0/Npix377.jpg
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder4/Dir0/Npix1428.jpg
Normal file
|
After Width: | Height: | Size: 64 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder4/Dir0/Npix1429.jpg
Normal file
|
After Width: | Height: | Size: 49 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder4/Dir0/Npix1430.jpg
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder4/Dir0/Npix1431.jpg
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder4/Dir0/Npix1511.jpg
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder5/Dir0/Npix5712.jpg
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder5/Dir0/Npix5713.jpg
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
examples/data/hips/CDS_P_DSS2_color/Norder5/Dir0/Npix5714.jpg
Normal file
|
After Width: | Height: | Size: 76 KiB |