Compare commits

...

944 Commits
v2 ... vr

Author SHA1 Message Date
Matthieu Baumann
90305de2de test: unbind the layer shaders 2023-10-31 10:58:10 +01:00
ftheurel
1a2451f4d3 Add context to renderer 2023-10-30 15:23:38 +00:00
Matthieu Baumann
f43c4273a1 bugfix: remove direct call of redraw inside fixLayoutDimensions 2023-10-30 15:44:55 +01:00
ftheurel
b201fb69fc Lower level animation implementation
The setAnimationLoop is replaced by call to requestAnimationFrame on the xrSession.
2023-10-30 14:31:25 +00:00
ftheurel
c2047278e4 Test commit 2023-10-23 09:15:25 +00:00
ftheurel
a03fc7a947 Fix Animation
Add bind for the renderer
2023-10-20 12:31:25 +00:00
ftheurel
db74147021 Update al-vr.html 2023-10-19 10:23:15 +00:00
ftheurel
4e0c2e69c5 Add setup VR animation loop 2023-10-19 10:03:50 +00:00
ftheurel
ed135d1306 Replace parameters
Replace the renderer and the animation parameters by the aladin view
2023-10-19 06:50:41 +00:00
ftheurel
b7642b4a81 Add import map and basic scene 2023-10-19 06:48:00 +00:00
ftheurel
6beca88785 Add VRButton to the view
The button is displayed but still can't launch the VR session
2023-10-18 14:15:04 +00:00
Matthieu Baumann
3bd1d4c1f0 first commit on vr branch 2023-10-18 14:50:24 +02:00
Matthieu Baumann
bda3e50a8d do not call update 2x on the hipses, render the raytracer with depth=1 too 2023-09-27 16:23:24 +02:00
Matthieu Baumann
1981721b05 change default background color to 'rgb(60, 60, 60)', fix #106 2023-09-27 15:45:52 +02:00
Matthieu Baumann
09d35f5918 Important commit: modify bundling config to add support older browsers. Should correspond to 2017 2023-09-27 15:37:41 +02:00
Matthieu Baumann
9137effc3a factorize code by handling reversed_longitude directly when projecting. Should fix #115 2023-09-27 15:33:19 +02:00
Matthieu Baumann
0f619156e6 fix animation test by fetching tiles every 700ms when moving. The fetching remains still disabled when inertia is on 2023-09-26 16:52:22 +02:00
Matthieu Baumann
d62720d0bd change version to a bugfix one 2023-09-26 14:30:38 +02:00
Matthieu Baumann
94cad9b878 remove deploy script on git 2023-09-26 11:32:48 +02:00
Matthieu Baumann
dcafbd7b91 revert seeking properties with a txt extension 2023-09-26 11:25:14 +02:00
Matthieu Baumann
c42ac03836 fix polyfill in sin proj 2023-09-22 17:04:51 +02:00
Matthieu Baumann
13a6037882 Polyline: add hpx code to remove drawing lines in between 2 different collinion zone 2023-09-22 17:04:51 +02:00
szpetny
5a90d9705c all sky with polygons HPX MOL - examples added 2023-09-22 17:04:51 +02:00
szpetny
7dec2fd9be A proposal of a new feature - let the polygon to be filled in with a given color with given transparency 2023-09-22 17:04:51 +02:00
szpetny
43a8bf0e6e examples fixed 2023-09-20 19:28:42 +02:00
szpetny
01aff09511 expose mouse coords in callbacks for source/footprint click and hover 2023-09-20 19:28:42 +02:00
Matthieu Baumann
7a52a9f962 Fix #123, difficulty to get the radius in pixel of a circle at the edge of a projection. My solution: I project 4 vertices on the circle lying in the cardinal points N, S, E, W and I take as radius the minimal distance between the circle center and one these vertices lying on the circle 2023-09-14 06:20:07 +02:00
Matthieu Baumann
3bda0fcd75 Merge pull request #118 from szpetny/draw-function-fixes
Small changed regarding drawing a footprint
2023-08-31 16:55:53 +02:00
Matthieu Baumann
d6e753ee85 Merge pull request #117 from szpetny/read-only-catalog
read only catalog option
2023-08-28 15:42:18 +02:00
szpetny
98b0d0dff6 setOverlay added to Footprint bc draw function fails when it is lacking,
improvement - reading lineWidth from overlay if not specified in shape
2023-08-22 16:29:06 +02:00
szpetny
5364eaf124 read only catalog option 2023-08-22 16:08:14 +02:00
Matthieu Baumann
c35c20d241 update the deploy 2023-08-22 14:50:46 +02:00
Matthieu Baumann
be619b3e8c fix relMouseCoords when rightclicking to make the context menu appear again 2023-08-22 14:42:00 +02:00
Matthieu Baumann
62633d01bc fix of a weird resize problem occuring when accessing the gridCanvas. This has been reported by Robin MENEUST from obspm 2023-08-15 18:25:49 +02:00
Matthieu Baumann
bc1096fce3 Aladin lite: v3.2.0
Features:
- The use of vite as a project manager
- Enhance the MOC rendering perf and add possibility to draw the perimeter
- Many fixes such as the footprints rendering for all sky projections
- A line rasterizer enabling the thickness' grid line changes
2023-08-13 14:10:44 +02:00
Matthieu Baumann
7d5696228d remove engines in package json 2023-08-12 19:14:44 +02:00
Matthieu Baumann
08699a9bd5 Merge branch 'develop' into develop 2023-08-12 19:00:28 +02:00
Matthieu Baumann
fc6a09e373 Fix rebase 2023-08-12 15:26:54 +02:00
Matthieu Baumann
a8a86a2952 Merge branch 'develop' into develop 2023-08-12 15:18:38 +02:00
Matthieu Baumann
cc958bfa2d Corrected ESASky link in README
Redo PR #104 commit directly on develop

Co-authored-by: imbasimba <https://www.henriknorman.com>
2023-08-12 15:06:13 +02:00
Matthieu Baumann
6c4ddce6b0 Merge pull request #113 from cds-astro/features/lineRasterizer
Features/line rasterizer
2023-08-12 15:04:17 +02:00
Matthieu Baumann
a4e4ec85af fix tests 2023-08-12 14:57:41 +02:00
Matthieu Baumann
b31bb18027 points to votable repo 2023-08-12 14:51:56 +02:00
Matthieu Baumann
de66d28061 points to forked github repo 2023-08-12 14:20:54 +02:00
Matthieu Baumann
ffdeb0ac2a fix footprints example 2023-08-11 18:16:05 +02:00
Matthieu Baumann
56e6fa80d5 fix lat=0.0 parallel 2023-08-11 15:52:46 +02:00
Matthieu Baumann
31348c12c6 fix some cuts default init problems 2023-08-10 11:35:23 +02:00
onekiloparsec
c1b2bd24b9 Reverting the insertion of /.idea into the gitignore.
It can be anaged individually.
2023-08-03 13:31:34 +02:00
Manon
46573a23da fix draw 2023-08-01 10:08:15 +02:00
Matthieu Baumann
3bba90f3d1 adapt tests 2023-07-28 13:31:34 +02:00
Matthieu Baumann
c58876e21d remove some logs 2023-07-28 13:31:34 +02:00
Matthieu Baumann
9ef1f2ac09 cargo fix 2023-07-28 13:31:34 +02:00
Matthieu Baumann
a2a09c7506 fix fill MOC 2023-07-28 13:31:34 +02:00
Matthieu Baumann
bd9845fab1 Enhance moc render with new optional parameter: perimeter, edge (default) and fill, with a fillColor javascript param 2023-07-28 13:31:34 +02:00
Matthieu Baumann
bb7513a959 wip perimeter moc draw 2023-07-28 13:31:34 +02:00
Matthieu Baumann
526cf51c4c enhance grid wip 2023-07-28 13:31:34 +02:00
Matthieu Baumann
163dd7d762 first commit 2023-07-28 13:31:34 +02:00
Cédric Foellmi
121f4345bc Update src/js/gui/ContextMenu.js
Fixed the missing canvas parameter of the refactored `relMouseCoords` function.

Co-authored-by: Matthieu Baumann <baumannmatthieu0@gmail.com>
2023-07-19 04:01:47 +02:00
Cédric Foellmi
0665f2b65f Update src/js/View.js
Fixed the missing canvas parameter of the refactored `relMouseCoords` function.

Co-authored-by: Matthieu Baumann <baumannmatthieu0@gmail.com>
2023-07-19 04:01:38 +02:00
Cédric Foellmi
a58fb1dd8a Update src/js/View.js
Fixed the missing canvas parameter of the refactored `relMouseCoords` function.

Co-authored-by: Matthieu Baumann <baumannmatthieu0@gmail.com>
2023-07-19 04:01:29 +02:00
Cédric Foellmi
466472a1a7 Update src/js/View.js
Fixed the missing canvas parameter of the refactored `relMouseCoords` function.

Co-authored-by: Matthieu Baumann <baumannmatthieu0@gmail.com>
2023-07-19 04:01:14 +02:00
Cédric Foellmi
540f4e33be Update src/js/View.js
Fixed the missing canvas parameter of the refactored `relMouseCoords` function.

Co-authored-by: Matthieu Baumann <baumannmatthieu0@gmail.com>
2023-07-19 04:01:04 +02:00
Cédric Foellmi
0b92b6d1db Update src/js/GenericPointer.js
Fixed the missing canvas parameter of the refactored `relMouseCoords` function.

Co-authored-by: Matthieu Baumann <baumannmatthieu0@gmail.com>
2023-07-19 04:00:38 +02:00
Cédric Foellmi
06dcc126f9 Fixed import
Signed-off-by: Cédric Foellmi <cedric@onekiloparsec.dev>
2023-07-18 12:11:16 +02:00
Cédric Foellmi
04e552b7c3 Making a first test passing!
Signed-off-by: Cédric Foellmi <cedric@onekiloparsec.dev>
2023-07-18 12:11:16 +02:00
Cédric Foellmi
1bee9c8b77 Ignoring .idea (PyCharm/WebStorm)
Signed-off-by: Cédric Foellmi <cedric@onekiloparsec.dev>
2023-07-18 12:11:16 +02:00
Cédric Foellmi
c77f2aeda8 Making a dedicated dependency-free Constants file to avoid Utils import Aladin.js!
Signed-off-by: Cédric Foellmi <cedric@onekiloparsec.dev>
2023-07-18 12:11:16 +02:00
Cédric Foellmi
57c1b8423d Linting
Signed-off-by: Cédric Foellmi <cedric@onekiloparsec.dev>
2023-07-18 12:11:16 +02:00
Cédric Foellmi
ebf2d06f31 Using the Utils methods also in the examples
Signed-off-by: Cédric Foellmi <cedric@onekiloparsec.dev>
2023-07-18 12:11:16 +02:00
Cédric Foellmi
5d0ec40612 Fixing imports
Signed-off-by: Cédric Foellmi <cedric@onekiloparsec.dev>
2023-07-18 12:11:16 +02:00
Cédric Foellmi
82b2eb0423 Using the new Utils method
Signed-off-by: Cédric Foellmi <cedric@onekiloparsec.dev>
2023-07-18 12:11:16 +02:00
Cédric Foellmi
2dc6f17c7d Renaming Utils.js into Utils.ts and correcting related imports.
Note that the content of Utils.ts has also been changed. More pecisely:

- `relMouseCoords` has been set as a function of the Utils object, to avoid attaching it to canvas prototype. This was very custom way of doing, and makes testing very complicated to run, while providing no real value.

- Removed the jQuery dependency and made `urlParam` a function of the Utils object.

- Added some types when possible / easy. But TS already reveal the misuse of some function sur as `parseInt` and `parseFloat` (which act on strings, not numbers)

Signed-off-by: Cédric Foellmi <cedric@onekiloparsec.dev>
2023-07-18 12:11:15 +02:00
Cédric Foellmi
402e270015 Introducing typescript & vitest
In order to push upward the code quailty of the Javascript code, I propose to introduce Typescript and Vitest for writing unit tests.

This first commit simply introduce the right dependencies and configuration.

Note the presence of “happy-dom” dev dep for manipulating the window object (which is involved in the first test written on Utils).

Signed-off-by: Cédric Foellmi <cedric@onekiloparsec.dev>
2023-07-18 12:07:21 +02:00
Matthieu Baumann
7cfbb83883 Add possibility to download the PNG export from javascript API 2023-07-11 10:53:07 +02:00
MARCHAND MANON
ba8acf4a99 fix color of context menu 2023-07-04 18:25:12 +02:00
MARCHAND MANON
d570301b1d add the target button in svg format 2023-07-04 18:25:12 +02:00
Matthieu Baumann
41f381ab2b add filter option for Catalog object #80 2023-06-06 10:26:37 +02:00
Matthieu Baumann
dbf8c8dbeb remove terser from dev dep 2023-05-26 18:51:07 +02:00
Matthieu Baumann
5ef2991310 Conditional export for CJS (require)
Requested in #93

Co-authored-by: diego-ge
2023-05-26 18:47:57 +02:00
Matthieu Baumann
aa9dfe632e change the deploy 2023-05-26 18:43:40 +02:00
Matthieu Baumann
78ff815e9b npm pack 2023-05-26 18:35:21 +02:00
Matthieu Baumann
ead34d5944 add formats info 2023-05-26 18:16:02 +02:00
Matthieu Baumann
d363882308 update workflow 2023-05-26 18:16:02 +02:00
Matthieu Baumann
a80bff6289 use the umd version for index.html 2023-05-26 18:16:02 +02:00
Matthieu Baumann
05ddeb8f7d include only js files into the npm package 2023-05-26 18:16:02 +02:00
bmatthieu3
6cce07cdfd update ci [ci skip] 2023-05-26 18:16:02 +02:00
bmatthieu3
eedb5b2bdf npm install and source rustup 2023-05-26 18:16:02 +02:00
bmatthieu3
4cf94eaf1a add some ci (TO TEST) 2023-05-26 18:16:02 +02:00
bmatthieu3
fbb4d760a4 remove webpack config file 2023-05-26 18:16:02 +02:00
bmatthieu3
30b87b2464 update readme 2023-05-26 18:16:02 +02:00
bmatthieu3
54bb0be16e update readme with new npm usage instructions 2023-05-26 18:16:02 +02:00
bmatthieu3
4808f84b37 fix: import A when it is necessary 2023-05-26 18:16:02 +02:00
bmatthieu3
fa52c39d7c update readme 2023-05-26 18:16:02 +02:00
bmatthieu3
bcfe829b03 use vite producing es and umd aladin lite module types. The umd is consistent with what is being used since a long time (including manually the aladin lite script) 2023-05-26 18:16:02 +02:00
bmatthieu3
6b0f4e4b60 Commit related to PR #90. We first check the clockwise order of the footprints in the celestial space first. 2023-05-23 11:46:01 +02:00
bmatthieu3
eaebc78cb7 update to fitsrs 0.2.9 2023-05-22 16:41:54 +02:00
bmatthieu3
9b3f4e8803 unrelated to this PR: the rust code handles the -pi -> pi to 0 -> 360deg ra remapping 2023-05-22 15:56:01 +02:00
Henrik Norman
44ac866ce6 Removed block of context menus. Also added handling of touchcancel
Co-authored-by: bmatthieu3 <matthieu.baumann@astro.unistra.fr>
2023-05-22 15:56:01 +02:00
Matthieu Baumann
34aa6faa89 Merge pull request #90 from cds-astro/removeCrossingPolygonEdges
check for ccw order for every 3 vertices
2023-05-20 00:10:39 +02:00
bmatthieu3
42243edf65 check for ccw order for every 3 vertices 2023-05-19 23:59:39 +02:00
Matthieu Baumann
7833ffd9da Merge pull request #48 from imbasimba/customizationOfShapes
Customize colors, sizes, and shape types
2023-05-17 18:01:26 +02:00
Henrik Norman
861c224c7a Customize colors, sizes, and shape types
Co-authored-by: bmatthieu3 <matthieu.baumann@astro.unistra.fr>
2023-05-17 17:56:54 +02:00
Matthieu Baumann
f2daa68054 Merge pull request #44 from imbasimba/moreEvents
Added events for mouse move & coordinate frame change
2023-05-17 15:14:27 +02:00
bmatthieu3
44343e36bb closest objects needs to be done at every mousemove to change the pointer. 2023-05-17 15:07:54 +02:00
bmatthieu3
fde0b5bc68 right click move new event listener that replaces the change of cuts 2023-05-17 14:37:30 +02:00
bmatthieu3
57774e8aed call positionChanged callback when inerting too 2023-05-17 14:12:52 +02:00
Matthieu BAUMANN
f96a3667bc Create an objectHoveredStop with the object that we do not hover event instead of calling objectHovered with null 2023-05-17 14:12:50 +02:00
Henrik Norman
4ae7edb6e9 Added events for mouse move & coordinate frame change
Co-authored-by: bmatthieu3 <matthieu.baumann@astro.unistra.fr>
2023-05-17 14:11:19 +02:00
bmatthieu3
923efe3133 wait for the properties to be fetched before determining if sesame or the planetary name solver must be called 2023-05-17 13:39:25 +02:00
bmatthieu3
e7a098c257 do not compute closest object when the objectHovered or footprintHovered is not defined 2023-05-17 13:34:12 +02:00
Matthieu Baumann
2678750643 Merge pull request #42 from imbasimba/noHoverOnHiddenFootprints
Hidden footprints can no longer be considered as closest
2023-05-16 22:41:04 +02:00
Henrik Norman
4ad1963ee1 Hidden footprints can no longer be considered as closest
Co-authored-by: bmatthieu3 <matthieu.baumann@astro.unistra.fr>
2023-05-16 22:37:53 +02:00
Matthieu Baumann
12aa7fe117 Merge pull request #87 from cds-astro/resolveHoverFootprints
Resolve hover footprints
2023-05-16 22:18:33 +02:00
bmatthieu3
910678aa84 select footprints 2023-05-16 21:58:26 +02:00
bmatthieu3
0441726f1f hover footprints 2023-05-16 16:46:23 +02:00
bmatthieu3
d192f0cedc fix hovering footprint 2023-05-16 15:54:29 +02:00
Matthieu Baumann
140ec0d409 Merge pull request #58 from szpetny/errCallbackForCatalogFromURL
handle error inside catalogFromURL
2023-05-16 10:24:55 +02:00
bmatthieu3
706ea7a672 Add error callback for catalogFromVizier, catalogFromSimbad/NED/SkyBot. Use the proxy for NED queries
Co-authored-by: szpetny <>
2023-05-16 10:22:37 +02:00
bmatthieu3
c18c586f5d fix: artefacts cell projection 2023-05-15 13:59:06 +02:00
Matthieu Baumann
1ba13cb3ca Merge pull request #85 from cds-astro/background-color
Set background color api
2023-05-14 21:37:55 +02:00
bmatthieu3
b517ad74c0 set background color from api and send special color changed event 2023-05-14 20:17:04 +02:00
bmatthieu3
849b1d45a1 request for s_region when querying a vizier table by a cone search 2023-05-14 11:15:00 +02:00
Matthieu BAUMANN
e96b11c5e2 uniformize css a little bit 2023-05-08 20:44:14 +02:00
Matthieu BAUMANN
41b31db949 cut too long layer label names with ... 2023-05-08 16:36:41 +02:00
Matthieu BAUMANN
c7ae41948e fix: possibility to pass a unique Source object to addSources 2023-05-08 10:00:54 +02:00
Matthieu BAUMANN
e7781b97ed fix: rewrite table header when changing the tab 2023-05-08 00:20:13 +02:00
Matthieu BAUMANN
89778fc0f3 vizier option to return all the columns of the table 2023-05-07 23:19:29 +02:00
Matthieu BAUMANN
af0ea6b578 make aladin lite indicator css self contained 2023-05-07 11:05:38 +02:00
Matthieu BAUMANN
99634bb23d download file by default when the access_format is not recognized 2023-05-06 20:40:49 +02:00
Matthieu BAUMANN
6178bfd201 readd rainbow colormap 2023-05-06 19:11:09 +02:00
Matthieu BAUMANN
98e055b78a change ui 2023-05-06 18:46:10 +02:00
Matthieu BAUMANN
45a53cd57e fix: do not draw 2 times order3sources if maxOrderAllsky=2 2023-05-06 17:01:31 +02:00
Matthieu BAUMANN
60c7909b25 create catalog fields in addSources if not computed before 2023-05-05 23:13:41 +02:00
Matthieu BAUMANN
2a617849d2 fix case where base layer is an ImageFITS. It was entering planet case because isPlanetaryBody is undefined which is !== false 2023-05-05 13:06:42 +02:00
Matthieu Baumann
c661e03e90 Merge pull request #74 from bmiszalski/progcat_shape_func
Allows HiPS cat to use shape function
2023-05-05 12:56:48 +02:00
Matthieu BAUMANN
4a3a8c0c4f remove need of jquery, move the restoring of the canvas after all drawSources have been called
Co-authored-by: Brent Miszalski <bmiszalski@gmail.com>
2023-05-05 12:46:13 +02:00
Brent Miszalski
fc4459dc58 Allows HiPS cat to use shape function 2023-05-05 12:34:19 +02:00
Matthieu BAUMANN
974118ad21 progressive cat: limit the number of tiles to fetch by contraining the norder to lower orders 2023-05-05 12:33:54 +02:00
Manon
b3e119a43b Add popup on no match (#79)
* add popup when no match is found with the pointers

* move degreesToString from coo.js to AladinUtils

* apply Matthieu's comments

---------

Co-authored-by: bmatthieu3 <baumannmatthieu0@gmail.com>
2023-05-05 11:33:29 +02:00
Matthieu BAUMANN
868ac7be79 fix addSourcesAsArray used by ipyaladin. Set the fields for the catalog 2023-05-04 19:44:54 +02:00
Matthieu BAUMANN
390f7ea20f add load fits image option in ctx right click menu 2023-05-03 12:24:39 +02:00
Matthieu BAUMANN
1488c078e4 fix: use HMS for parallel grid labels 2023-05-03 12:16:43 +02:00
Matthieu BAUMANN
6f789a0619 FITS query: disable using the proxy for the moment (until https://github.com/MattiasBuelens/wasm-streams/issues/20 is solved). Tell the user that fetching may fail because of CORS headers not set and that he can open its fits file by first manually download it and then open it in aladin lite 2023-05-03 11:49:20 +02:00
Matthieu BAUMANN
611b1c7777 restore utils 2023-05-02 17:42:16 +02:00
Matthieu BAUMANN
acf64f3fed use votable 0.2.3 to make the coronelli example pass 2023-05-02 17:38:29 +02:00
Matthieu BAUMANN
e8acc581bf update to votable 0.2.2 2023-05-02 11:07:28 +02:00
Matthieu BAUMANN
89948e6461 fix css for too long labels 2023-05-01 14:30:55 +02:00
Matthieu BAUMANN
e24cbb87d6 fix some bugs. Still there are some errors to fix with the new votable parser 2023-05-01 13:32:21 +02:00
Matthieu BAUMANN
6440697cb1 simplify setOverlayImageLayer and newImageSurvey 2023-04-27 18:28:03 +02:00
Matthieu BAUMANN
506a9669c0 add hips located 2023-04-27 18:16:44 +02:00
Matthieu BAUMANN
cfc7dbda4a fix some bugs: still votables error to fix 2023-04-27 18:15:35 +02:00
Matthieu BAUMANN
69ae41942d hms angle serialization format 2023-04-27 13:56:18 +02:00
Matthieu BAUMANN
b8847be007 fix: wcs galactic 2023-04-26 17:32:59 +02:00
Matthieu BAUMANN
c289ececf6 add previous from datalink to obscore 2023-04-26 14:19:02 +02:00
Matthieu BAUMANN
c35d8e4e8c shorten table name in measurement table 2023-04-26 11:35:20 +02:00
Matthieu BAUMANN
a58ade5801 add update objectslookup when not dragging in the touchmove event 2023-04-24 16:42:31 +02:00
Matthieu BAUMANN
3c1c01a43e wip 2023-04-24 16:42:31 +02:00
Matthieu BAUMANN
1bf97b66ff previous next states for obscore table 2023-04-24 16:42:31 +02:00
Matthieu BAUMANN
9c8ccbb920 Enhance measurement table to select sources coming from different catalog 2023-04-24 16:42:29 +02:00
Matthieu BAUMANN
7efb4e786e obscore fields reconize 2023-04-24 16:42:16 +02:00
Matthieu BAUMANN
d520de061f simplify shapes 2023-04-24 16:42:14 +02:00
Matthieu BAUMANN
bb245eb577 first commit 2023-04-24 16:40:30 +02:00
Matthieu BAUMANN
2e8ecb5fe6 remove backface/frontface culling as it is done by the iterator 2023-04-24 15:20:19 +02:00
Thomas Boch
b22f822f6a Add HiPS2FITS option to contextual menu 2023-04-13 17:21:21 +02:00
Thomas Boch
2993dc2f7c Contextual menu now enables addition of new catalogue layer 2023-04-13 08:59:25 +02:00
Thomas Boch
7d79597c0d Fix color bug for polyline. Color of the graphicOverlay was ignored 2023-04-13 08:35:55 +02:00
Thomas Boch
dd5c35d8ed Fix context menu 2023-04-04 16:14:47 +02:00
Thomas Boch
935e380684 New feature: add context menu, activable with showContextMenu option 2023-04-04 15:55:31 +02:00
Thomas Boch
9080644f18 New feature: Add context menu (on right click) 2023-03-30 17:22:51 +02:00
Thomas Boch
6028aa92f4 Add comment on west increasing bodies 2023-03-29 14:03:08 +02:00
Thomas Boch
c8fce0d6c1 Planetary features: take into account bodies with west increasing lon 2023-03-28 15:09:11 +02:00
Thomas Boch
c5fe7d672e Bug fix: add conditions in init phase 2023-03-27 15:44:30 +02:00
Thomas Boch
2a7d735f8a Add Pluto radius 2023-03-27 14:02:24 +02:00
Matthieu BAUMANN
6e71379f92 precompute cuts 2023-03-24 17:04:41 +01:00
Thomas Boch
1b16e0b5bf Working name resolver for planetary features 2023-03-24 15:41:06 +01:00
Matthieu BAUMANN
d3f01c6f0b fix refresh bugs, remove link of the old css in examples 2023-03-23 15:54:06 +01:00
Thomas Boch
e28776d15c Add new planetary bodies radii 2023-03-23 15:40:20 +01:00
Thomas Boch
270c24cc8c Working version of planetary features pointer 2023-03-23 14:38:25 +01:00
Thomas Boch
adeab7a3f9 WIP: planetary features pointer 2023-03-22 16:49:59 +01:00
Matthieu BAUMANN
2d87c818f3 v3.1.0 2023-03-22 16:30:57 +01:00
Matthieu Baumann
ad1e3e02d9 Merge pull request #70 from cds-astro/fits_ext
Starting fits support
2023-03-22 16:26:58 +01:00
Thomas Boch
308b8e3bd4 Update Simbad pointer URLs to cds.unistra and https:// scheme 2023-03-22 14:55:11 +01:00
Matthieu BAUMANN
7c2bc041e7 add some css: scrollbar 2023-03-22 14:30:04 +01:00
Matthieu BAUMANN
e8466800f8 change coo grid panel: enable the grid with only one clic on the coo grid button. Display the panel after a long time press 2023-03-22 12:10:03 +01:00
Matthieu BAUMANN
79b261fd55 add recompute vertices for image as well 2023-03-22 09:25:45 +01:00
Matthieu BAUMANN
303f856fd1 loading 2023-03-22 00:21:27 +01:00
Matthieu BAUMANN
371bf426a7 fits commit 2023-03-20 11:38:48 +01:00
Matthieu BAUMANN
5c56f35616 fix inertia + focus button on the fits 2023-03-17 18:34:21 +01:00
Matthieu BAUMANN
4db1c875a3 remove bad log 2023-03-15 00:57:55 +01:00
Matthieu BAUMANN
177f82f95d several response from the mocserver handling 2023-03-15 00:20:20 +01:00
Matthieu BAUMANN
e82ad29350 remove unused 2023-03-14 23:57:42 +01:00
Matthieu BAUMANN
b8c45ee5c1 can display fits > 1go 2023-03-14 23:48:24 +01:00
Matthieu BAUMANN
36933ff6ac async fits parsing ok 2023-03-14 23:48:24 +01:00
Matthieu BAUMANN
125de63f5e fix: image survey format 2023-03-14 23:48:24 +01:00
Matthieu BAUMANN
d16e196fb5 wip cors domain handling 2023-03-14 23:48:24 +01:00
Matthieu BAUMANN
edb412ab8a drag and drop of fits files 2023-03-14 23:48:24 +01:00
Matthieu BAUMANN
3ac6016c56 wip load local fits files 2023-03-14 23:48:24 +01:00
Matthieu BAUMANN
fdab5f2860 refac View.js 2023-03-14 23:48:24 +01:00
Matthieu BAUMANN
4a9fb670b8 wip: fits image support 2023-03-14 23:48:24 +01:00
Matthieu BAUMANN
0430e8bb22 add ImageFITS structure 2023-03-14 23:48:24 +01:00
Matthieu BAUMANN
3963fce64a make the search for properties run async 2023-03-14 23:48:23 +01:00
Matthieu BAUMANN
35c49c2063 run tests 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
1846e9b3a4 update ui, remove direct access to aladin.view attributes 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
0ccca95e9c wip: testing new overlay system 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
4c43f8bb52 fix coronelli example 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
dfbf8c33e6 fix progressive cat, remove depth on Layers struct 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
458a2ed36f Warning: remove zoom when setting surveys 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
5857e807f7 GUI: change sat, contrast and brightness to sliders 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
a80739e458 change cuts with rightclick 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
670c79d065 rightclick behaviour for hips color 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
163a8faf38 wip: imagecolor refac, imagesurvey object refac 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
a2188b8d65 isolate image color config into one specific file 2023-02-17 19:21:31 +01:00
Thomas Boch
029f72f53a Bug fix: catalog selector did not show in full screen 2023-02-17 19:21:31 +01:00
Thomas Boch
390fce46ec Bug fix: HiPS selector did not show sugestions in full screen mode 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
8785d58b1e update package.json 2023-02-17 19:21:31 +01:00
Thomas Boch
bc1e3ad921 Fix getShareURL method 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
3a57cbac1a AladinLiteSrc -> AladinLiteAssets 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
90f5c9b8d4 add survey option to successcallback of displayFITS 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
f9b35037ef fix change of url for the mirrors 2023-02-17 19:21:31 +01:00
Matthieu BAUMANN
5fe990c9eb update readme with the v3 2023-01-31 18:15:45 +01:00
Thomas Boch
1a45d9c602 feat: update getEmbed to link to v3 2023-01-31 18:15:44 +01:00
Matthieu BAUMANN
be17058b24 Merge branch 'develop' 2023-01-30 15:18:45 +01:00
Matthieu BAUMANN
0d49fbae56 add AladinLiteSrc.tar.gz in the build pipeline 2023-01-30 15:11:46 +01:00
Matthieu BAUMANN
7773b14bcd add a method for getting the colormaps 2023-01-30 14:25:04 +01:00
Thomas Boch
9477bcbda6 cleanup for sharing feature 2023-01-30 14:18:20 +01:00
Thomas Boch
26cd8436f9 feat: new API method addListener 2023-01-30 14:12:01 +01:00
Thomas Boch
f046f7e3ca Bug fix: HiPS and cat selectors lists no more shifted when not in full screen 2023-01-30 13:33:52 +01:00
Matthieu BAUMANN
fcf5c65747 fix: planetary surveys pinched rotation 2023-01-28 09:47:10 +01:00
Matthieu BAUMANN
8d6799bb6c draw and update fits images inside the layers class 2023-01-28 05:57:24 +01:00
Matthieu BAUMANN
a61f355a62 remove unused and commented code 2023-01-28 05:56:05 +01:00
Matthieu BAUMANN
f9dedbaf5d do not cache received tiles that do not belong to any surveys in the view 2023-01-28 05:55:18 +01:00
Matthieu BAUMANN
ae592fb4e0 fix: Handle pinched rotation for planetary surveys 2023-01-28 05:54:01 +01:00
Matthieu BAUMANN
897ab68a95 fix https context 2023-01-27 16:48:36 +01:00
Matthieu BAUMANN
01fb348a86 Merge branch 'fits_support' into develop2 2023-01-27 15:50:47 +01:00
Matthieu BAUMANN
388b541b89 package command: npm run package-tar 2023-01-27 15:39:51 +01:00
Matthieu BAUMANN
d0227fc387 tex sub when the camera is stopped 2023-01-27 15:16:11 +01:00
Matthieu BAUMANN
302ab4c770 evaluate the percentiles with a quickselect 2023-01-27 09:45:49 +01:00
Matthieu BAUMANN
c79256ed7e fix mirror testing, disable cache when querying the properties for each mirror 2023-01-26 06:53:20 -08:00
Matthieu BAUMANN
f989e56895 rename example fits image 2023-01-26 06:52:05 -08:00
Matthieu BAUMANN
7bd353ca94 use wcs lib on crates.io 2023-01-26 06:51:30 -08:00
Matthieu BAUMANN
c788b8b2d1 Hide fits image wip dev 2023-01-26 06:51:03 -08:00
Matthieu BAUMANN
08f592af38 update gitignore 2023-01-26 01:52:57 -08:00
Matthieu BAUMANN
fd1393b639 wip fits support 2023-01-26 01:51:59 -08:00
Matthieu BAUMANN
f8c74f275f refer to master branch of fitsrs 2023-01-02 17:33:13 +01:00
Matthieu BAUMANN
c09e5dde18 Rewrite Utils.loadFromMirrors using the fetch API instead of doing an jquery
ajax request

Change all the code using this method everywhere as it now return a promise that can
be catched
2022-12-22 12:10:44 +01:00
Matthieu BAUMANN
f5dd1f27aa fix tan proj when screen height > width 2022-12-21 15:57:01 +01:00
Matthieu BAUMANN
a551efff78 add comment 2022-12-21 14:52:38 +01:00
Matthieu BAUMANN
29c91acb0f remove vscode workspace 2022-12-21 14:51:48 +01:00
Matthieu BAUMANN
3f8e8542d2 fix warnings 2022-12-21 14:48:12 +01:00
Matthieu BAUMANN
34c8cef482 projection wip 2022-12-21 14:12:40 +01:00
Matthieu BAUMANN
21e8f0e314 propagate shader compiling/linking errors 2022-12-08 11:08:25 +01:00
Matthieu BAUMANN
02b259d360 move jquery dep to npm 2022-12-08 10:04:12 +01:00
Matthieu BAUMANN
731fb25902 hide delete layer for base layer 2022-12-07 17:07:13 +01:00
Matthieu BAUMANN
2719e22baa opti: do not render surveys behind opaque surveys 2022-12-07 16:29:11 +01:00
Matthieu BAUMANN
3127ec31ef opti: background color when not allsky full screen rendering, fix bug: jpeg missing tiles 2022-12-07 16:29:11 +01:00
Thomas Boch
6f4b3c02a1 Merge branch 'develop' of https://github.com/cds-astro/aladin-lite into develop 2022-12-07 10:20:21 +01:00
Thomas Boch
f2b5f290c4 Add example: animation for some of the HiPS created in 2022 2022-12-07 10:19:48 +01:00
Matthieu BAUMANN
d719355742 fix ui change 2022-12-07 09:53:58 +01:00
Matthieu BAUMANN
a12bb63ff6 update aladin options css 2022-12-06 21:58:02 +01:00
Matthieu BAUMANN
34feceedd5 HiPSLayer store the color 2022-12-05 14:10:26 +01:00
Matthieu BAUMANN
c23e7faf4c modify format settings 2022-12-05 11:55:40 +01:00
Matthieu BAUMANN
47c4b5ee35 dissociate update meta from update color 2022-12-05 11:34:37 +01:00
Matthieu BAUMANN
04f0acc4b2 add gw mocs fits files for the gw example 2022-12-05 11:16:25 +01:00
Matthieu BAUMANN
7669c4a71d add .gitignore 2022-12-05 11:14:55 +01:00
Matthieu BAUMANN
8998d43d99 wip set colormap on colored survey 2022-12-04 18:06:24 +01:00
Thomas Boch
325536f064 Improvement: better coo display (no more jittering), and copy to clipboard 2022-11-29 15:47:00 +01:00
Thomas Boch
b50d001876 Merge branch 'develop' of https://github.com/cds-astro/aladin-lite into develop 2022-11-29 13:13:51 +01:00
Thomas Boch
f748b7f858 Bug fix: data selectors are now visible in "real" full screen mode 2022-11-29 13:13:00 +01:00
bmatthieu3
6ef496d5d7 fix: return error when fits tile are retrieved with bad status code 2022-11-24 12:09:59 +01:00
Thomas Boch
24016dcd32 Force location box to J2000d if planetoid 2022-11-23 16:07:12 +01:00
bmatthieu3
a2cdc63929 revert back to grayscale colormap when the user ask for one that is not supported 2022-11-22 17:30:18 +01:00
bmatthieu3
e9a60d9378 change colormap names 2022-11-22 15:11:03 +01:00
bmatthieu3
524b867cc5 rebuild with newest fitrs lib, fix colormaps, and remove panicking when parsing fits files 2022-11-22 14:56:13 +01:00
bmatthieu3
34c1413993 do not panic when parsing fits files 2022-11-22 13:28:18 +01:00
bmatthieu3
82a65f38b2 check example before deploy 21/11/22 2022-11-21 11:36:45 +01:00
Matthieu BAUMANN
4d60fecbc2 add default value of label size slider to 1 2022-11-20 10:24:11 +01:00
Matthieu BAUMANN
1b5894dbce simplify api to create a new image survey object: newImageSurvey 2022-11-20 10:10:42 +01:00
Matthieu BAUMANN
af690c5e13 add reverse longitude 2022-11-19 15:08:49 +01:00
bmatthieu3
4f38461dde limit to 60fps the rendering 2022-11-18 17:06:05 +01:00
bmatthieu3
a843033e78 Merge remote-tracking branch 'cdsastro/develop' into fitsimg 2022-11-17 14:00:13 +01:00
bmatthieu3
1baac57452 use fitsrs updated 2022-11-17 13:54:22 +01:00
bmatthieu3
f2d5ea9929 Merge branch 'develop' of https://github.com/cds-astro/aladin-lite into develop 2022-11-16 22:26:45 +01:00
bmatthieu3
e57d37ccbd parse async the fits files received but it does not work, the stream is locked and releasing it is a feature that is not supported by safari.... I will parse it sync unfortunately 2022-11-16 22:15:32 +01:00
bmatthieu3
bde45b2b8e wip: update fitsrs 2022-11-15 19:25:40 +01:00
Matthieu BAUMANN
3ae95f0f6e Display more refined mocs 2022-11-10 01:27:42 +01:00
Matthieu BAUMANN
c1f68d7a8b fix labels and optimization 2022-11-10 01:17:47 +01:00
bmatthieu3
2b48060f23 Merge branch 'fitsimg' of https://github.com/cds-astro/aladin-lite into fitsimg 2022-11-09 18:22:40 +01:00
Matthieu BAUMANN
e534b0b6e5 disable scissor for a moment, this causes strange artefacts for safari 13.x and 14.1 2022-11-07 16:35:02 +01:00
Matthieu BAUMANN
f32a2da488 debug scissor safari 14.x 2022-11-07 15:00:46 +01:00
Matthieu BAUMANN
2dbe0ae9f5 shrink to fit vectors 2022-11-07 13:54:47 +01:00
Matthieu BAUMANN
784b60e70d compute depth tile in camera viewport 2022-11-03 17:31:02 +01:00
Matthieu BAUMANN
a2c04a13de adjust trackpad detection 2022-10-30 15:07:14 +01:00
Matthieu BAUMANN
b11caab87f scissor, zoom refac 2022-10-30 12:32:34 +01:00
Matthieu BAUMANN
3075f70391 tan proj fovlimit=90deg, new gridOptions param 2022-10-29 16:12:14 +02:00
Matthieu BAUMANN
1320dfcfb5 Merge branch 'develop' of https://github.com/cds-astro/aladin-lite into develop 2022-10-29 15:14:00 +02:00
Matthieu BAUMANN
fd86576f73 add script showing a big zoom from panstaars to jwst on stephan's quintet 2022-10-29 12:16:00 +02:00
Matthieu BAUMANN
4e33ea1b6b set rotation + tan change 2022-10-29 12:16:00 +02:00
Matthieu BAUMANN
18ceda57c8 set default background color to blue 2022-10-29 12:16:00 +02:00
Matthieu BAUMANN
27ff27fd9c zooming heuristic for touchpad and detection 2022-10-29 12:15:24 +02:00
Matthieu BAUMANN
dbca6db9ab add script showing a big zoom from panstaars to jwst on stephan's quintet 2022-10-29 01:43:59 +02:00
Matthieu BAUMANN
d2fc121b4a set rotation + tan change 2022-10-29 01:42:35 +02:00
Matthieu BAUMANN
10f1401570 set default background color to blue 2022-10-28 17:33:43 +02:00
Matthieu BAUMANN
7011b0cc81 zooming heuristic for touchpad and detection 2022-10-28 17:27:52 +02:00
Matthieu BAUMANN
e8ecbf55c7 zooming heuristic for touchpad and detection 2022-10-28 17:26:46 +02:00
Matthieu BAUMANN
3cef95effb rewrite grid 2022-10-28 16:34:55 +02:00
Matthieu BAUMANN
b8f8ba3bc1 simplify wasm loading 2022-10-27 19:07:48 +02:00
Matthieu BAUMANN
e72120a50b handle CD instead of CDELT+PC 2022-10-26 21:29:01 +02:00
Matthieu BAUMANN
6ee8f1bfe0 wip proj, deproj 2022-10-26 20:30:33 +02:00
Matthieu BAUMANN
95f72a8e65 wip: tan projection 2022-10-26 16:43:23 +02:00
Matthieu BAUMANN
8773f3f395 Extract a WCS from the fits image 2022-10-26 16:43:23 +02:00
Matthieu BAUMANN
481094bf9e first commit 2022-10-26 16:43:23 +02:00
Matthieu BAUMANN
92c8238465 add showProjectionControl option 2022-10-26 15:42:21 +02:00
Matthieu BAUMANN
e0d9826eef fix touch events 2022-10-26 14:09:07 +02:00
Matthieu BAUMANN
5c14530f54 fix color ui element 2022-10-25 19:53:16 +02:00
Matthieu BAUMANN
eddf034628 set DSS color as the default survey if no surveys asked are matching 2022-10-25 19:53:16 +02:00
Matthieu BAUMANN
b6fa734779 fix projection box when init the projection through the aladin lite constructor options 2022-10-25 19:53:16 +02:00
Matthieu BAUMANN
1218c0d630 fix inertia velocity div by 0 2022-10-25 13:32:27 +02:00
Matthieu BAUMANN
75010e1af2 wip proj, deproj 2022-10-24 22:27:10 +02:00
Matthieu BAUMANN
f03cc73e03 wip: tan projection 2022-10-24 20:55:15 +02:00
Matthieu BAUMANN
6f64b1ef73 Extract a WCS from the fits image 2022-10-24 18:24:18 +02:00
Matthieu BAUMANN
82a922626b first commit 2022-10-24 18:24:18 +02:00
Matthieu BAUMANN
78a7553d5e fix line projection call stack max 2022-10-24 18:18:26 +02:00
Matthieu BAUMANN
09e4b2273e only deploy for the dev mode 2022-10-24 11:58:55 +02:00
Matthieu BAUMANN
db29ba3c52 add deploy debug 2022-10-24 11:51:45 +02:00
Matthieu BAUMANN
88c27b2fb2 Update readme for v3 2022-10-23 18:28:38 +02:00
Matthieu BAUMANN
ae7729dee9 update readme 2022-10-23 18:25:16 +02:00
Matthieu BAUMANN
6b12d12348 restore dev version 2022-10-23 17:44:43 +02:00
Matthieu BAUMANN
732f84a5c7 look for new tiles on a 500ms interval frame 2022-10-23 17:37:44 +02:00
Matthieu BAUMANN
3b6a29dc2e debug 2022-10-21 15:02:49 +02:00
Matthieu BAUMANN
f2cda77dc2 tag new version 2022-10-21 14:15:36 +02:00
Matthieu BAUMANN
da50e48f90 fix touchmove 2022-10-21 14:14:21 +02:00
Matthieu BAUMANN
40d6a9a56d fix steps in stack list 2022-10-21 13:23:40 +02:00
bmatthieu3
89f54c3acd restore adaptativeDisplay 2022-10-21 09:07:12 +02:00
Matthieu BAUMANN
8fcdffa872 add mars ctx example 2022-10-19 13:44:28 +02:00
bmatthieu3
ba1a8d548a fix china vo bug 2022-10-19 11:30:10 +02:00
Matthieu BAUMANN
f1a5ba4144 add deploy and fix unsigned hips rendering with colormap 2022-10-17 15:19:12 +02:00
bmatthieu3
fa26af95fd solve create texture by path 2022-10-14 14:51:27 +02:00
bmatthieu3
04d42e3f96 add timeout on fullscreen 2022-10-14 13:45:14 +02:00
Matthieu BAUMANN
03b16b7d8d add demo example 2022-10-13 18:35:23 +02:00
Matthieu BAUMANN
16616d3f95 disable minification of glsl because it causes problems under safari 2022-10-13 11:56:29 +02:00
bmatthieu3
57bab41615 restore width and height screen given by the js side 2022-10-13 11:01:14 +02:00
Thomas Boch
1111268cc8 Add showReticle, showCooGrid and projection URL parameters 2022-10-11 09:37:46 +02:00
bmatthieu3
f51c5f2877 pass byte slice to backend 2022-10-08 14:46:12 +02:00
bmatthieu3
46a9543fcb grid fix 2022-10-07 11:21:08 +02:00
bmatthieu3
3fe95eb2ee fix bug allsky 2022-10-07 09:50:54 +02:00
bmatthieu3
841759a1c3 fix footprints and polylines 2022-10-06 18:20:56 +02:00
bmatthieu3
65223b289d remove projection as a generic + jpeg and png removal 2022-10-06 10:47:58 +02:00
bmatthieu3
fc9dd71446 wip refac projection 2022-10-06 10:47:58 +02:00
bmatthieu3
120871ba55 remove unused projection functions but need to rewrite the catalog drawing! 2022-10-06 10:47:58 +02:00
bmatthieu3
74ee1ee379 remove unecessary generics 2022-10-06 10:47:58 +02:00
bmatthieu3
1ad58d5260 change json 2022-10-06 10:47:58 +02:00
bmatthieu3
027c8b17c0 replace unwrap by unwrap_abort 2022-10-06 10:47:58 +02:00
Matthieu BAUMANN
72d87cb426 remove num dep 2022-10-06 10:47:58 +02:00
bmatthieu3
1867e33e1f continue decreasing wasm size 2022-10-06 10:47:58 +02:00
bmatthieu3
b7fe456c95 remove font include to decrease the wasm size 2022-10-06 10:47:58 +02:00
bmatthieu3
f699f4d54f simplify shader pipeline 2022-10-06 10:47:58 +02:00
bmatthieu3
3f4a58db37 remove use of image dep => gain ok 100kB on the wasm 2022-10-06 10:47:58 +02:00
bmatthieu3
84478ca54f simplify shader code 2022-10-06 10:47:58 +02:00
bmatthieu3
d92e80a9ec remove unused example 2022-10-06 10:47:58 +02:00
bmatthieu3
fc479fccd9 set font color 2022-10-06 10:47:58 +02:00
bmatthieu3
aef65dc924 run cargo clippy 2022-10-06 10:47:58 +02:00
bmatthieu3
913f47ae1e refine grid steps + add aladin logo when exporting the PNG 2022-10-06 10:47:58 +02:00
bmatthieu3
0c75bee661 visible cells in rust side 2022-10-06 10:47:58 +02:00
bmatthieu3
9134723998 do not push to the view when the moc has an error 2022-10-06 10:47:58 +02:00
bmatthieu3
34101aeb2d fix layer order 2022-10-06 10:47:58 +02:00
bmatthieu3
24cd7ca325 example isophot 2022-10-06 10:47:58 +02:00
bmatthieu3
e87b3e5d84 add hierarchical moc 2022-10-06 10:47:58 +02:00
bmatthieu3
fc4d2bb329 moc display longitude_reversed=true fix 2022-10-06 10:47:58 +02:00
bmatthieu3
295c285a66 fix tan projection 2022-10-06 10:47:58 +02:00
bmatthieu3
d03c8dfac5 fetch moc from js and handle callbacks 2022-10-06 10:47:58 +02:00
Matthieu BAUMANN
fd33e14aa4 callback js function when loading FITS moc 2022-10-06 10:47:58 +02:00
bmatthieu3
7fbe673654 view inside mocs 2022-10-06 10:47:58 +02:00
bmatthieu3
6aa977cc0d should be better to have a view object in ICRS in Surveys maybe 2022-10-06 10:47:58 +02:00
Matthieu BAUMANN
494bd30a0c do not draw cells crossing the projection 2022-10-06 10:47:58 +02:00
bmatthieu3
2bb5656a55 bug frame 2022-10-06 10:47:58 +02:00
bmatthieu3
67c2d6e0f1 fix crossing cells 2022-10-06 10:47:58 +02:00
Matthieu BAUMANN
89261e0cc5 wip 2022-10-06 10:47:58 +02:00
bmatthieu3
57c712e8b7 wip moc fill 2022-10-06 10:47:58 +02:00
bmatthieu3
b0e7028025 begin of api 2022-10-06 10:47:58 +02:00
bmatthieu3
a33e4c1cf9 moc manager wip 2022-10-06 10:47:58 +02:00
Thomas Boch
717f598026 Add footprints from STC-S example 2022-10-03 22:28:44 +02:00
Thomas Boch
b97b68b405 Change color of mars example 2022-10-03 15:19:46 +02:00
Thomas Boch
651179e9c9 Add example file with Mars features 2022-10-03 15:14:57 +02:00
Thomas Boch
55c9c832b7 At build time, modify index.html so that JS file points to latest v3 2022-09-22 09:49:27 +02:00
Thomas Boch
f9c8d2e77f Increase #fps for animateToRaDec API function 2022-09-22 09:48:58 +02:00
Thomas Boch
5df75f1206 Bug fix: cone search button works again 2022-09-13 15:12:15 +02:00
bmatthieu3
8a1cf1d695 clamp fov to 180.0 when we are in SIN 2022-09-08 09:43:54 +02:00
bmatthieu3
f852d18938 fov 2022-09-07 17:57:11 +02:00
bmatthieu3
0c76cd1ada fix grid 2022-09-07 14:00:42 +02:00
bmatthieu3
6d6fa071b9 timer allowing to not exceed 24ms for the current frame 2022-09-06 18:29:17 +02:00
bmatthieu3
2f180e52fc fix pixel missing 2022-09-06 11:48:41 +02:00
Thomas Boch
89367ae6a2 Add ESO outreach example page 2022-09-06 10:04:29 +02:00
Thomas Boch
b62c0f67e6 Add HST outreach example page 2022-09-06 09:55:09 +02:00
bmatthieu3
ad66e786eb fix aperture 2022-09-05 16:09:04 +02:00
bmatthieu3
38357a04c9 distortion revision (not perfect but it's okaish) 2022-09-02 11:06:05 +02:00
bmatthieu3
7946da18e2 fix: restore zoomChanged, positionChanged events 2022-08-12 14:45:28 +02:00
bmatthieu3
5f1b346e83 contains method on HEALPixCoverage dealing with all tile depths. Return true if the intersection is not null 2022-08-12 14:26:44 +02:00
bmatthieu3
678c92486c missing wip 2022-08-09 17:11:17 +02:00
bmatthieu3
72a02169e1 unfocus the input text when a user is clicking on enter for android usage 2022-08-08 15:18:27 +02:00
bmatthieu3
24ba1847b8 some last fixes 2022-07-26 16:04:06 +02:00
bmatthieu3
d5208e694f filter cors failed url for not querying them + log macro 2022-07-26 16:04:06 +02:00
bmatthieu3
a15a8c43c5 update css hips layer 2022-07-26 16:04:06 +02:00
bmatthieu3
d9d2fcb40a add hips order min 2022-07-26 16:04:06 +02:00
bmatthieu3
9d3ffd325a wip css color/colormap 2022-07-26 16:04:06 +02:00
bmatthieu3
de72912e40 use moc to reduce the number of 404 2022-07-26 16:04:06 +02:00
bmatthieu3
2e71eba8c8 download footprint and do not request for not present tiles: WIP 2022-07-26 16:04:06 +02:00
bmatthieu3
98aecd2389 some fixes 2022-07-26 16:04:06 +02:00
bmatthieu3
a38f076107 do not call setImageSurveyUrl but rather recall setImageSurveys 2022-07-26 16:04:06 +02:00
bmatthieu3
f5bcbd19fa struggle with change of url between requests 2022-07-26 16:04:06 +02:00
bmatthieu3
c2d9df651e still fixing some bugs 2022-07-26 16:04:06 +02:00
bmatthieu3
dbea6371a8 wip allsky fix 2022-07-26 16:04:06 +02:00
Matthieu BAUMANN
cf421e9420 Remove warning rust 2022-07-26 16:04:06 +02:00
Matthieu BAUMANN
2606f2cbea async change of survey url on the fly 2022-07-26 16:04:06 +02:00
bmatthieu3
0f25fdc7c2 fix allsky analysis of fits/jpeg allsky hipses for all hips_tile_width 2022-07-26 16:04:06 +02:00
bmatthieu3
b242060d5e wip rangemoc from moclib instead of BMOC 2022-07-26 16:04:06 +02:00
bmatthieu3
a149c0a356 hips body 2022-07-26 16:04:06 +02:00
bmatthieu3
cf5dac700b attempt to load a RangeMOC 2022-07-26 16:04:06 +02:00
Thomas Boch
ceefe5319a add param cooFrame 2022-07-12 00:47:06 +02:00
Thomas Boch
9a65573907 Enable URL parameters in index.html 2022-07-11 23:19:48 +02:00
Thomas Boch
4e80a5a782 Removed CooGrid.js file (no more needed) 2022-07-08 09:38:59 +02:00
Thomas Boch
ec3a08a2c5 Cleaner handling of HTTPS HiPS URL 2022-07-08 09:37:26 +02:00
Matthieu BAUMANN
67df3e8007 fix dpi problem 2022-07-07 13:43:26 +02:00
bmatthieu3
c43edb7884 separate coogrid from the stack 2022-07-06 18:34:33 +02:00
bmatthieu3
f01e802fc1 enable scissor 2022-07-06 16:13:18 +02:00
bmatthieu3
8dbc2759a7 remove index.html, fix tan proj, fix allsky for tile_width <= 64 2022-07-05 16:20:28 +02:00
bmatthieu3
cc8467b9db revert order of hidden and search button 2022-07-04 18:43:55 +02:00
bmatthieu3
5b7a46b256 very little catalog draw optimizations 2022-07-04 18:38:26 +02:00
Thomas Boch
5bd09056a5 Improve HiPs selector for images surveys 2022-07-04 16:55:35 +02:00
Thomas Boch
90283c5036 Sorting catalogue suggestions in GUI 2022-07-04 15:10:53 +02:00
Thomas Boch
50bbbe7ac4 Fix for cone search with base URL without final '?' 2022-07-04 14:25:00 +02:00
bmatthieu3
aae6376823 fix some bugs 2022-07-01 19:31:03 +02:00
bmatthieu3
21ebfa843f pass tests globally 2022-07-01 19:31:03 +02:00
bmatthieu3
b61fa171ec add cache for storing past fetched tiles that are not used 2022-07-01 19:31:03 +02:00
bmatthieu3
7d8655308e API by id + fix reversed longitude 2022-07-01 19:30:57 +02:00
Thomas Boch
76362872db Fix CORS issues when loading JPEG/PNG tiles under Safari 2022-06-28 11:12:27 +02:00
Thomas Boch
5234a498a1 CSS change: measurements table is slightly shifted from the view bottom 2022-06-28 09:40:13 +02:00
bmatthieu3
62bbefa947 final commit 2022-06-27 15:37:59 +02:00
bmatthieu3
c6119da27f wip proj 2022-06-27 13:36:37 +02:00
bmatthieu3
de639ecd92 projfix WIP 2022-06-27 13:36:37 +02:00
bmatthieu3
c029138d44 create promise from HtmlImageElement 2022-06-27 13:35:57 +02:00
bmatthieu3
059cdd8779 fix 63063998bd 2022-06-27 13:24:41 +02:00
Thomas Boch
63063998bd Add real version number 2022-06-27 09:41:36 +02:00
Thomas Boch
8aef8bc50e Change index.html 2022-06-24 14:37:16 +02:00
Thomas Boch
1bcc7d0b58 GUI improvment: selection of HiPS by ID changes the HiPS immediately 2022-06-24 14:33:57 +02:00
Thomas Boch
21263fd587 Change default projection to AITOFF in index.html 2022-06-24 14:06:23 +02:00
bmatthieu3
d97eca33dc Merge branch 'newgui' of https://github.com/cds-astro/aladin-lite into newgui 2022-06-24 11:20:41 +02:00
bmatthieu3
34ec5c8854 HTMLImageElement for old safari implementation 2022-06-24 11:20:34 +02:00
Thomas Boch
4f0ecffb93 Add ESAC domain name to HTTPS whitelist 2022-06-24 08:47:54 +02:00
bmatthieu3
0afea6c796 try to not return any error if EXT_color_float is not supported 2022-06-23 09:51:42 +02:00
bmatthieu3
80b6ae6b8d Merge branch 'newgui' of https://github.com/cds-astro/aladin-lite into newgui 2022-06-22 18:32:49 +02:00
bmatthieu3
3166e75cee fix location update 2022-06-22 18:23:29 +02:00
Thomas Boch
554cfab64c Fix switch to HTTPS 2022-06-22 17:23:28 +02:00
bmatthieu3
7225bde3b1 Merge branch 'newgui' of https://github.com/cds-astro/aladin-lite into newgui 2022-06-22 16:53:46 +02:00
bmatthieu3
97eefe7e3f add base mpl colormaps 2022-06-22 16:53:37 +02:00
Thomas Boch
3c35999374 Add script in examples/ to open all tests in browser 2022-06-22 16:53:21 +02:00
Thomas Boch
30ebe63c0c Merge branch 'newgui' of https://github.com/cds-astro/aladin-lite into newgui 2022-06-22 16:10:15 +02:00
Thomas Boch
4d6f73dda6 Fix for HTTP HiPSes on HTTPS URL 2022-06-22 16:09:50 +02:00
bmatthieu3
b4fbb11012 fix bug equatorial/galactic mixed surveys 2022-06-22 16:03:47 +02:00
Thomas Boch
4602da4779 Better handling of limitation to 5 decimals to min/max cuts 2022-06-22 15:45:54 +02:00
bmatthieu3
9018dab83b set gal 2022-06-21 19:07:36 +02:00
bmatthieu3
028bbda68f Merge branch 'newgui' of https://github.com/cds-astro/aladin-lite into newgui 2022-06-21 19:00:36 +02:00
Matthieu BAUMANN
3d1d6db49e Merge branch 'newgui' of https://github.com/cds-astro/aladin-lite into newgui 2022-06-21 18:58:58 +02:00
Matthieu BAUMANN
c918893374 change to error 2022-06-21 18:58:53 +02:00
Thomas Boch
b36ca3878f WIP: changes for safari 14 2022-06-21 18:51:44 +02:00
Matthieu BAUMANN
dd8a7b70f2 remove bigu64 2022-06-21 18:44:34 +02:00
Matthieu BAUMANN
c621804c18 change index 2022-06-21 18:35:15 +02:00
Thomas Boch
f3782c84c9 Fix: force HTTPS only for alasky servers 2022-06-21 18:10:44 +02:00
Thomas Boch
8e9c07a29c Some changes for Safari old versions 2022-06-21 17:50:58 +02:00
bmatthieu3
7499dc0a78 arc ndc factor 2022-06-21 16:58:06 +02:00
Matthieu BAUMANN
4648681817 fix colormode 2022-06-21 15:19:36 +02:00
Matthieu BAUMANN
890d14ab77 re-add stretch for color 2022-06-21 14:33:37 +02:00
Thomas Boch
5fc5081e5e Add catalogue "fixed" (good enough at least) 2022-06-21 14:31:22 +02:00
Matthieu BAUMANN
14cd02fd10 Add density map gaia edr3 2022-06-21 13:45:35 +02:00
bmatthieu3
06b07521ce css fix 2022-06-21 11:34:03 +02:00
Thomas Boch
d7b4f44515 WIP: events for graphic overlays 2022-06-21 11:03:16 +02:00
bmatthieu3
70232a7d99 bug fix remove layer that is selected 2022-06-21 01:15:40 +02:00
bmatthieu3
b9e97ec063 support bitpix=-64, this is slow as we must convert f64 to f32! 2022-06-21 01:00:00 +02:00
bmatthieu3
175e922508 wip remove tailwind 2022-06-21 00:42:44 +02:00
bmatthieu3
45f33eb740 wip: survey selection 2022-06-21 00:13:23 +02:00
Matthieu Baumann
3f7df136aa moc opti 2022-06-21 00:12:16 +02:00
bmatthieu3
7305204f21 first commit 2022-06-21 00:12:16 +02:00
Thomas Boch
c0455e0c09 Search catalogue fully working 2022-06-20 16:07:20 +02:00
bmatthieu3
f5e8f6b37d add colormap/color 2022-06-17 09:44:22 +02:00
Thomas Boch
0f3319d32a Update in Stack GUI: min/max cuts are limited to 5 decimal figures 2022-06-17 08:39:31 +02:00
Thomas Boch
e1654b0fce GUI update: stack scrollbar appear sooner 2022-06-17 08:10:24 +02:00
Matthieu BAUMANN
587059678d fix aas225.html 2022-06-16 13:25:19 +02:00
Thomas Boch
46418cd1de Merge branch 'newgui' of https://github.com/cds-astro/aladin-lite into newgui 2022-06-16 08:25:52 +02:00
bmatthieu3
739fa187a7 trash to cross emoji 2022-06-15 18:29:54 +02:00
Thomas Boch
b6dd057d62 Text field in HiPSSelector are focused when showing 2022-06-15 18:24:14 +02:00
bmatthieu3
92849c93e0 fix remove layer bug 2022-06-15 18:14:05 +02:00
bmatthieu3
687c916d97 Merge branch 'overlaygui' of https://github.com/cds-astro/aladin-lite into overlaygui 2022-06-15 11:33:32 +02:00
Thomas Boch
72a2ed77ca Text field in HiPSSelector are focused when showing 2022-06-15 09:44:36 +02:00
Matthieu Baumann
ddcc6cecf4 wip overlays 2022-06-15 02:07:42 +02:00
bmatthieu3
5f65fc8bbc add visible icon 2022-06-15 01:24:28 +02:00
bmatthieu3
932a6574de remove log 2022-06-15 01:24:28 +02:00
bmatthieu3
ae14ea2a66 wip: overlays 2022-06-15 01:24:26 +02:00
bmatthieu3
9a49fa9415 first commit WIP 2022-06-15 01:23:26 +02:00
Thomas Boch
82c6deba8c Add missing JS files (oops) 2022-06-14 19:51:47 +02:00
bmatthieu3
91f42cac38 add visible icon 2022-06-14 19:38:42 +02:00
Thomas Boch
8c889cac92 Fix for projection selector 2022-06-14 15:55:24 +02:00
Thomas Boch
3bbb2ea567 Add projection selector 2022-06-14 15:45:04 +02:00
Thomas Boch
d90eedd34e CSS update: scrollbar appears when Stack vertically overflows 2022-06-14 14:45:24 +02:00
bmatthieu3
2eebd4f9fd remove log 2022-06-13 18:39:26 +02:00
bmatthieu3
aa44ea1bb4 wip: overlays 2022-06-13 18:36:47 +02:00
bmatthieu3
ea05250e9a first commit WIP 2022-06-13 18:36:47 +02:00
bmatthieu3
cb73d6f7b2 fix rightclick mouseup 2022-06-13 13:42:31 +02:00
bmatthieu3
97d6263789 attempt to fix: resize, the sources unwanted selection when dragging + the simbad pointer 2022-06-13 11:41:25 +02:00
bmatthieu3
66636bee5a fix a little bit the labels transparency + request blank from allsky 2022-06-10 15:57:44 +02:00
Matthieu BAUMANN
b4baa600dd disable wheel event when rightclicking 2022-06-10 14:33:34 +02:00
Matthieu BAUMANN
4c9c08cd29 fix: fetch scale and bzero 2022-06-10 14:27:31 +02:00
Matthieu BAUMANN
118f9639c6 change format 2022-06-10 13:35:21 +02:00
Thomas Boch
2cb1d0422c Improvement: cuts are changed on each key press 2022-06-10 10:08:00 +02:00
Thomas Boch
0897193c2c Add min/max cuts 2022-06-10 09:55:23 +02:00
bmatthieu3
889aa53ff1 add changeImageFormat 2022-06-09 16:57:31 +02:00
bmatthieu3
f070482d87 update aas example 2022-06-08 18:21:52 +02:00
bmatthieu3
5ca1e1047f an overlay layer must be be named base 2022-06-08 17:18:04 +02:00
bmatthieu3
ac420a03d0 font color opacity change + callback executed after imagesurvey loaded 2022-06-08 17:14:52 +02:00
bmatthieu3
3fee9be5d2 use dataproduct_subtype ot simplify a little bit the color analysis 2022-06-08 13:33:43 +02:00
bmatthieu3
cfe7443f1e wip: refac a little bit HpxImageSurvey.js, need to check all the tests! 2022-06-07 19:42:18 +02:00
Thomas Boch
ed447f0689 WIP: GUI for color map/stretch update 2022-06-07 15:21:09 +02:00
bmatthieu3
778736edda change tf -> stretch, add reversed in the options object 2022-06-07 13:59:19 +02:00
bmatthieu3
384a44cc78 add transparency font 2022-06-03 18:19:46 +02:00
Thomas Boch
2005006115 Merge branch 'newgui' of https://github.com/cds-astro/aladin-lite into newgui 2022-06-03 16:24:23 +02:00
Thomas Boch
cabc7476a2 WIP: add color map and stretch GUI 2022-06-03 16:23:57 +02:00
bmatthieu3
4d023748bf cargo fix and rust warnings 2022-06-01 11:46:56 +02:00
bmatthieu3
d75c217261 rust fmt 2022-05-31 17:44:33 +02:00
bmatthieu3
c1805d204f fix dpi smartphones 2022-05-31 16:27:29 +02:00
Matthieu Baumann
da337c59e7 font color 2022-05-30 19:49:17 +02:00
bmatthieu3
3cb6ac538d Merge branch 'newgui' of https://github.com/cds-astro/aladin-lite into newgui 2022-05-30 15:17:45 +02:00
bmatthieu3
85e7d84ffc jpg by default 2022-05-30 15:17:37 +02:00
Thomas Boch
83aecd8fd2 HiPSSelector: clear input elements when closing window 2022-05-30 14:43:15 +02:00
bmatthieu3
b82abdd15a remove healpix.js dep + fix progressive cat jittering 2022-05-25 18:54:56 +02:00
Thomas Boch
303b0e8531 HiPSSelector is fully functional 2022-05-25 12:17:03 +02:00
bmatthieu3
c42e354d2e remove static block as it is not supported by Terser 2022-05-24 15:00:46 +02:00
bmatthieu3
41c1227852 Add label size text field for the grid 2022-05-24 13:37:21 +02:00
bmatthieu3
ef0449bc7a add postcss in the webpack build 2022-05-24 13:06:18 +02:00
Thomas Boch
7c53bfa342 Fix autocomplete in HiPSSelector 2022-05-24 09:38:11 +02:00
bmatthieu3
ff60b76cdd fix index.html css include 2022-05-23 17:30:58 +02:00
bmatthieu3
b147ceb03f Merge remote-tracking branch 'cdsastro/newgui' into examples 2022-05-23 17:24:33 +02:00
bmatthieu3
bdebffe5a7 View selection box fix + allsky ring for sinus projection + remove some console log 2022-05-23 13:31:30 +02:00
Thomas Boch
71db8986d0 WIP: HiPSSelector GUI 2022-05-23 10:07:02 +02:00
bmatthieu3
56f4d0447a final commit 2022-05-20 18:23:18 +02:00
Matthieu Baumann
b8d6ac9c9d fix getRaDec by always returning icrsj2000 positions 2022-05-20 08:47:18 +02:00
Matthieu Baumann
d1701d7f61 grid north pole 2022-05-19 22:00:12 +02:00
Matthieu Baumann
6418ef4edb fix layer box projection combobox 2022-05-19 18:31:00 +02:00
Matthieu Baumann
3053b4d9be grid fix 2022-05-19 18:07:36 +02:00
Matthieu Baumann
7187e9ed26 first commit 2022-05-18 18:02:14 +02:00
Matthieu Baumann
bc2cfd359c read pixel 2022-05-11 17:24:37 +02:00
Thomas Boch
8da1022f6c Proper handling of grid-related events 2022-05-11 10:54:36 +02:00
Matthieu Baumann
885b894682 wip: read pixels 2022-05-10 19:03:57 +02:00
Thomas Boch
5da9e4f7b6 WIP 2022-05-10 16:54:08 +02:00
Matthieu Baumann
11e523f081 add labelSize for grid config + bugfix: save the grid config status 2022-05-10 15:46:03 +02:00
Matthieu Baumann
a3a5c98af9 bug fix tile fetcher + bug fix for Halpha that downloaded all the order 3 tiles instead of just using the allsky 2022-05-10 10:52:59 +02:00
Matthieu Baumann
54b2d345bb move image crate from aladin lite to its core 2022-05-09 19:22:54 +02:00
Matthieu Baumann
aef4cfa564 wip: read pixel (works for compressed formats: jpg/png) 2022-05-09 18:55:15 +02:00
Matthieu Baumann
f87b526fc0 minor setgridcfg changes 2022-05-09 18:32:52 +02:00
Matthieu Baumann
8e0bb3610d reticle fix 2022-05-09 14:17:52 +02:00
Matthieu Baumann
6c49d83c6b Merge branch 'examples' of https://github.com/cds-astro/aladin-lite into examples 2022-05-09 11:45:58 +02:00
Matthieu Baumann
b378aef690 wip: reorganize 2022-05-08 23:07:47 +02:00
Matthieu Baumann
977e4298db wip: reorganize 2022-05-06 19:47:12 +02:00
Matthieu Baumann
c0f5368078 allsky wip 2022-05-04 18:43:18 +02:00
Matthieu Baumann
3eb0d92fba animation example 2022-05-01 23:26:23 +02:00
Matthieu Baumann
9af8784bae wip: use allsky files 2022-04-29 20:39:25 +02:00
Thomas Boch
a3ddeab41d GUI improvement: Add color and opacity options for grid 2022-04-29 15:26:37 +02:00
Thomas Boch
58ebcea884 Merge branch 'newgui' of https://github.com/cds-astro/aladin-lite into newgui 2022-04-29 09:58:24 +02:00
Thomas Boch
31dbd2b14e Rebase with examples 2022-04-29 09:55:39 +02:00
Thomas Boch
d49457b102 Aladin logo extracted as a separate class 2022-04-29 09:53:44 +02:00
Matthieu Baumann
d98382c5f1 Add animation example (not working) 2022-04-26 17:54:37 +02:00
Matthieu Baumann
32affe1b34 clear catalogctx when nothing but the HEALPixGrid is drawn + do not pass by the proxy everytime 2022-04-26 17:42:33 +02:00
Matthieu Baumann
02d232a9ba remove reticleCtx and make cuts absolutes 2022-04-26 16:25:08 +02:00
Matthieu Baumann
0c0562a63b add HEALPixGrid again 2022-04-26 14:25:42 +02:00
Thomas Boch
152b6356e0 Merge branch 'newgui' of https://github.com/cds-astro/aladin-lite into newgui 2022-04-26 09:10:14 +02:00
Thomas Boch
a9d191acbd Add comment about contrast adjustment 'a la DS9' 2022-04-26 09:08:58 +02:00
Thomas Boch
227d8e7815 Aladin logo extracted as a separate class 2022-04-26 08:27:15 +02:00
Matthieu Baumann
2ec486cfbb disable webgl1 support 2022-04-25 17:04:43 +02:00
Matthieu Baumann
b5bdb872ca bug fix: zoom state, assert => debug_assert and allow rendering even if not all base tiles have been downloaded. Maybe we should use the allsky later for downloading faster the base tiles, especially for hipses having tile size <= 256 because a lot more tiles have to be downloaded before having the allsky completed 2022-04-25 16:11:23 +02:00
Matthieu Baumann
c42ed0e146 buf fix: Zoom initialization 2022-04-25 13:18:20 +02:00
Matthieu Baumann
52e8ff8913 fix colormap prefetched surveys 2022-04-25 11:21:43 +02:00
Matthieu Baumann
c520ecc836 add final examples 2022-04-25 09:49:08 +02:00
Matthieu Baumann
307c79b618 added some more tests 2022-04-22 17:26:51 +02:00
Matthieu Baumann
b6a2b78118 wip: overlay async + rightclick change cuts 2022-04-21 19:53:12 +02:00
Matthieu Baumann
8fafb4e552 wip: set image meta data 2022-04-20 19:08:21 +02:00
Matthieu Baumann
976ac99d98 rightclick fits change cuts 2022-04-20 00:03:36 +02:00
Matthieu Baumann
b4a2c532c6 rightclick 2022-04-19 17:26:43 +02:00
Matthieu Baumann
5ecd8bac48 update dropdown list 2022-04-17 11:26:44 +02:00
Matthieu Baumann
465f3840c0 examples directory 2022-04-16 21:50:09 +02:00
Matthieu Baumann
7fe1a3c406 redo base image layer selection 2022-04-14 17:55:07 +02:00
Matthieu Baumann
3e67b69d67 getimagesurvey meta 2022-04-14 11:41:32 +02:00
Matthieu Baumann
4489bc46d9 location longitude between 0 and 360 deg 2022-04-14 09:37:36 +02:00
Matthieu Baumann
99dfdec262 fov and set center not always done 2022-04-13 18:56:57 +02:00
Matthieu Baumann
6d1478aec6 simplify tex sub 2022-04-13 15:39:13 +02:00
Thomas Boch
d7b34f5afa Aladin logo extracted as a separate class 2022-04-12 11:29:20 +02:00
Matthieu Baumann
c0c282fdd2 wip 2022-04-11 18:22:40 +02:00
Matthieu Baumann
16b499a035 wip: ready 2022-04-11 09:48:10 +02:00
Matthieu Baumann
c762f0eb7a WIP: overlay/base survey api from v2 2022-04-08 20:05:04 +02:00
Matthieu Baumann
81a809196c wip: original api 2022-04-07 23:46:58 +02:00
Matthieu Baumann
b8cc6d0867 wip: set/getBaseImageLayer and setOverlayImageLayer api 2022-04-07 18:47:54 +02:00
Matthieu Baumann
039843b8a6 fix: GAL hips frame 2022-04-07 10:57:42 +02:00
Matthieu Baumann
44944f3f28 hpx projection 2022-04-06 18:14:08 +02:00
Matthieu Baumann
a35200cb7f wip: HPX 2022-04-05 17:53:31 +02:00
Matthieu Baumann
a69ff85ab3 cdshealpix dep from its repository 2022-04-05 09:57:47 +02:00
Matthieu Baumann
1b18379270 reversed longitude matrix mult before sending to the gpu, healpix 2022-04-04 19:27:17 +02:00
Matthieu Baumann
46f0843e2a factorize reverse longitude in projection 2022-03-31 23:38:57 +02:00
Matthieu Baumann
c7807b0183 finishing removing reversed longitude 2022-03-31 19:38:46 +02:00
Matthieu Baumann
a12b2fa4ea Merge branch 'frame' of https://github.com/cds-astro/aladin-lite into frame 2022-03-31 19:01:10 +02:00
Matthieu Baumann
090661310e WIP: tackle deformations + reversed longitude field of CameraViewPort 2022-03-31 19:00:57 +02:00
Matthieu Baumann
74ed7c7243 setCenter in icrsj2000 2022-03-30 23:22:54 +02:00
Matthieu Baumann
2fa6c385dd frame wip 2022-03-30 17:46:13 +02:00
Matthieu Baumann
5d305dce83 coo system frame: wip 2022-03-29 18:08:01 +02:00
Matthieu Baumann
13ba11cde0 fix bugs: rendering catalog on main fbo, recompute the fov vertices when resizing the screen 2022-03-29 09:54:55 +02:00
Matthieu Baumann
98d3589870 grid + reverse longitude 2022-03-29 09:44:07 +02:00
Matthieu Baumann
57f814ffc6 restore entire cpu grid: wip 2022-03-29 08:08:59 +02:00
Matthieu Baumann
b774a264b0 Merge branch 'api' of https://github.com/cds-astro/aladin-lite into api 2022-03-25 18:26:54 +01:00
Matthieu Baumann
f8a885d3a3 blank fix when there is one given 2022-03-25 18:21:14 +01:00
Matthieu Baumann
6f3f6aab63 minimize distortion at poles 2022-03-25 16:04:29 +01:00
Matthieu Baumann
d9fcfe671f minimize distortion at poles 2022-03-25 15:37:32 +01:00
Matthieu Baumann
44eb2ae4cc grid cfg 2022-03-25 13:46:51 +01:00
Matthieu Baumann
cee9e93f87 fix moc sky fraction computation 2022-03-25 11:36:44 +01:00
Matthieu Baumann
a3de07a614 wip image survey api 2022-03-24 17:28:10 +01:00
Matthieu Baumann
1c317d2228 wip addImageSurvey 2022-03-23 17:40:54 +01:00
Matthieu Baumann
4503d4f378 wip wasm bindgen survey color config api 2022-03-23 10:03:03 +01:00
Matthieu Baumann
7fa5cb8b75 WIP: simplify ImageSurveyMeta API 2022-03-22 19:29:47 +01:00
Matthieu Baumann
34524085e8 wip: setImageSurvey javascript api 2022-03-21 17:54:03 +01:00
Matthieu Baumann
49f8b1c03f wip: setImageSurvey simple api 2022-03-18 18:34:21 +01:00
Matthieu Baumann
f0384e2de1 mars example 2022-03-18 13:16:29 +01:00
Matthieu Baumann
fae3b3ca3b gamma correction on ui 2022-03-18 00:40:12 +01:00
Matthieu Baumann
321225b5bf return to past raytracing method 2022-03-17 18:19:01 +01:00
Matthieu Baumann
c89bbe80d1 remove drop tile request and compute rasterizer healpix corner positions separatly from the uvs coords 2022-03-17 16:54:31 +01:00
Matthieu Baumann
0b9fadef9b send only order 0 tiles when raytracing 2022-03-15 18:10:45 +01:00
Matthieu Baumann
cb7367ab07 Merge branch 'egui' of https://github.com/cds-astro/aladin-lite into egui 2022-03-15 14:51:05 +01:00
Matthieu Baumann
dfdfcda003 fix fontdue version everywhere 2022-03-14 17:47:03 +01:00
Matthieu Baumann
65d1e8d73d First step to fix touchmove 2022-02-24 00:45:41 +01:00
Matthieu Baumann
4fe6e3d308 resize less heavy computing + webgl1 instancing 2022-02-23 16:51:08 +01:00
Matthieu Baumann
ddf77a792d fix webgl2 heatmap rendering + remove wheelevent from api 2022-02-23 00:07:37 +01:00
Matthieu Baumann
e20f78f61f is_power_of_two generic 2022-02-22 11:21:53 +01:00
Matthieu Baumann
dc04c89d5d clear a little bit fits image 2022-02-22 09:40:04 +01:00
Matthieu Baumann
13f24b7fd0 enhance fits parsing 2022-02-22 01:29:09 +01:00
Matthieu Baumann
2e4cf1b1c6 bug fix: recompute positions only when new cells have been added to the view 2022-02-15 16:47:10 +01:00
Matthieu Baumann
574a003feb check support WebGL1/WebGL2 continued 2022-02-13 23:45:03 +01:00
Matthieu Baumann
6ba5f3cfb0 detect whether webgl2 is supported and load the corresponding wasm 2022-02-13 23:45:03 +01:00
Matthieu Baumann
36fce32a60 do not update the vbos each time the camera is moving but only when different cells are contained in the fov 2022-02-13 23:40:43 +01:00
Matthieu Baumann
fef6782014 check support WebGL1/WebGL2 continued 2022-02-12 19:16:19 +01:00
Matthieu Baumann
8cc0901671 detect whether webgl2 is supported and load the corresponding wasm 2022-02-10 22:55:43 +01:00
Matthieu Baumann
5458f851d5 stick egui version to 0.15.0 2022-02-10 12:22:30 +01:00
Matthieu Baumann
491458fd5a comment discovery tree 2022-02-10 12:22:13 +01:00
Matthieu Baumann
6ee10c47b3 stick egui version to 0.15.0 2022-02-10 11:44:31 +01:00
Matthieu Baumann
1437dbf6f9 comment discovery tree 2022-02-09 23:50:26 +01:00
Matthieu Baumann
efc6766234 WIP: webgl1 heatmap 2022-01-27 20:59:43 +01:00
Matthieu Baumann
c94fe4840f Merge branch 'webgl1' of https://github.com/cds-astro/aladin-lite into webgl1 2022-01-27 20:46:37 +01:00
Matthieu Baumann
a3c47f7b46 wip: heatmap: does not compile 2022-01-27 20:45:24 +01:00
Matthieu Baumann
a1a02788f6 simplify catalog preprocessing 2022-01-27 20:45:24 +01:00
Matthieu Baumann
e3d28be64f fix colormap 2022-01-27 20:45:24 +01:00
Matthieu Baumann
5a19fd34b6 remove system inside app as it is already composed in Camera 2022-01-27 11:37:16 +01:00
Matthieu Baumann
d093f83ea5 remove projection_type ugly struct thanks to the enum_dispatch crate 2022-01-26 18:12:34 +01:00
Matthieu Baumann
e01e92c66b bugfix: ndc_to_screen and screen_to_ndc projections 2022-01-25 11:43:30 +01:00
Matthieu Baumann
ba4432f065 remove layer from the data SimpleHiPS api 2022-01-25 11:16:38 +01:00
Matthieu Baumann
7a1214cf9b blendcfg default 2022-01-25 09:06:56 +01:00
Matthieu Baumann
c0433a17a0 wip: heatmap: does not compile 2022-01-24 00:20:51 +01:00
Matthieu Baumann
629a9668fb minor comments on al-api 2022-01-24 00:10:53 +01:00
Matthieu Baumann
cf5f74e139 colormap test ok 2022-01-23 23:59:03 +01:00
Matthieu Baumann
f380c6bf73 wip: simple hips moved to al-api 2022-01-23 12:42:44 +01:00
Matthieu Baumann
d88d02a627 wip more exhaustive blending, with more possibilities, a gl-like api, simplified code as well. Need to test/debug the colormap render 2022-01-23 01:34:43 +01:00
Matthieu Baumann
bb0db59023 simplify catalog preprocessing 2022-01-20 22:49:33 +01:00
Matthieu Baumann
e63acf8af6 fix colormap 2022-01-20 13:04:17 +01:00
Matthieu Baumann
0d4eb0fe2c wip webgl1: hips, grid, text, ui ok. Catalog remaining to handle 2022-01-20 00:20:18 +01:00
Matthieu Baumann
6b17cd6ba8 WIP: webgl1 interleaved data 2022-01-08 14:08:25 +01:00
Matthieu Baumann
ce70f74b74 wip webgl1: one buffer per attribute 2021-12-27 10:35:00 +01:00
Matthieu Baumann
6b8a8c8b89 wip webgl1: working on raytracer 2021-12-24 14:37:03 +01:00
Matthieu Baumann
f9a63c2db2 wip webgl1 vao like 2021-12-23 23:51:03 +01:00
Matthieu Baumann
b5d2e5a1a6 wip: working on webgl1 shader compatibility 2021-12-23 01:45:39 +01:00
Matthieu Baumann
4b5cc88b77 wip separate webgl1 and webgl2 shaders 2021-12-22 23:46:41 +01:00
Matthieu Baumann
69cf003e03 wip: webgl2 use al_core::FrameBufferObject instead of raw webgl one 2021-12-17 00:51:54 +01:00
Matthieu Baumann
7a14afcff7 WIP: wasm pack plugin and crate features for webgl1 and webgl2 2021-12-16 20:28:11 +01:00
Matthieu Baumann
818e250738 Merge branch 'webgl1' of https://github.com/cds-astro/aladin-lite into webgl1 2021-12-16 01:48:50 +01:00
Matthieu Baumann
84d1164a30 WIP webgl2 feature: use al_core rendering primitives in al-ui and do not support the fits integer for webgl1 2021-12-16 01:47:49 +01:00
Matthieu Baumann
1ad151e3ac Merge branch 'webgl1' of https://github.com/cds-astro/aladin-lite into webgl1 2021-12-15 20:27:20 +01:00
Matthieu Baumann
95c7f49515 WIP setting up webgl1 cfg, keeping the webgl2 one 2021-12-15 19:27:16 +01:00
Matthieu Baumann
44f0cb5896 reduce dev rust compilation time, need to invest how to reduce the time spent by webpack now 2021-12-15 19:22:17 +01:00
Matthieu Baumann
71c4944361 WIP setting up webgl1 cfg, keeping the webgl2 one 2021-12-15 01:53:57 +01:00
Matthieu Baumann
28002f0038 vao webgl1 2021-12-13 22:33:33 +01:00
Matthieu Baumann
74d0fdbbd5 Core change: TEX UNIT are per shader. It is possible to bind up to 16 textures for one rendering pass (vert + frag). That is fair enough 2021-12-11 12:37:55 +01:00
Matthieu Baumann
7f3c2ce288 WIP: changing the vao to use the al_core ones 2021-12-10 12:46:33 +01:00
Matthieu Baumann
0fd2551523 wip: selection hips layer 2021-12-06 00:54:16 +01:00
Matthieu Baumann
f1e0e51d27 wip hips selector 2021-12-05 19:35:35 +01:00
Matthieu Baumann
b8f4ee061a egui thumbnail wip 2021-12-04 14:28:44 +01:00
Matthieu Baumann
27cefe73ad wip ui hips selector 2021-12-03 23:29:37 +01:00
Matthieu Baumann
f878e1420d WIP: grid thumbnail HiPS selector 2021-12-03 09:23:35 +01:00
Matthieu Baumann
efc3204bde WIP: survey selection 2021-11-28 01:18:54 +01:00
Matthieu Baumann
e1875500d3 handle dpi for macbook pro. The grid shader seems not performant. Maybe a line rasterizer might solve this 2021-11-22 19:17:29 +01:00
Matthieu Baumann
dcc7bec1fa dpi handling: not finished 2021-11-20 01:00:09 +01:00
Matthieu Baumann
edadf0b6ea isolate more al-ui from the app. Return a list of events to the app so that the app can call the methods inside the app 2021-11-20 00:45:08 +01:00
Matthieu Baumann
bb94812783 fix arc 2021-11-19 01:04:08 +01:00
Matthieu Baumann
60292c507e fix unwrap on the ui when resizing + opti when neither the ui nor the scene has been redrawn 2021-11-19 00:50:15 +01:00
Matthieu Baumann
5683187fcb add framebuffer primitives and draw the scene and the ui on separated framebuffers 2021-11-19 00:29:46 +01:00
Matthieu Baumann
236b30efbd separate gui from app 2021-11-18 12:04:19 +01:00
Matthieu Baumann
ab7fa893fc Ui: draw the Ui 500ms after a mouseclic 2021-11-18 01:37:01 +01:00
Matthieu Baumann
c04e6f3e9f Merge branch 'egui' of https://github.com/cds-astro/aladin-lite into egui 2021-11-17 18:05:42 +01:00
Matthieu Baumann
bde1a21ca3 separate ui layout from the al_ui crate 2021-11-17 18:04:21 +01:00
Matthieu Baumann
4b92b60c8a allsky line projection fix 2021-11-15 20:43:42 +01:00
Matthieu Baumann
0970886eaf solve size and allsky label positions 2021-11-15 17:40:38 +01:00
Matthieu Baumann
677ebebb3f solve refresh rasterized text bug 2021-11-12 10:05:06 +01:00
Matthieu Baumann
a8ef58bd53 add text rasterizer, need to fix 2 bugs: one that remove the labels when moving mouse and the other to offset the label the position when the view is not in allsky mode 2021-11-12 00:41:57 +01:00
Matthieu Baumann
54e4dcc00d add al-ui workspace and al-task-exec 2021-11-01 12:18:08 +01:00
Matthieu Baumann
4b1046ae1c workspace al_core completion 2021-10-31 01:48:24 +02:00
Matthieu Baumann
cc2e37531d Refact + workspace, THIS DOES NOT COMPILE 2021-10-30 17:49:18 +02:00
Matthieu Baumann
1d832eaee3 egui implemented
egui implemented in the graphical pipeline of aladin lite.
2021-10-22 01:13:36 +02:00
Matthieu Baumann
8940a245c6 egui WIP 2021-10-17 22:44:01 +02:00
Matthieu Baumann
d2f72f7f4a raytracer by default 2021-10-10 11:31:48 +02:00
Matthieu Baumann
c3c4c3dfb3 Merge pull request #54 from bmatthieu3/revert
Add message for safari users to enable WebGL2 feature and reload the page
2021-07-06 13:37:00 +02:00
Matthieu Baumann
bfab5d45d2 more explicite msg 2021-07-01 11:00:00 +02:00
Matthieu Baumann
449f2724a4 add message for safari users to enable WebGL2 feature and reload the page 2021-06-30 17:56:48 +02:00
Matthieu Baumann
f8d9b85be3 complete API doc 2021-03-23 17:02:46 +01:00
Matthieu Baumann
fe54f81941 clean up the data send to the GPU for raytracing 2021-03-18 09:42:04 +01:00
Matthieu Baumann
0ebaae75d2 8 bitpix FITS tile reading 2021-03-18 09:32:17 +01:00
Matthieu Baumann
5f5eb438f7 fix for FITS tiles having no BLANK field e.g. 2MASSX 2021-03-18 09:32:17 +01:00
Thomas Boch
4e68a50117 Added 2 galaxies ellipses for example ellipse.html 2021-03-17 12:03:34 +01:00
Thomas Boch
6fee0877bc Merge branch 'develop' of https://github.com/cds-astro/aladin-lite into develop 2021-03-17 12:03:12 +01:00
Thomas Boch
5404e139a9 Implement 2-finger rotation 2021-03-17 12:02:40 +01:00
Thomas Boch
06b68ddf93 Update config for Webpack v5 2021-03-17 12:01:58 +01:00
Matthieu Baumann
12008b53a0 scissor 2021-03-16 17:30:26 +01:00
Matthieu Baumann
230772a3ca script to make colormaps 2021-03-16 02:39:35 +01:00
Matthieu Baumann
f5f1b41110 first commit 2021-03-15 17:24:06 +01:00
Matthieu Baumann
450d3514de rust fmt 2021-03-15 00:11:26 +01:00
Matthieu Baumann
181716791d API reset north position 2021-03-14 23:52:27 +01:00
Matthieu Baumann
7e6d4cc503 relay fits parsing error 2021-03-14 12:49:37 +01:00
Matthieu Baumann
a00eb26736 fix 4 max surveys 2021-03-14 11:48:23 +01:00
Matthieu Baumann
4a57d9564c add export as png
This can introduce a performance issue on mobile especially. This need
to be tested!
2021-03-13 12:39:46 +01:00
Matthieu Baumann
58da9c297c readPixel(x_screen, y_screen, layer_name) API 2021-03-13 02:01:08 +01:00
Matthieu Baumann
c9decf3810 restore float position tex 2021-03-12 15:54:03 +01:00
Matthieu Baumann
a00819f6e8 separate tex 2021-03-12 15:33:49 +01:00
Matthieu Baumann
a6eac3f81f 10 bits per channel rgb 2021-03-12 13:51:06 +01:00
Matthieu Baumann
f56978d55f active texture not necessary everywhere 2021-03-12 13:03:19 +01:00
Matthieu Baumann
60a55c2354 first commit 2021-03-11 23:53:15 +01:00
Matthieu Baumann
3c679a5c08 unbind position tex 2021-03-10 15:55:07 +01:00
Matthieu Baumann
61ce88149c RGB to RGBA 2021-03-10 15:11:19 +01:00
Matthieu Baumann
d4b395506b multiple instances fix 2021-03-10 13:23:08 +01:00
Matthieu Baumann
bac40a063b add RGBF32 texture format 2021-03-10 11:33:06 +01:00
Matthieu Baumann
a650d38694 Add canvas method 2021-03-10 11:02:33 +01:00
Matthieu Baumann
1be54e94c7 add reversed to Grayscale2Colormap object 2021-03-10 11:02:33 +01:00
Matthieu Baumann
463b9f6e1c add colormap to index color example 2021-03-10 11:02:33 +01:00
Matthieu Baumann
4ca227143e remove raytracer distortions 2021-03-10 11:02:33 +01:00
Matthieu Baumann
240832b94d production 2021-03-10 11:02:33 +01:00
Matthieu Baumann
db1a80a753 replace http -> https 2021-03-10 11:02:33 +01:00
Matthieu Baumann
785d115237 first commit 2021-03-10 11:02:32 +01:00
Matthieu Baumann
9049ef10fd first commit 2021-03-10 11:02:32 +01:00
Thomas Boch
1580a2ddbe Add new color maps: stern, EOS B, spectral, RdBu, parula 2021-03-10 10:13:25 +01:00
Thomas Boch
d3c3033901 Add test page multiple-instances.html
This page tries to run two instances in Aladin Lite
2021-03-10 09:46:19 +01:00
Thomas Boch
a8560ef5f4 Add color map YIOrBr 2021-03-08 16:19:49 +01:00
Thomas Boch
face3fab77 Add color maps viridis, plasma, magma, inferno and turbo 2021-03-08 15:44:36 +01:00
Thomas Boch
ed14c64247 Merge branch 'develop' of https://github.com/cds-astro/aladin-lite into develop 2021-03-04 14:13:55 +01:00
Matthieu Baumann
c42f0df889 hips layers support 2021-03-04 14:10:24 +01:00
Matthieu Baumann
dd568d932e fix begin 2021-03-02 17:06:18 +01:00
Matthieu Baumann
04bc7291f7 first commit 2021-03-02 08:53:30 +01:00
Thomas Boch
a8e7f9e3c9 Merge branch 'develop' of https://github.com/cds-astro/aladin-lite into develop 2021-02-26 13:08:52 +01:00
Matthieu Baumann
8030e3444b add image survey api 2021-02-26 13:03:53 +01:00
Matthieu Baumann
8ec0c2f66c resize grid label 2021-02-26 13:03:53 +01:00
Matthieu Baumann
13e3f9565b add rotateAroundAxis API method 2021-02-26 13:03:53 +01:00
Matthieu Baumann
41c412b8d7 stable version 2021-02-26 13:03:53 +01:00
Matthieu Baumann
7cb037490f getAvailableColormapList api function 2021-02-26 13:03:53 +01:00
Matthieu Baumann
7593ec38ef update gal to j2000 2021-02-26 13:03:53 +01:00
Matthieu Baumann
76e82aaf41 does not compile 2021-02-26 13:03:53 +01:00
Matthieu Baumann
d61b8236e3 Add infos for compiling the project 2021-02-26 13:03:53 +01:00
Matthieu Baumann
9690e337c2 apply gal to icrs rotation to the w2m matrix 2021-02-26 13:03:53 +01:00
Matthieu Baumann
8c4ce049fd first commit 2021-02-26 13:03:53 +01:00
Matthieu Baumann
192dccb1cb first commit 2021-02-26 13:03:53 +01:00
Thomas Boch
9617ea94fb Merge branch 'develop' of https://github.com/cds-astro/aladin-lite into develop 2021-02-23 16:00:26 +01:00
Thomas Boch
f372239d7b Add test example dist/easy-access-simbad-ned.html 2021-02-23 15:54:26 +01:00
Thomas Boch
20955c236f Merge branch 'develop' of https://github.com/cds-astro/aladin-lite into develop 2021-02-23 15:53:36 +01:00
Thomas Boch
303eda3769 Bug fix: catalog sources can now be clicked at their correct position
The previous projection function was returning integers, whereas it now
returns floats. As a result, floats were used to index the objLookup
array in View ... which didn't work quite well. Rounding the values did
the trick
2021-02-23 15:43:20 +01:00
Matthieu Baumann
89b038eb68 fix ellipse north to east angle 2021-02-17 15:53:22 +01:00
Matthieu Baumann
bce635395a fix ellipse north to east angle 2021-02-17 12:55:32 +01:00
Matthieu Baumann
90e5ae64f0 add ellipse class and API function for plotting ellipses on top on the aladin lite view 2021-02-04 17:22:22 +01:00
Matthieu Baumann
5ae019fb73 Add a bigger triangle to see how it looks. Can be enhanced but it does not look bad 2021-02-03 15:51:58 +01:00
Matthieu Baumann
84fcb6fb8a footprint works. Issue: look at the projectLine rust method to handle bid lines! 2021-02-03 12:14:20 +01:00
bmatthieu3
743702a61a API: setImageSurvey(idOrRootUrl) 2021-02-01 21:48:18 +01:00
bmatthieu3
ad3094012d change readme 2021-02-01 21:31:34 +01:00
bmatthieu3
79163a2aa6 clean project 2021-02-01 21:04:16 +01:00
bmatthieu3
636c350767 investigating ui layer 2021-01-21 08:36:33 +01:00
bmatthieu3
ee5b0ffd72 add discovery tree handling 2021-01-15 21:09:49 +01:00
bmatthieu3
0d726478e4 fix aitoff gpu projection 2021-01-06 19:54:46 +01:00
bmatthieu3
40b5934604 increase mollweide iteration projection 2021-01-06 19:11:07 +01:00
bmatthieu3
dd8104d57e Merge branch 'polyline' into develop 2021-01-06 18:50:45 +01:00
bmatthieu3
fd242662ed merge 2021-01-06 18:49:47 +01:00
bmatthieu3
5ebfba1c2e opti when updating the color of a HiPS 2021-01-06 16:43:08 +01:00
bmatthieu3
adb9f60ecf change the API of the backend for adding a new hips
There is now only a setHiPS method taking an array of HiPS objects
HiPSes whose color changed are not recreated
Textures are limited to 16! There are 3 textures for one HiPS
1 for the kernel + 1 for a framebuffer for the catalog + 3*3 for the hipses = 11
One can load up to 4 hipses simultaneous
2021-01-06 15:15:38 +01:00
bmatthieu3
48d8e0bc4c Cleanup of some code
impl Uniforms trait for &[i32] in order
to send vector of textures to the GPU for easily
2021-01-05 16:25:04 +01:00
bmatthieu3
dec22b6ca3 Limit the size of the texture array to the true number of texture slices passed, i.e. 3
This fix a BIG bug on some architecture where one could see nothing!!
2021-01-05 16:16:28 +01:00
Matthieu Baumann
ced138e5c2 fix portability issues on mobile by requesting a highp precision! 2020-12-27 16:38:48 +01:00
bmatthieu3
c18b25beb3 MOC draw process is not well optimized
Moreover there are some bugs:
- The MOC degradation seems to not merge cells into their parent when it is
  possible
- Some HEALPix cells at low depth vanish from time to time
2020-12-23 16:18:12 +01:00
bmatthieu3
03b769d686 getVisibleCells update
use of the backend projection method.
This generalize the draw of the HPX grid for all projections.
The code detecting if a cell crosses the projection (for allsky projections)
has been simplified. It seems to work with all the projections and is also
very faster on my desktop
2020-12-20 21:59:45 +01:00
bmatthieu3
870c9232e1 Add a method for handling line crossing the allsky projections
see src/line.rs
2020-12-19 02:14:06 +01:00
Matthieu Baumann
e13fd64f6a decrease zoom factor 2020-12-18 11:44:01 +01:00
bmatthieu3
78888b4865 Discard progressive zooming when repetitive zooming occur. Keep the progressive zooming for the latest wheel action 2020-12-18 01:16:11 +01:00
bmatthieu3
849dc909da First try
Update the starting time with the new fov so that
the current fov matches
2020-12-17 15:39:38 +01:00
bmatthieu3
94cfb1c0c2 Send missing tile information to the shader
This is used to define a missing color to fill the
missing tiles with. When a tile is missing, the pixels
in it are assigned to a grayscale value of 0.
The colormap is then queried with 0
2020-12-16 11:14:17 +01:00
bmatthieu3
7c19ad46db Catalog sources multiplied by inv_model instead of model 2020-12-15 14:09:32 +01:00
bmatthieu3
8eb29f8767 Add opti for rendering grid on the GPU side
Two modes for the grid rendering:
1. When fov > 1 arcmin, compute the grid pixel by pixel on the GPU. This is
   more precise and good looking but relies on the GPU
2. When fov < 1 arcmin, compute the grid on the CPU (recursive method that
   breaks a line until the angle between the adjacent line is quite small)
   This relies on the CPU and is therefore faster for machine that do not have
   a good GPU
2020-12-15 13:45:35 +01:00
bmatthieu3
ff201d5088 Fix catalog plotting 2020-12-15 13:43:50 +01:00
bmatthieu3
99d1e65b22 Fix inertia moving and zoom for very small fovs 2020-12-09 21:21:56 +01:00
bmatthieu3
7466458fd7 Better traits definition between angle types 2020-12-09 19:36:56 +01:00
bmatthieu3
dc1ee759ec inertia not triggered
if the user has not moved since 30ms
2020-12-08 13:27:13 +01:00
bmatthieu3
3dd4adfe65 Integration of inertia
when going out of the field of view, the inertia is not starting.
2020-12-08 12:23:42 +01:00
bmatthieu3
c3e5017fd2 Value of FOV computed in the Rust backend
The JS UI has to poll every time the current value
of the FOV because the zoom action is under an animation.
Better way would be that the Rust backend calls updateFovDiv
whenever it is necessary (only when animating)
2020-12-07 20:07:57 +01:00
bmatthieu3
2fda77187b simplying tile download. Tiles from the previous frames that must be launched are removed! We do the requests only for tiles in the current frame 2020-11-18 17:49:00 +01:00
bmatthieu3
974e6c2fa5 remove commented code 2020-11-18 17:49:00 +01:00
bmatthieu3
210c901a85 mediump for float precision 2020-11-18 17:49:00 +01:00
bmatthieu3
4db8c87822 color HiPS fix 2020-11-18 17:49:00 +01:00
bmatthieu3
ff77c38fc0 fix panic when zooming too much with a catalog loaded 2020-11-08 19:51:50 +01:00
bmatthieu3
385414a338 Merge branch 'develop' of http://cdsgit.u-strasbg.fr/thomasboch/aladin-lite-v3 into develop 2020-11-08 13:05:51 +01:00
bmatthieu3
3e16ee9b59 onmousewheel -> onwheel event so that it is working for FF as well 2020-11-07 13:18:51 +01:00
Thomas Boch
c5c3ad9f03 Merge branch 'develop' of cdsgit.u-strasbg.fr:thomasboch/aladin-lite-v3 into develop 2020-11-06 09:33:29 +01:00
Thomas Boch
e4a594d27a Change initial target and FoV for composite demo page 2020-11-06 09:31:06 +01:00
bmatthieu3
d7423f64e1 clear the requests even when new surveys are not selected 2020-11-05 12:54:11 +01:00
bmatthieu3
e497a00202 rust fmt 2020-11-05 12:24:22 +01:00
bmatthieu3
87363723d3 clean warnings 2020-11-05 12:08:22 +01:00
bmatthieu3
e156c6eb41 delete commentary and add hide grid labels checkbox 2020-11-05 10:44:49 +01:00
bmatthieu3
0225afb59f Merge branch 'webgl4' of http://cdsgit.u-strasbg.fr/thomasboch/aladin-lite-v3 into webgl4 2020-11-04 17:32:31 +01:00
bmatthieu3
a784cd1e5b grid control 2020-11-04 17:20:29 +01:00
Thomas Boch
c42ac6a0fe Merge branch 'webgl4' of cdsgit.u-strasbg.fr:thomasboch/aladin-lite-v3 into webgl4 2020-11-04 16:01:08 +01:00
Thomas Boch
1ebd4ec765 Force HiPS retrieval from alaskybis 2020-11-04 15:59:31 +01:00
bmatthieu3
890d6adbc6 change opacity catalogs 2020-11-04 14:15:07 +01:00
Thomas Boch
0dbc7e1668 Merge branch 'webgl4' of cdsgit.u-strasbg.fr:thomasboch/aladin-lite-v3 into webgl4 2020-11-04 12:00:26 +01:00
bmatthieu3
8a88c481de catalog selection colormap + global opacity 2020-11-04 11:52:25 +01:00
bmatthieu3
7dbb17549e catalog selection colormap + global opacity 2020-11-04 11:46:21 +01:00
bmatthieu3
f3f1159268 Merge branch 'webgl4' of http://cdsgit.u-strasbg.fr/thomasboch/aladin-lite-v3 into webgl4 2020-11-04 09:32:39 +01:00
Matthieu Baumann
b23f28ad21 catalog colormap 2020-11-03 19:04:17 +01:00
Thomas Boch
a78724540a Make composite demo page working from HTTPs, and adding grid checkbox 2020-11-03 17:09:53 +01:00
Thomas Boch
54607b2bdf Replace http with https at various places (Aladin logo, CSS, etc) 2020-11-03 11:40:34 +01:00
Thomas Boch
cb30c37445 Merge branch 'webgl4' of cdsgit.u-strasbg.fr:thomasboch/aladin-lite-v3 into webgl4 2020-11-03 10:27:24 +01:00
Thomas Boch
f5b5a9dd42 Misc 2020-11-03 10:27:12 +01:00
Matthieu Baumann
2ab61cfe84 catalog colormap 2020-11-01 20:02:33 +01:00
Matthieu Baumann
ad86224ce2 adass 2020-11-01 15:16:22 +01:00
Matthieu Baumann
20807164c9 catalog sin plot 2020-10-29 15:48:38 +01:00
Matthieu Baumann
4558cb1837 simplify raytracing 2020-10-27 14:38:47 +01:00
Matthieu Baumann
a6f9068dbb zoomtolocation 2020-10-27 09:27:36 +01:00
Matthieu Baumann
5bb0c01fbd transfer func 2020-10-27 09:27:36 +01:00
Matthieu Baumann
658ad62aba raystracer order 0 2020-10-27 08:57:40 +01:00
Matthieu Baumann
b182965929 catalogs 2020-10-27 00:55:23 +01:00
Matthieu Baumann
0aec9e9530 catalogs 2020-10-26 08:27:32 +01:00
Matthieu Baumann
4d704e024c add catalog projections 2020-10-23 10:11:25 +02:00
Matthieu Baumann
514e85cece add catalog 2020-10-23 09:09:27 +02:00
Matthieu Baumann
3f9b437dab Merge branch 'webgl4' of cdsgit.u-strasbg.fr:thomasboch/aladin-lite-v3 into webgl4 2020-10-22 17:06:34 +02:00
Matthieu Baumann
d84a83f846 clean logs 2020-10-22 17:06:25 +02:00
Matthieu Baumann
81bc13bb22 handle f64 fits tile 2020-10-22 16:46:07 +02:00
Matthieu Baumann
7805367969 fitsreader fix infite loop when bad string of bytes is given 2020-10-22 14:05:55 +02:00
Thomas Boch
853f5ea7a5 Add sliders for k factor on index-color-composite 2020-10-22 11:22:41 +02:00
Matthieu Baumann
078db12032 find bug xmm eb2 2020-10-22 11:17:15 +02:00
Matthieu Baumann
61c58dcba1 Merge branch 'webgl4' of https://github.com/bmatthieu3/hips_webgl_renderer into webgl4 2020-10-22 09:38:03 +02:00
Matthieu Baumann
25c862f061 Merge branch 'webgl4' of cdsgit.u-strasbg.fr:thomasboch/aladin-lite-v3 into webgl4 2020-10-22 09:35:08 +02:00
Matthieu Baumann
28b5c2feae begin handling double fits 2020-10-22 01:21:16 +02:00
Matthieu Baumann
94d4a797a6 resolve tile size < 512 2020-10-22 00:17:04 +02:00
Matthieu Baumann
6f38c2c92d grid quite stable 2020-10-21 17:07:57 +02:00
Thomas Boch
ba61f4facc Color composite GUI: add text fields to enter values 2020-10-21 13:49:36 +02:00
Thomas Boch
945350f582 Fix zoom with fov larger than 180 deg 2020-10-21 13:49:02 +02:00
Matthieu Baumann
ade9a0b1c2 full sky labels 2020-10-21 00:23:36 +02:00
Matthieu Baumann
f32acefa00 grid 2020-10-20 19:17:53 +02:00
Matthieu Baumann
29eba48f5e begin label 2020-10-19 17:51:56 +02:00
Thomas Boch
f166f35e2e Add index-color-composite interface 2020-10-19 14:27:32 +02:00
Matthieu Baumann
5a63309f0b grid 2020-10-18 23:01:23 +02:00
Matthieu Baumann
d7d695a958 grid cpu 2020-10-16 19:02:04 +02:00
Matthieu Baumann
9c7baf8578 grid progress 2020-10-16 01:40:32 +02:00
Matthieu Baumann
dc0018453e cpu grid 2020-10-15 18:15:49 +02:00
Thomas Boch
32990855b2 Add ARC projection 2020-10-15 11:38:45 +02:00
Thomas Boch
cbb61213c2 Use aladin.webglAPI for projection 2020-10-15 11:10:49 +02:00
Thomas Boch
b9c15d9259 Change for 360° zoom and projection update 2020-10-15 11:09:45 +02:00
Thomas Boch
e64fefa002 Add allowFullZoomout 2020-10-15 11:09:06 +02:00
Thomas Boch
42e1cca556 Merge branch 'webgl4' of cdsgit.u-strasbg.fr:thomasboch/aladin-lite-v3 into webgl4 2020-10-15 09:42:21 +02:00
Thomas Boch
a51983534f Allow 360° fov 2020-10-15 08:45:22 +02:00
Matthieu Baumann
3a04101803 simplify raytracing 2020-10-14 19:44:32 +02:00
Matthieu Baumann
6527d33db5 add composite surveys 2020-10-14 18:17:35 +02:00
Matthieu Baumann
7f2beffd06 remove u64 from wasm API 2020-10-14 16:21:17 +02:00
Matthieu Baumann
d598c3baf0 add worldToScreen method in the wasm wrapper 2020-10-14 16:20:35 +02:00
Thomas Boch
158d05082d WIP 2020-10-14 16:12:57 +02:00
Thomas Boch
5625572c3e Add missing var 2020-10-14 16:12:57 +02:00
Matthieu Baumann
097bc8be18 additive composite hipses 2020-10-14 16:08:43 +02:00
Matthieu Baumann
0bae97258b safari working 2020-10-13 18:16:20 +02:00
Matthieu Baumann
a0613f86db remove sampler2Darray 2020-10-13 17:54:45 +02:00
Matthieu Baumann
fb98dd6528 add composite surveys 2020-10-13 00:37:15 +02:00
Matthieu Baumann
ac0e9c8a39 back to sampler2d 2020-10-12 23:24:23 +02:00
Matthieu Baumann
0f39836856 first step to remove 2dSamplerArray 2020-10-12 17:53:53 +02:00
Matthieu Baumann
fac599db1e remove opengl warnings 2020-10-12 16:10:37 +02:00
Matthieu Baumann
f808828543 blank, scale and offset in survey 2020-10-12 07:41:40 +02:00
Matthieu Baumann
d3cc19f33b gnomonic working 2020-10-11 20:16:24 +02:00
Matthieu Baumann
6b01c70ba4 add gnomonic projection 2020-10-11 13:25:12 +02:00
Matthieu Baumann
f17c171dbb add arc projection 2020-10-09 19:57:06 +02:00
Matthieu Baumann
8093cb1dd2 fix bugs 2020-10-09 09:17:47 +02:00
Matthieu Baumann
961881cba1 set overlay opacity factor 2020-10-09 02:06:44 +02:00
Matthieu Baumann
a6ddca37a7 overlay test 2020-10-08 18:14:46 +02:00
Matthieu Baumann
531fb4a374 some tests and bug fixes when changing the hips 2020-10-08 01:40:58 +02:00
Matthieu Baumann
a7caffc214 reverse longitude 2020-10-07 19:47:36 +02:00
Matthieu Baumann
f611bd69af sub texture and texture bound 0 when changing hips 2020-10-07 02:09:28 +02:00
Matthieu Baumann
3727f869bf change js objects defining HiPSes 2020-10-06 19:27:48 +02:00
Matthieu Baumann
e29c2e375d raytracer border 2020-10-06 14:47:30 +02:00
Matthieu Baumann
4f73f3b3e0 triangulation in progress 2020-10-06 02:07:43 +02:00
Matthieu Baumann
e1abdeea1f begin border triangle raytracer 2020-10-05 19:47:06 +02:00
Matthieu Baumann
9aa8c7f2f2 remove unwraps 2020-10-05 00:04:49 +02:00
Matthieu Baumann
24e5ab1aed fix errors 2020-10-03 23:49:09 +02:00
Matthieu Baumann
ed436ea108 fixing errors 2020-10-02 18:34:01 +02:00
Matthieu Baumann
df59478cf7 remove u64 from wasm API 2020-10-02 11:27:08 +02:00
Matthieu Baumann
152ad29a26 lots of error to fix 2020-10-02 04:19:16 +02:00
Matthieu Baumann
65aa9be51e survey update 2020-10-01 18:12:52 +02:00
Matthieu Baumann
1eae1a9918 image survey containing view and textures 2020-10-01 01:52:07 +02:00
Matthieu Baumann
44a344be8a imagesurveytype 2020-09-30 16:03:04 +02:00
Matthieu Baumann
0db531bd84 add api 2020-09-30 09:23:17 +02:00
Matthieu Baumann
55e62d44b1 clear imagesurvey 2020-09-30 00:56:33 +02:00
Matthieu Baumann
07a846eea7 draw hips 2020-09-29 20:09:25 +02:00
Matthieu Baumann
dbad5f905e add worldToScreen method in the wasm wrapper 2020-09-29 11:08:49 +02:00
Thomas Boch
20da5f6c54 WIP 2020-09-29 09:45:06 +02:00
Thomas Boch
dfa13dcc69 Add missing var 2020-09-29 09:25:28 +02:00
Matthieu Baumann
e76c734086 update the positions for unzooming in a different way 2020-09-29 09:16:32 +02:00
Matthieu Baumann
bad8e218bd rasterizer in progress 2020-09-28 19:25:24 +02:00
Matthieu Baumann
4ee7b0788c update and rendering booleans 2020-09-28 09:21:03 +02:00
Matthieu Baumann
8b10ffd874 add image survey 2020-09-25 17:57:21 +02:00
Matthieu Baumann
ff231edb8f view on survey 2020-09-25 17:51:43 +02:00
Matthieu Baumann
c51292c2ab fits image surveys 2020-09-24 18:14:23 +02:00
Matthieu Baumann
cc288f8c4f tile downloader 2020-09-24 09:17:14 +02:00
Matthieu Baumann
eed654d6e1 request refund 2020-09-23 17:33:12 +02:00
Matthieu Baumann
d442fc0783 request refund 2020-09-23 17:09:14 +02:00
Matthieu Baumann
ef9489e80c request refund 2020-09-23 17:07:47 +02:00
Matthieu Baumann
e0c4695c59 cameraviewport changed 2020-09-22 20:02:52 +02:00
Matthieu Baumann
da78d8dfa9 restruct 2020-09-21 18:40:28 +02:00
Matthieu Baumann
a0dc947262 in progress multiple image surveys 2020-09-18 17:56:05 +02:00
Matthieu Baumann
ae35533d6c bscale bzero directly modified when a tile is received 2020-09-18 01:37:28 +02:00
Matthieu Baumann
0d0fc24f4b renaming to image survey 2020-09-18 01:30:02 +02:00
Matthieu Baumann
d382231d68 fix bug data unit beginning with space 2020-09-17 18:29:36 +02:00
Matthieu Baumann
498f6c7984 shader facto 2020-09-17 15:31:18 +02:00
Matthieu Baumann
d23392a1ba dynamic shader loading 2020-09-17 15:29:24 +02:00
Matthieu Baumann
84263b60e1 pointTo animation for fov > 35 deg 2020-09-16 23:56:59 +02:00
Matthieu Baumann
e56d150db0 hpxImageSurvey 2020-09-16 19:24:25 +02:00
Matthieu Baumann
c81fbb6618 setImageSurvey in progress 2020-09-16 18:00:14 +02:00
Matthieu Baumann
d2f11f78c9 setImageSurvey 2020-09-15 19:44:00 +02:00
Matthieu Baumann
4b97da9314 fix toPoint 2020-09-14 17:39:28 +02:00
Matthieu Baumann
64e03d4e53 set Center 2020-09-14 15:07:59 +02:00
Matthieu Baumann
712187fb18 set fov 2020-09-14 08:15:34 +02:00
Matthieu Baumann
37788cde3e run tasks 2020-09-12 01:59:42 +02:00
Matthieu Baumann
b274e9bea3 first commit 2020-09-10 18:28:20 +02:00
Thomas Boch
08a7b6b206 First try of usage of WASM package in MOC class 2020-07-17 16:47:11 +02:00
Thomas Boch
6c498fd861 Merge branch 'master' of cdsgit.u-strasbg.fr:thomasboch/aladin-lite-v3 2020-07-17 12:57:45 +02:00
Thomas Boch
52d8391813 First step towards v3: AL can now be compiled with webpack 2020-07-17 12:55:45 +02:00
Thomas Boch
f60e33e05d Update README.md 2020-07-16 12:08:41 +02:00
Thomas Boch
574c63c918 Update README 2020-07-15 17:19:43 +02:00
Thomas Boch
61edb7940e Merge branch 'master' of https://github.com/cds-astro/aladin-lite 2020-07-15 17:18:31 +02:00
Thomas Boch
4dc8e3ff09 Update README.md 2020-07-15 17:01:31 +02:00
Thomas Boch
9786a4a15c Initial commit 2020-07-15 16:58:17 +02:00
2209 changed files with 72497 additions and 6745 deletions

35
.github/workflows/npm-publish.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish to NPM
on:
release:
types: [created]
workflow_dispatch:
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: "Install the rust compiler"
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
- name: "Install wasm-pack"
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y
- name: "Install dependencies"
run: |
npm install
- name: "Build Aladin Lite"
run: |
npm run build
npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

37
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Run tests
on:
push:
branches:
- develop
pull_request:
branches:
- develop
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: "Checkout branch ${{ github.head_ref }}"
uses: actions/checkout@v3
- name: "Setup node"
uses: actions/setup-node@v3
with:
node-version: 16
- name: "Install the rust compiler"
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
- name: "Install wasm-pack"
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y
- name: "Install dependencies"
run: |
npm install
- name: "Build Aladin Lite"
run: |
npm run build
- name: "Run some tests"
run: |
npm run test:build
npm run test:unit

16
.gitignore vendored Normal file
View File

@@ -0,0 +1,16 @@
node_modules
dist
examples/.DS_Store
examples/fits
.DS_Store
package-lock.json
src/core/target/
src/core/Cargo.lock
aladin-lite*.tgz
.vscode
deploy.sh
deploy-beta.sh

145
README.md
View File

@@ -1,14 +1,101 @@
# Aladin Lite
# Aladin Lite v3
**An astronomical HiPS visualizer in the browser** <img src="aladin-logo.png" alt="Aladin Lite logo" width="220">
Aladin Lite is a Web application which enables HiPS visualization from the browser. It is developed at [CDS, Strasbourg astronomical data center](http://cds.unistra.fr/).
See [A&A 578, A114 (2015)](https://arxiv.org/abs/1505.02291) and [IVOA HiPS Recommendation](http://ivoa.net/documents/HiPS/index.html) for more details about the HiPS standard.
Aladin Lite is built to be easily embeddable in any web page. It powers astronomical portals like [ESASky](https://almascience.eso.org/asax/), [ESO Science Archive portal](http://archive.eso.org/scienceportal/) and [ALMA Portal](https://almascience.eso.org/asax/).
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/).
# How to test it ?
Aladin Lite v3 is out! Please play with [Aladin Lite v3 at this link](https://aladin.u-strasbg.fr/AladinLite).
## Embed it into your projects
You can embed Aladin Lite it into your webpages in two ways
### The vanilla way
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
<!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>
<script type="text/javascript" src="https://aladin.cds.unistra.fr/AladinLite/api/v3/latest/aladin.js" charset="utf-8"></script>
<script type="text/javascript">
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {fov: 360, projection: "AIT", cooFrame: 'equatorial', showCooGridControl: true, showSimbadPointerControl: true, showCooGrid: true});
});
</script>
</body>
</html>
```
### Using the aladin lite NPM package
First, install it with npm:
```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>
<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});
});
</script>
</body>
</html>
```
## Goals of v3
- 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.
@@ -19,15 +106,6 @@ 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)
## Building the application
1. Clone the repository
2. Go to the ``scripts``directory
3. Open the `build.sh` file and adapt paths to ``uglifyjs`` and ``lessc``
4. Launch ``./build.sh``
5. Go to directory ``../distrib/latest/`` , type ``python3 -m http.server 42195`` and open your browser at [http://0.0.0.0:42195/](http://0.0.0.0:42195/) to launch the built application
## Contributing
There are several ways to contribute to Aladin Lite:
@@ -38,3 +116,48 @@ 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
First you need to install the dependencies from the package.json
Please run:
```bash
npm install
```
After that you are supposed to have the Rust toolchain installed
to compile the core project into WebAssembly.
Follow the steps from the Rust official website [here](https://www.rust-lang.org/learn/get-started)
You will also need [wasm-pack](https://rustwasm.github.io/wasm-pack/), a tool helping compiling rust into a proper .wasm file.
Once it's installed you can only build the project:
```bash
npm run build
```
Or build it and launch a localhost server (usually starting on port 8080 but it can be another one if 8080 is occupied):
```bash
npm run serve
```
For just compiling the rust core from the root location (it is faster to do so)
```bash
cd src/core
cargo check --features webgl2
```
and run the tests
```bash
cd src/core
cargo test --features webgl2
```
To generate the Rust backend API documentation
```bash
cd src/core
cargo doc --no-deps --open
```

100
assets/target.svg Normal file
View File

@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="5.4163427mm"
height="5.4163427mm"
viewBox="0 0 5.4163429 5.4163429"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:export-filename="target.png"
inkscape:export-xdpi="500"
inkscape:export-ydpi="500"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="target.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="20.70196"
inkscape:cx="3.7919116"
inkscape:cy="9.8541396"
inkscape:window-width="2560"
inkscape:window-height="1367"
inkscape:window-x="2560"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" /><defs
id="defs2"><inkscape:path-effect
effect="powerclip"
id="path-effect4310"
is_visible="true"
lpeversion="1"
inverse="true"
flatten="false"
hide_clip="false"
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue &lt;b&gt;Fond et contour&lt;/b&gt; en l'absence de résultat de mise à plat après une conversion en chemin." /><inkscape:path-effect
effect="powerclip"
id="path-effect4302"
is_visible="true"
lpeversion="1"
inverse="true"
flatten="false"
hide_clip="false"
message="Utilise la règle de remplissage « fill-rule: evenodd » de la boîte de dialogue &lt;b&gt;Fond et contour&lt;/b&gt; en l'absence de résultat de mise à plat après une conversion en chemin." /></defs><g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-140.08642,-154.46187)"><circle
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.33835;stroke-dasharray:none;stroke-opacity:1"
id="path2746"
cx="142.79459"
cy="157.17004"
r="2.0865982" /><circle
style="display:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.164818;stroke-dasharray:none;stroke-opacity:1"
id="circle4300"
cx="142.79459"
cy="157.17004"
r="0.50933534" /><circle
style="display:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.164818;stroke-dasharray:none;stroke-opacity:1"
id="circle4308"
cx="142.79459"
cy="157.17004"
r="0.50933534" /><circle
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.3084;stroke-dasharray:none;stroke-opacity:1"
id="path4262"
cx="142.79459"
cy="157.17004"
r="0.95304745" /><path
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.365001;stroke-dasharray:none;stroke-opacity:1"
d="m 143.43355,154.60018 v 2.66686"
id="path308"
clip-path="none"
transform="matrix(0.84492788,0,0,0.84492788,21.603582,23.835872)"
sodipodi:nodetypes="cc" /><path
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.3084;stroke-dasharray:none;stroke-opacity:1"
d="m 145.50276,157.17004 h -2.2533"
id="path406"
clip-path="none"
sodipodi:nodetypes="cc" /><path
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.3084;stroke-dasharray:none;stroke-opacity:1"
d="m 142.33972,157.17004 h -2.2533"
id="path408"
clip-path="none"
sodipodi:nodetypes="cc" /><path
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.3084;stroke-dasharray:none;stroke-opacity:1"
d="m 142.79459,157.62491 v 2.2533"
id="path410"
clip-path="none"
sodipodi:nodetypes="cc" /></g></svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

27
examples/al-aas225.html Normal file
View 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';
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"}));
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});
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');
});
</script>
</body>
</html>

View File

@@ -0,0 +1,55 @@
<!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';
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}, projection: "AIT", cooFrame: 'galactic', target: "93.2721132 -20.9942421", fov: 1000, showGotoControl: false, showFrame: false, fullScreen: true, showLayersControl: true, showCooGrid: false, 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"});
aladin.setOverlayImageLayer("CFHT", "CFHT");
aladin.setOverlayImageLayer("Nircam", "Nircam");
aladin.getOverlayImageLayer("CFHT").toggle();
aladin.getOverlayImageLayer("Nircam").toggle();
let fov = 1000;
let rotation = 0;
setInterval(function zoom() {
if (fov > 0.07) {
fov *= 0.997;
rotation += 0.07;
aladin.setRotation(rotation)
aladin.setFov(fov);
if (fov < 3 && fov > 0.5) {
let opacity = 1.0 - (fov - 0.5)/(3 - 0.5);
aladin.getOverlayImageLayer("CFHT").setOpacity(opacity);
}
if (fov < 0.5 && fov > 0.1) {
let opacity = 1.0 - (fov - 0.1)/(0.5 - 0.1);
aladin.getOverlayImageLayer("Nircam").setOpacity(opacity);
}
}
}, 10);
setInterval(function () {
const t = Date.now() / 1000;
let lambda = Math.sin(t) * 0.5 + 0.5;
})
});
</script>
</body>
</html>

View File

@@ -0,0 +1,25 @@
<!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', {projection: "TAN", survey: "P/HSC/DR2/deep/g", target: '02 21 36.529 -05 31 20.16', fov: 0.1});
let hscGreenSurvey = aladin.getBaseImageLayer();
hscGreenSurvey.setImageFormat("fits");
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"});
aladin.setOverlayImageLayer('CDS/P/HSC/DR2/deep/r', 'hsc red layer');
aladin.setOverlayImageLayer('CDS/P/HSC/DR2/deep/z', 'hsc blue layer');
});
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,400 @@
<!doctype html>
<html>
<head>
</head>
<body>
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
<div id="aladin-lite-div" style="width: 1024px; height: 768px">
<div id="notifier" style="position: absolute; left: 0px; bottom: 30px; width: 900px; height: auto; z-index: 100; font-family: Futura,Trebuchet MS,Arial,sans-serif; color: #fdfdfd; background: rgb(69,69,69); background: linear-gradient(90deg, rgba(69,69,69,0.7) 0%, rgba(69,69,69,0.6) 74%, rgba(69,69,69,0) 100%); display: hidden;">
<div style="margin-left: 50px;">
<div id="mainTitle" style="font-size: 53pt;"></div>
<div id="subTitle" style="font-size: 34pt;"></div>
</div>
</div>
</div>
<script type="module">
import A from '../src/js/A.js';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {cooFrame: 'galactic', fov: 400, fullScreen: true, showCooGrid: false, showReticle: false})
aladin.gotoRaDec(79.9525321, -69.2742586)
const gaiaFlux = aladin.createImageSurvey('P/DM/flux-G/I/355/gaiadr3', "GaiaDR3GFlux", null, null, null, {imgFormat: 'fits', stretch: 'log'})
aladin.setBaseImageLayer(gaiaFlux)
gaiaFlux.setCuts(3e5, 1e8)
aladin.setProjection('MOL')
function notify(title, sub, delay) {
$('#mainTitle').html(title)
$('#subTitle').html(sub)
$('#notifier').fadeIn(600).delay(delay).fadeOut(600)
}
// show grid opacity
function delay(t) {
return new Promise(resolve => setTimeout(resolve, t))
}
async function *interval(t, nbIteration) {
let itNb = 0
while(itNb < nbIteration) {
let now = Date.now()
yield itNb
await delay(now - Date.now() + t)
itNb++;
}
}
aladin.view.setGridConfig({opacity: 0, color: {r: 51/255, g: 209/255, b: 1}})
aladin.view.setGridConfig({enabled: true})
async function s_1() {
return new Promise((resolve, reject) => {
aladin.animateToRaDec(266.4150089, -29.0061110, 5, () => resolve())
})
}
async function showcaseProjections() {
aladin.setProjection('SIN')
await delay(2000)
aladin.setProjection('MER')
aladin.setFoV(400)
await delay(2000)
aladin.setProjection('HPX')
aladin.setFoV(400)
await delay(2000)
aladin.setProjection('AIT')
aladin.setFoV(400)
}
let gaiaRadvel
async function s0() {
gaiaRadvel = aladin.createImageSurvey('CDS/P/DM/radial-velocity/I/355/gaiadr3', "Gaia radial velocity", null, null, null)
gaiaRadvel.setOpacity(0.0)
notify('New HiPS overlay', 'Gaia DR3 radial velocity map', 4000)
//galex.setColormap('magma', {stretch: "Asinh"})
aladin.setOverlayImageLayer(gaiaRadvel)
for await(const it of interval(50, 40)) {
gaiaRadvel.setOpacity((it+1) / 40)
}
await delay(3000)
for await(const it of interval(50, 40)) {
gaiaRadvel.setOpacity(1 - it / 40)
}
gaiaRadvel.setOpacity(0)
}
async function showGrid() {
for await(const it of interval(50, 40)) {
aladin.view.setGridConfig({opacity: it / 40})
}
}
async function s2() {
return new Promise((resolve, reject) => {
aladin.animateToRaDec(339.2857279, 34.4199240, 5, () => resolve())
})
}
let galex
async function s3() {
galex = aladin.createImageSurvey('CDS/P/GALEXGR6_7/color', "GALEX", null, null, null)
galex.setOpacity(0.0)
//galex.setColormap('magma', {stretch: "Asinh"})
aladin.setOverlayImageLayer(galex)
}
async function s4() {
for await(const it of interval(50, 40)) {
galex.setOpacity((it+1) / 40)
}
}
async function s5() {
let nbIt = 230
let fovStart = 400
let fovEnd = 0.5
const intervalMs = 25
let fov;
fov = fovStart
for await(const it of interval(intervalMs, nbIt+1)) {
fov = fovStart / Math.pow(fovEnd/fovStart, -it/nbIt)
//fov = fovStart - (fovStart - fovEnd) * ((it+1) / nbIt)
//aladin.setFoV(400 - (fovStart - fovEnd) * ((it+1) / nbIt))
//fov = fovFakeEnd + (fovFakeStart - fovFakeEnd) * (1 - Math.pow((it) / nbIt, 0.15))
aladin.setFoV(fov)
}
aladin.setFoV(fovEnd)
}
async function s5_() {
/*
for await(const it of interval(50, 180)) {
aladin.setFoV(400 - 399.5 * ((it+1) / 180))
}
*/
return new Promise((resolve, reject) => {
aladin.zoomToFoV(5, 3, () => resolve());
})
}
async function hideGrid() {
for await(const it of interval(50, 40)) {
aladin.view.setGridConfig({opacity: 1 - it / 40})
}
}
async function s7() {
return new Promise((resolve, reject) => {
aladin.animateToRaDec(339.0146901, 33.9600401, 5, () => resolve())
})
}
let panstarrs
async function s77() {
panstarrs = aladin.createImageSurvey('CDS/P/PanSTARRS/DR1/g', "PanSTARRS g", null, null, null)
panstarrs.setOpacity(0.0)
panstarrs.setColormap('viridis', {stretch: "Asinh"})
aladin.setOverlayImageLayer(panstarrs, 'panstarrs')
for await(const it of interval(50, 40)) {
panstarrs.setOpacity((it+1) / 40)
}
}
let stephansMIRI
async function s8() {
stephansMIRI = aladin.createImageSurvey('CDS/P/JWST/Stephans-Quintet/MIRI', "stephansMIRI", null, null, null)
stephansMIRI.setOpacity(0.0)
//galex.setColormap('magma', {stretch: "Asinh"})
aladin.setOverlayImageLayer(stephansMIRI, 'stephansMIRI')
for await(const it of interval(25, 100)) {
stephansMIRI.setOpacity((it+1) / 100)
}
}
async function s9() {
return new Promise((resolve, reject) => {
aladin.zoomToFoV(0.125, 5, () => resolve())
})
}
async function s10() {
for await(const it of interval(50, 80)) {
aladin.setRotation(0.5 * it)
}
}
let stephansNIRCamMIRI
async function s11() {
stephansNIRCamMIRI = aladin.createImageSurvey('CDS/P/JWST/Stephans-Quintet/NIRCam+MIRI', "stephansMIRI", null, null, null)
stephansNIRCamMIRI.setOpacity(0.0)
aladin.setOverlayImageLayer(stephansNIRCamMIRI, 'stephansNIRCamMIRI')
for await(const it of interval(25, 180)) {
if (it==80) {
aladin.animateToRaDec(339.0152849, 33.9755441, 25 * 260 / 1000)
aladin.zoomToFoV(2 / 60, 25 * 260 / 1000)
}
stephansNIRCamMIRI.setOpacity((it+1) / 180)
}
await delay(180*25 + 500)
}
async function zoomoutAndgoToMeerkat() {
for await(const it of interval(25, 10)) {
panstarrs && panstarrs.setOpacity(1 - it / 10)
}
panstarrs && panstarrs.setOpacity(0)
let nbIt = 200
let fovStart = 2/60
let fovEnd = 360
let intervalMs = 25
let fov;
fov = fovStart
for await(const it of interval(intervalMs, nbIt+1)) {
fov = fovStart / Math.pow(fovEnd/fovStart, -it/nbIt)
aladin.setFoV(fov)
galex && galex.setOpacity(Math.max(0, 1 - it / 2*nbIt))
}
aladin.setFoV(fovEnd)
galex && galex.setOpacity(0)
await delay(300)
aladin.animateToRaDec(266.2800147, -29.2222859, 5)
await delay(5000)
notify('New HiPS overlay', 'MeerKAT 1284MHz', 6000)
const meerkat = aladin.createImageSurvey('P/MeerKAT/Galactic-Centre-1284MHz-StokesI', "Galactic-Centre-1284MHz-StokesI", null, null, null, {imgFormat: 'fits'});
meerkat.setColormap('magma', {stretch: "Asinh"})
meerkat.setOpacity(0.0)
aladin.setOverlayImageLayer(meerkat, 'meerkat')
for await(const it of interval(25, 40)) {
meerkat.setOpacity((it+1) / 40)
}
nbIt = 300
fovStart = 360
fovEnd = 5.4
fov = fovStart
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.setFoV(fovEnd)
await delay(500)
notify('', 'Color map changes and contrast adjustment from FITS tiles', 3000)
let cutMin = -0.0004
let cutMax = 0.01
intervalMs = 25
for await(const it of interval(intervalMs, 1000)) {
switch(it) {
case 150:
meerkat.setColormap('parula')
break
case 300:
meerkat.setColormap('eosb')
break
case 450:
meerkat.setColormap('spectral')
break
case 600:
meerkat.setColormap('ylorbr')
break
case 750:
meerkat.setColormap('ylorbr', {reversed: true})
break
}
//const t = Date.now() / 1000;
const t = it / 25
let lambda = Math.sin(t) * 0.5 + 0.5
let cut0 = -0.0004 * lambda + (1 - lambda) * -0.00132
let cut1 = 0.005 * lambda + (1 - lambda) * 0.05759
meerkat.setCuts(cut0, cut1)
}
}
async function animation() {
await delay(1000)
notify('Background HiPS:', 'Gaia DR3 G flux map', 3000)
await s_1()
notify('', 'Enable coordinates grid', 2500)
await delay(1000)
await showGrid()
await delay(1000)
notify('Projection support:', 'Orthographic, Mercator, HEALPix, Aitoff', 6500)
await delay(1000)
await showcaseProjections()
await delay(1000)
await s0()
await delay(1000)
await s2()
notify('New HiPS overlay', 'GALEX GR6/7', 4000)
await delay(500)
await s3()
await s4()
await s5()
await delay(800)
await hideGrid()
await delay(300)
notify('', 'Center view on Stephan\'s Quintet', 3800)
await s7()
await delay(300)
notify('New HiPS overlay', 'PanSTARRS g', 3000)
await s77()
await delay(300)
await s9()
await delay(300)
notify('New HiPS overlay', 'JWST MIRI', 3000)
await s8()
await delay(300)
await s10()
await delay(300)
notify('New HiPS overlay', 'JWST NIRCam + MIRI', 4000)
await s11()
await delay(300)
await zoomoutAndgoToMeerkat()
};
animation();
});
</script>
</body>
</html>

View File

@@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
<!--<link rel="stylesheet" href="./layers.css" />-->
</head>
<body>
<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', {survey: "P/SPITZER/color", cooFrame: 'galactic', fov: 5});
aladin.gotoRaDec(266.41683, -29.00781);
// Parameters are:
// <right ascension of final position>,
// <declination of final position>,
// <animation duration in seconds>
aladin.animateToRaDec(305.5, 38.5, 70);
});
</script>
</body>
</html>

29
examples/al-artifact.html Normal file
View File

@@ -0,0 +1,29 @@
<!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';
let aladin;
A.init.then(() => {
var aladin = A.aladin(
'#aladin-lite-div',
{
survey: 'https://alasky.cds.unistra.fr/Pan-STARRS/DR1/color-z-zg-g/', // set initial image survey
projection: 'SIN', // set a projection
fov: 114.19, // initial field of view in degrees
target: '19 24 51.556 +45 16 44.36', // initial target
cooFrame: 'equatorial', // set galactic frame
showCooGrid: true, // set the grid
fullScreen: true,
}
);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,17 @@
<!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: 70,projection: "AIT"});
let hsc = aladin.newImageSurvey("P/HSC/DR2/deep/g", {colormap:"Purples", imgFormat: "fits"});
aladin.setBaseImageLayer(hsc);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,34 @@
<!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(() => {
// 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);
overlay.add(A.circle(83.66067, 22.03081, 40.0, {color: 'cyan'})); // radius in degrees
aladin.on("footprintClicked", (footprint) => {
console.log("footprint clicked catched", footprint)
})
aladin.on("objectClicked", (object) => {
console.log("object clicked catched", object)
})
aladin.on("footprintHovered", (footprint) => {
console.log("footprint hovered catched", footprint)
})
aladin.on("objectHoveredStop", (object) => {
console.log("Object hovered stopped", object)
})
});
</script>
</body>
</html>

View File

@@ -0,0 +1,71 @@
<!doctype html>
<html>
<head>
<!--<link rel="stylesheet" href="./layers.css" />-->
</head>
<body>
<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(() => {
// Start up Aladin Lite
aladin = A.aladin('#aladin-lite-div', {target: '12 25 41.512 +12 48 47.2', fov: 0.8});
// define custom draw function
var drawFunction = function(source, canvasCtx, viewParams) {
canvasCtx.beginPath();
canvasCtx.arc(source.x, source.y, source.data['size'] * 2, 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]);
// object name is displayed only if fov<10°
if (fov>10) {
return;
}
canvasCtx.globalAlpha = 0.9;
canvasCtx.globalAlpha = 1;
var xShift = 20;
canvasCtx.font = '15px Arial'
canvasCtx.fillStyle = '#eee';
canvasCtx.fillText(source.data['name'], source.x + xShift, source.y -4);
// object type is displayed only if fov<2°
if (fov>2) {
return;
}
canvasCtx.font = '12px Arial'
canvasCtx.fillStyle = '#abc';
canvasCtx.fillText(source.data['otype'], source.x + 2 + xShift, source.y + 10);
};
// create sources objects
var M87 = A.source(187.7059308, 12.3911233, {name: 'M 87', size: 4.5, otype: 'LINER AGN'});
var M49 = A.source(187.444992, 8.000411, {name: 'M 49', size: 6.28, otype: 'Seyfert 2'});
var M100 = A.source(185.728746, 15.822381, {name: 'M 100', size: 7.23, otype: 'AGN'});
var M84 = A.source(186.26559721, 12.88698314, {name: 'M 84', size: 3.91, otype: 'Seyfert 2'});
var M60 = A.source(190.916700, 11.552611, {name: 'M 60', size: 4.75, otype: 'Galaxy in pair of galaxies'});
var NGC4388 = A.source(186.445083, 12.662069 , {name: 'NGC 4388', size: 3.72, otype: 'Seyfert 2'});
var NGC4261 = A.source(184.84673421, 5.82491522 , {name: 'NGC 4261', size: 2.78, otype: 'LINER AGN'});
var M86 = A.source(186.549225, 12.945969, {name: 'M 86', size: 6.03, otype: 'Galaxy in group of galaxies'});
// create catalog layer with custom draw function
var cat = A.catalog({name: 'Virgo cluster', shape: drawFunction});
// add sources to the new layer
cat.addSources([M87, M49, M100, M84, M60, NGC4388, NGC4261, M86]);
aladin.addCatalog(cat);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,31 @@
<!doctype html>
<html>
<head>
<!--<link rel="stylesheet" href="./layers.css" />-->
</head>
<body>
<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', {survey: 'P/DSS2/red', target: 'M50', fov: 0.3});
var customImg = new Image();
customImg.onload = function() {
var cat = A.catalog({shape: customImg});
aladin.addCatalog(cat);
cat.addSources(A.source(105.69239256, -8.45235969));
cat.addSources(A.source(105.70779763, -8.31350997));
cat.addSources(A.source(105.74242906, -8.34776709));
};
customImg.src = 'https://aladin.u-strasbg.fr/AladinLite/doc/API/examples/img/star.png';
});
</script>
</body>
</html>

View File

@@ -0,0 +1,31 @@
<!doctype html>
<html>
<head>
<!--<link rel="stylesheet" href="./layers.css" />-->
</head>
<body>
<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', {survey: 'P/DSS2/red', target: 'M50', fov: 0.7});
var cat1 = A.catalog({readOnly: true});
aladin.addCatalog(cat1);
cat1.addSources(A.source(105.69239256, -8.45235969));
cat1.addSources(A.source(105.70779763, -8.31350997));
cat1.addSources(A.source(105.74242906, -8.34776709));
var cat2 = A.catalog({readOnly: false});
aladin.addCatalog(cat2);
cat2.addSources(A.source(105.79239256, -8.45235969));
cat2.addSources(A.source(105.90779763, -8.31350997));
cat2.addSources(A.source(105.54242906, -8.34776709));
});
</script>
</body>
</html>

View File

@@ -0,0 +1,45 @@
<!doctype html>
<html>
<head>
</head>
<body>
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
Show sources with proper motion greater than:
<input id='slider' style='vertical-align:middle;width:60vw;' step='1' min='0' max='10' type='range' value='0'>
<span id='pmVal' >0 mas/yr</span><br><br><div id='aladin-lite-div' style='width: 500px;height: 500px;'></div>
<script type="module">
import A from '../src/js/A.js';
let aladin;
A.init.then(() => {
var pmThreshold = 0;
var slider = document.getElementById('slider');
slider.oninput = function() {
pmThreshold = this.value;
$('#pmVal').html(pmThreshold + ' mas/yr');
cat.reportChange();
}
var myFilterFunction = function(source) {
var hpmag = parseFloat(source.data['Hpmag']);
if (isNaN(hpmag)) {
return false;
}
return hpmag>pmThreshold;
}
aladin = A.aladin('#aladin-lite-div', {target: 'M 45', fov: 5});
var cat = A.catalogFromVizieR('I/311/hip2', 'M 45', 5, {onClick: 'showTable', filter: myFilterFunction});
aladin.addCatalog(cat);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,52 @@
<!doctype html>
<html>
<head>
</head>
<body>
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
Show sources with proper motion greater than:
<input id='slider' style='vertical-align:middle;width:60vw;' step='1' min='0' max='500' type='range' value='0'>
<span id='pmVal' >0 mas/yr</span><br><br><div id='aladin-lite-div' style='width: 500px;height: 500px;'></div>
<script type="module">
import A from '../src/js/A.js';
let aladin;
A.init.then(() => {
var pmThreshold = 0;
var slider = document.getElementById('slider');
slider.oninput = function() {
pmThreshold = this.value;
$('#pmVal').html(pmThreshold + ' mas/yr');
hips.reportChange();
}
var myFilterFunction = function(source) {
var pmra = parseFloat(source.data['pmra']);
var pmdec = parseFloat(source.data['pmdec']);
if (isNaN(pmra) || isNaN(pmdec)) {
return false;
}
var totalPm = Math.sqrt(pmra*pmra+pmdec*pmdec);
return totalPm>pmThreshold;
}
aladin = A.aladin('#aladin-lite-div', {target: 'gal center',fov: 150, showContextMenu: true});
var hips = A.catalogHiPS('http://axel.u-strasbg.fr/HiPSCatService/I/345/gaia2', {onClick: 'showTable', color: 'orange', name: 'Gaia', filter: myFilterFunction});
aladin.addCatalog(hips);
$('input[type=radio][name=otype]').change(function() {
requestedOtype = this.value;
hips.reportChange();
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,42 @@
<!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';
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]);
// object name is displayed only if fov<10°
if (fov>10) {
return;
}
canvasCtx.globalAlpha = 0.9;
canvasCtx.globalAlpha = 1;
};
var hips = A.catalogHiPS('https://axel.u-strasbg.fr/HiPSCatService/Simbad', {onClick: 'showTable', name: 'Simbad', shape: drawFunction});
aladin.addCatalog(hips);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<!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';
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: 'showTable', name: 'Simbad'});
aladin.addCatalog(hips);
});
</script>
</body>
</html>

27
examples/al-cfht.html Normal file
View 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';
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.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'});
aladin.setOverlayImageLayer('CFHT', 'overlay_CFHT');
aladin.setOverlayImageLayer('CDS/P/JWST/Stephans-Quintet/NIRCam+MIRI', 'overlay_JWST1');
aladin.setOverlayImageLayer('JWST2', 'overlay_JWST2');
aladin.getOverlayImageLayer('overlay_JWST1').setAlpha(0.0);
aladin.getOverlayImageLayer('overlay_JWST2').setAlpha(0.0);
});
</script>
</body>
</html>

22
examples/al-chinavo.html Normal file
View File

@@ -0,0 +1,22 @@
<!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';
let aladin;
A.init.then(() => {
// Start up Aladin Lite
aladin = A.aladin('#aladin-lite-div', {target: 'M81', fov: 360, showCooGrid: true});
aladin.setImageSurvey(
aladin.newImageSurvey('https://hips.china-vo.org/change2-moon-7m-dom', {imgFormat: 'png', colormap: "redtemperature"})
);
});
</script>
</body>
</html>

531
examples/al-coronelli.html Normal file
View File

@@ -0,0 +1,531 @@
<!doctype html>
<html>
<head>
<meta name="apple-mobile-web-app-capable" content="yes">
<!--<link rel="manifest" href="manifest.json">-->
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<script type="text/javascript" defer="" async="" src="https://cdsannotations.u-strasbg.fr/piwik/piwik.js"></script><script type="text/javascript" src="js/libs/jquery-3.5.1.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/purecss@2.0.3/build/pure-min.css" integrity="sha384-cg6SkqEOCV1NbJoCu11+bm0NvBRc8IYLRGXkmNrqUBfTjmMYwNKPWBTIKyw9mHNJ" crossorigin="anonymous">
<!--link rel="stylesheet" href="css/pure-min.css"-->
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.1/build/base-min.css">
<!--link rel="stylesheet" href="css/base-min.css"-->
<link rel="stylesheet" href="https://unpkg.com/purecss@2.0.3/build/grids-min.css">
<link rel="stylesheet" href="https://unpkg.com/purecss@2.0.3/build/grids-responsive-min.css">
<!--link rel="stylesheet" href="css/grids-responsive-min.css"-->
<link rel="stylesheet" href="https://unpkg.com/purecss@2.0.3/build/buttons.css">
<link rel="stylesheet" href="https://unpkg.com/purecss@2.0.3/build/buttons-core.css">
<!--meta name="viewport" content="initial-scale=1.0, user-scalable=no"-->
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
</head>
<body>
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript">
let aladin;
</script>
<div id="aladin-lite-div" style="width:100vw;height:100vh;">
<div id="calibCircle" style="display: none;"></div>
<div id="explain" class="aladin-box"></div>
<div id="overlayDiv" style="position: absolute; width: 100%; height: 100%; z-index:4; display: none;"><canvas id="drawOverlay"></canvas></div>
<div id="layersControlLeft" class="aladin-box" style="display: block;">
<!-- temporaire gestion cercle -->
<label for="circle-checkbox">Cercle</label> <input id="circle-checkbox" type="checkbox" unchecked=""><br><br>
<!-- fin temporaire gestion cercle -->
<b>Orientation</b><br>
<button id="hips-coronelli" class="pure-button" name="ref-hips" onclick="aladin.setImageSurvey('Coronelli')">Normal</button><br>
<button id="hips-illenoroc" class="pure-button" name="ref-hips" onclick="aladin.setImageSurvey('illenoroC')">Inversé</button>
<br><br>
<b>Constellations</b>
<br>
<a id="constellations-boundaries" class="pure-button catlayer" href="#">Frontières</a><br>
<a id="const-outlines" class="pure-button img-hips" href="#">Tracé</a><br>
<a id="const-jaxa" class="pure-button img-hips" href="#">JAXA</a>
<br>
<b>Ciel</b>
<br>
<a id="P/Mellinger/color" class="pure-button img-hips" href="#">Mellinger</a><br>
<a id="dss2" class="pure-button img-hips" href="#">DSS</a><br>
<a id="decaps" class="pure-button img-hips" href="#">DECaPS</a><br>
<a id="panstarrs" class="pure-button img-hips" href="#">PanSTARRS</a><br>
<a id="gaiamap" class="pure-button img-hips" href="#">Gaia</a>
<br><br><label for="overlay-checkbox">Dessin</label> <input id="overlay-checkbox" type="checkbox" unchecked="">
</div>
<div id="layersCL2" class="aladin-box" style="display: block;">
Opacité<br>
<input id="opacity-slider" type="range" min="0" max="1" step="0.01" value="0.0"><br>
</div>
<div id="layersControlRight" class="aladin-box" style="display: block;">
<b>Data</b><br>
<a id="simbad" class="pure-button catlayer" href="#">SIMBAD</a><br>
<a id="gaia" class="pure-button catlayer" href="#">Gaia DR2</a>
<br><br>
<div>Coronelli<br>
<!--a id="coronelli-stars" class="pure-button catcoro" href="#">Coronelli</a-->
<a href="#"><img id="coronelli-stars-white" class="catcoro coro-star" src="star_white.png"></a>
<a href="#"><img id="coronelli-stars-yellow" class="catcoro coro-star" src="star_yellow.png"></a><br>
<a href="#"><img id="coronelli-stars-red" class="catcoro coro-star" src="star_red.png"></a>
<a href="#"><img id="coronelli-stars-blue" class="catcoro coro-star" src="star_blue.png"></a>
</div>
<br><br>
<b>Navigation</b>&nbsp;&nbsp;<br><button id="stop">Stop</button>
<br>
<div id="coo_epoca">
<a class="pure-button nav-button nav-goto" href="#">De Epoca</a><br>
&nbsp;&nbsp;<a class="pure-button nav-button nav-flyto" href="#">Move</a>
</div>
<div id="coo_legende">
<a class="pure-button nav-button nav-goto" href="#">Légende</a><br>
&nbsp;&nbsp;<a class="pure-button nav-button nav-flyto" href="#">Move</a>
</div>
<div id="coo_orion">
<a class="pure-button nav-button nav-goto" href="#">Orion</a><br>
&nbsp;&nbsp;<a class="pure-button nav-button nav-flyto" href="#">Move</a>
</div>
<div id="coo_magellan">
<a class="pure-button nav-button nav-goto" href="#">Magellan</a><br>
&nbsp;&nbsp;<a class="pure-button nav-button nav-flyto" href="#">Move</a>
</div>
<div id="coo_halley">
<a class="pure-button nav-button nav-goto" href="#">Halley</a><br>
&nbsp;&nbsp;<a class="pure-button nav-button nav-flyto" href="#">Move</a>
</div>
</div>
<style type="text/css"> .aladin-reticleColor { color: rgb(178, 50, 178); font-weight:bold;} </style>
<style type="text/css">
html, body {
height: 100%;
}
body {
display: flex;
flex-direction: column;
}
.aladin-zoomControl {
top: 10% !important;
left: unset !important;
right: 4px !important;
}
.aladin-zoomControl a {
font-size: 24px !important;
padding: 22px !important;
}
#aladin{
flex: 1 1 0;
}
#explain {
padding: 4px;
top: 30%;
max-height: 50%;
font-size: 11pt;
overflow: scroll;
}
#explain tbody tr:nth-child(even) {
background-color: #ffffff;
}
#explain tbody tr:nth-child(odd) {
background-color: #ccdaeb;
}
#layersControlLeft {
padding: 10px;
right: unset;
left: 4px;
top: 20vh;
}
#layersCL2 {
padding: 10px;
right: unset;
left: 4px;
top: 90vh;
}
#layersControlRight {
padding: 4px;
left: unset;
right: 4px;
top: 25vh;
}
#layersControlLeft, #layersControlRight, #layersCL2 input {
margin-right: 5px;
}
.img-hips {
padding: 5px;
margin: 5px;
}
#opacity-slider {
-webkit-appearance: none !important; /* Override default CSS styles */
width: 220px;
height: 25px;
}
#opacity-slider::-webkit-slider-thumb {
-webkit-appearance: none !important; /* Override default look */
appearance: none;
width: 25px; /* Set a specific slider handle width */
height: 25px; /* Slider handle height */
background: #4CAF50; /* Green background */
cursor: pointer; /* Cursor on hover */
}
#opacity-slider::-moz-range-thumb {
width: 25px; /* Set a specific slider handle width */
height: 25px; /* Slider handle height */
background: #4CAF50; /* Green background */
cursor: pointer; /* Cursor on hover */
}
.aladin-box {
font-size: 12px !important;
}
#calibCircle {
position: fixed;
border: 8px solid red;
border-radius: min(50vw, 50vh);
height: min(100vw, 100vh);
width: min(100vw, 100vh);
top: -8px;
left: calc(max(50vw, 50vh) - min(50vw, 50vh) - 8px);
z-index: 1000;
pointer-events: none;
}
.pure-table {
font-size: small;
}
.catcoro {
display: inline;
vertical-align: middle;
}
.coro-star {
vertical-align: middle;
}
</style>
<script type="module">
import A from '../src/js/A.js';
import {Utils} from '../src/js/Utils';
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.createImageSurvey('illenoroC', 'illenoroC', hipsDir, 'equatorial', 4, {imgFormat: 'jpg', longitudeReversed: false});
aladin.createImageSurvey('Coronelli', 'Coronelli', hipsDir, 'equatorial', 4, {imgFormat: 'jpg', longitudeReversed: true});
aladin.setImageSurvey('Coronelli');
$('#layersControlLeft').show();
$('#layersCL2').show();
$('#layersControlRight').show();
var hipsCats = {
'constellations-boundaries': A.catalogFromVizieR('VI/49/bound_20', '0 +0', 180, {color: 'red'}),
'simbad': A.catalogHiPS('http://axel.u-strasbg.fr/HiPSCatService/Simbad', {name: 'Simbad', color: '#6dbdce'}),
'gaia': A.catalogHiPS('http://axel.u-strasbg.fr/HiPSCatService/I/345/gaia2', {name: 'Gaia DR2', color: '#6666cc', shape: 'circle', sourceSize: 6})
};
hipsCats['simbad'].hide();
hipsCats['constellations-boundaries'].hide();
hipsCats['gaia'].hide();
aladin.addCatalog(hipsCats['simbad']);
aladin.addCatalog(hipsCats['constellations-boundaries']);
aladin.addCatalog(hipsCats['gaia']);
var coronelliStars = {
'coronelli-stars-white': A.catalogFromURL("http://cdsweb.u-strasbg.fr/~derriere/coronelli/white.xml", {name: 'Coronelli white', color: '#ffffff', shape: 'rhomb', sourceSize: 10}),
'coronelli-stars-yellow': A.catalogFromURL("http://cdsweb.u-strasbg.fr/~derriere/coronelli/yellow.xml", {name: 'Coronelli yellow', color: '#f6f874', shape: 'rhomb', sourceSize: 10}),
'coronelli-stars-red': A.catalogFromURL("http://cdsweb.u-strasbg.fr/~derriere/coronelli/red.xml", {name: 'Coronelli red', color: '#ff5555', shape: 'rhomb', sourceSize: 10}),
'coronelli-stars-blue': A.catalogFromURL("http://cdsweb.u-strasbg.fr/~derriere/coronelli/blue.xml", {name: 'Coronelli blue', color: '#1ca5ec', shape: 'rhomb', sourceSize: 10})
};
coronelliStars['coronelli-stars-white'].hide();
coronelliStars['coronelli-stars-yellow'].hide();
coronelliStars['coronelli-stars-red'].hide();
coronelliStars['coronelli-stars-blue'].hide();
aladin.addCatalog(coronelliStars['coronelli-stars-white']);
aladin.addCatalog(coronelliStars['coronelli-stars-yellow']);
aladin.addCatalog(coronelliStars['coronelli-stars-red']);
aladin.addCatalog(coronelliStars['coronelli-stars-blue']);
// ajout de nouveaux relevés custom ?
// Mellinger : P/Mellinger/color
// PanSTARRS couleur : CDS/P/PanSTARRS/DR1/color-i-r-g
// gaia flux : CDS/P/DM/flux-color-Rp-G-Bp/I/345/gaia2
aladin.createImageSurvey("dss2", "DSS color", "http://alasky.u-strasbg.fr/DSS/DSSColor/", "equatorial", 9, {imgFormat: 'jpg'});
aladin.createImageSurvey("decaps", "DECaPS DR1", "http://alasky.u-strasbg.fr/DECaPS/DR1/color/", "equatorial", 11, {imgFormat: 'png'});
aladin.createImageSurvey("gaiamap", "Gaia Flux", "http://alasky.u-strasbg.fr/ancillary/GaiaDR2/color-Rp-G-Bp-flux-map/", "equatorial", 4, {imgFormat: 'jpg'});
aladin.createImageSurvey("panstarrs", "PanSTARRS", "http://alasky.u-strasbg.fr/Pan-STARRS/DR1/color-i-r-g/", "equatorial", 11, {imgFormat: 'jpg'});
aladin.createImageSurvey('const-outlines', 'Constellation outlines', 'http://alaskybis.u-strasbg.fr/JAXA/JAXA_P_CONSTELLATIONS5/', 'equatorial', 6, {imgFormat: 'png'});
aladin.createImageSurvey('const-jaxa', 'Constellation by JAXA', 'http://alaskybis.u-strasbg.fr/JAXA/JAXA_P_CONSTELLATIONS6/', 'equatorial', 6, {imgFormat: 'png'});
var curSelectedSource = null;
aladin.setOverlayImageLayer('P/Mellinger/color');
aladin.getOverlayImageLayer().setAlpha(0.0);
// listen changes on HiPS image background selection
$('.img-hips').click(function() {
if (!$(this).hasClass("selected")) {
$('.img-hips').removeClass("selected pure-button-active");
$(this).addClass("selected pure-button-active");
let survey = aladin.setOverlayImageLayer(this.id);
survey.setAlpha(0.75);
$('#opacity-slider').val(0.75);
}
else {
$(this).removeClass("selected pure-button-active");
// possibilité ? aladin.setOverlayImageLayer(null);
aladin.getOverlayImageLayer().setAlpha(0);
$('#opacity-slider').val(0);
}
});
$('#opacity-slider').on('input', function() {
aladin.getOverlayImageLayer().setAlpha($(this).val());
});
// listen changes on HiPS catalogues selection
$('.catlayer').click(function() {
var cat = hipsCats[$(this).attr('id')];
if (!$(this).hasClass("selected")) {
$(this).addClass("selected pure-button-active");
cat.show();
}
else {
$(this).removeClass("selected pure-button-active");
cat.hide();
}
});
// listen changes on Coronelli catalogues selection
$('.catcoro').click(function() {
var cat = coronelliStars[$(this).attr('id')];
if (!$(this).hasClass("selected")) {
$(this).addClass("selected");
cat.show();
}
else {
$(this).removeClass("selected");
cat.hide();
}
});
var cooNav = {
'coo_epoca': {ra: 4.0, dec: -30.0, time: 10},
'coo_legende': {ra: 33.0, dec: -32.0, time: 10},
'coo_orion': {ra: 85.2, dec: -2.5, time: 10},
'coo_magellan': {ra: 45.0, dec: -79.0, time: 10},
'coo_halley': {ra: 219.6, dec: 7.0, time: 10}
};
// listen click on navigation buttons
$('.nav-button').click(function() {
var cooTarget = $(this).parent().attr('id');
if ($(this).hasClass("nav-goto")) {
aladin.gotoRaDec(cooNav[cooTarget].ra, cooNav[cooTarget].dec);
}
else if ($(this).hasClass("nav-flyto")) {
aladin.animateToRaDec(cooNav[cooTarget].ra, cooNav[cooTarget].dec, cooNav[cooTarget].time);
}
});
// stop animations
$('#stop').click(function() {
aladin.stopAnimation();
});
// listen to click on objects
aladin.on('objectClicked', function(source, xyMouseCoords) {
var html = '<table class="pure-table">';
if (curSelectedSource != null) {
curSelectedSource.deselect();
}
if (source==null) {
$('#explain').html('');
$('#explain').hide();
return;
}
source.select();
curSelectedSource = source;
html += '<tbody>';
if (source.catalog.name == 'Simbad') {
html += '<h3>Simbad object <em>' + source.data.main_id + '</em></h3>';
html += '<tr class="pure-table-odd"><td><b>ra</b></td><td>' + source.data.ra + '</td><td><em>deg</em></td></tr>';
html += '<tr><td><b>dec</b></td><td>' + source.data.dec + '</td><td><em>deg</em></td></tr>';
html += '<tr><td><b>main_type</b></td><td>' + source.data.main_type + '</td><td><em>deg</em></td></tr>';
html += '<tr class="pure-table-odd"><td><b>pmra</b></td><td>' + source.data.pmra + '</td><td><em>mas/yr</em></td></tr>';
html += '<tr><td><b>pmdec</b></td><td>' + source.data.pmdec + '</td><td><em>mas/yr</em></td></tr>';
html += '<tr class="pure-table-odd"><td><b>parallax</b></td><td>' + source.data.plx + '</td><td><em>mas</em></td></tr>';
html += '<tr><td><b>B mag.</b></td><td>' + source.data.B + '</td><td><em>mag</em></td></tr>';
html += '<tr class="pure-table-odd"><td><b>V mag.</b></td><td>' + source.data.V + '</td><td><em>mag</em></td></tr>';
html += '</tbody>';
html += '</table>';
html += '<br/><a target="_blank" href="http://simbad.u-strasbg.fr/simbad/sim-id?Ident=' + encodeURIComponent(source.data.main_id) + '">More details</a>';
}
$('#explain').html(html);
$('#explain').show();
});
aladin.on('fullScreenToggled', function(fullScreenFlag) {
setTimeout(initOverlayCanvas, 500);
if (fullScreenFlag) {
$('#calibCircle').show();
//temporaire gestion cercle
document.getElementById("circle-checkbox").checked = true;
}
else {
$('#calibCircle').hide();
//temporaire gestion cercle
document.getElementById("circle-checkbox").checked = false;
}
});
//temporaire gestion cercle
document.getElementById("circle-checkbox").addEventListener('change', (event) => {
if (event.target.checked) {
$('#calibCircle').show();
} else {
$('#calibCircle').hide();
}
})
// enable/disable overlay layer
document.getElementById("overlay-checkbox").addEventListener('change', (event) => {
if (!drawOverlayCanvas) {
return;
}
if (event.target.checked) {
$('#overlayDiv').show();
initOverlayCanvas();
} else {
$('#overlayDiv').hide();
}
})
/*
document.addEventListener('touchmove', function (event) {
if (event.scale !== 1) { event.preventDefault(); }
}, false);
var lastTouchEnd = 0;
document.addEventListener('touchend', function (event) {
var now = (new Date()).getTime();
if (now - lastTouchEnd <= 300) {
event.preventDefault();
}
lastTouchEnd = now;
}, false);
*/
/*
document.addEventListener("touchstart", event => {
if(event.touches.length > 1) {
console.log("zoom plz stahp");
event.preventDefault();
//event.stopPropagation(); // maybe useless
}
}, {passive: false});
*/
// initialize drawOverlay
var drawOverlayCanvas = document.getElementById('drawOverlay');
var timeBeforeDeletion = 7 * 1000; // in ms
var drawOverlayCtx;
var deleteOverlayTimeout;
var points = [];
function initOverlayCanvas() {
drawOverlayCanvas.style.width='100%';
drawOverlayCanvas.style.height='100%';
drawOverlayCanvas.width = drawOverlayCanvas.offsetWidth;
drawOverlayCanvas.height = drawOverlayCanvas.offsetHeight;
drawOverlayCtx = drawOverlayCanvas.getContext('2d');
drawOverlayCtx.lineWidth = 10;
drawOverlayCtx.lineJoin = drawOverlayCtx.lineCap = 'round';
drawOverlayCtx.strokeStyle = 'rgba(240, 0, 0, 0.7)';
points = [];
}
function deleteOverlayCanvas() {
drawOverlayCtx.clearRect(0, 0, drawOverlayCtx.canvas.width, drawOverlayCtx.canvas.height);
points = [];
}
if (drawOverlayCanvas) {
var isDrawing = false;
$(drawOverlayCanvas).on('mousedown touchstart', function(e) {
if (deleteOverlayTimeout) {
clearTimeout(deleteOverlayTimeout);
deleteOverlayTimeout = undefined;
}
isDrawing = true;
points.push([Utils.relMouseCoords(drawOverlayCanvas.imageCanvas, e)]);
});
$(drawOverlayCanvas).on('mousemove touchmove', function(e) {
if (!isDrawing) return;
e.preventDefault();
drawOverlayCtx.clearRect(0, 0, drawOverlayCtx.canvas.width, drawOverlayCtx.canvas.height);
points[points.length-1].push(Utils.relMouseCoords(drawOverlayCanvas.imageCanvas, e));
drawOverlayCtx.beginPath();
for (var k=0; k<points.length; k++) {
drawOverlayCtx.moveTo(points[k][0].x, points[k][0].y);
for (var i = 1; i < points[k].length; i++) {
drawOverlayCtx.lineTo(points[k][i].x, points[k][i].y);
}
}
drawOverlayCtx.stroke();
});
drawOverlayCanvas.onmouseup = drawOverlayCanvas.ontouchend = function() {
isDrawing = false;
deleteOverlayTimeout = setTimeout(deleteOverlayCanvas, timeBeforeDeletion);
};
}
});
</script>
</body>
</html>

View File

@@ -0,0 +1,37 @@
<!doctype html>
<html>
<head>
</head>
<body>
<div id="aladin-lite-div" style="width:440px;height:300px"></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.displayFITS(
//'https://fits.gsfc.nasa.gov/samples/FOCx38i0101t_c0f.fits', // url of the fits file
'fits/HorseHead.fits',
//'fits/neowise.fits',
//'fits/irac.fits',
//'fits/FOCx38i0101t_c0f.fits',
{
minCut: 5000,
maxCut: 17000,
}, // no optional params
(ra, dec, fov, image) => {
// ra, dec and fov are centered around the fits image
image.setColormap("magma", {stretch: "asinh"});
aladin.gotoRaDec(ra, dec);
aladin.setFoV(fov);
},
);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,58 @@
<!doctype html>
<html>
<head>
</head>
<body>
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
Image Opacity: <br/> <input id="slider" type="range" value=1 min=0 max=1 step=0.05 ; style="width:120px;height:5px;line-height:0%">
<br/>
<br/>
<div id="aladin-lite-div" style="width:440px;height:300px"></div>
<input id="DSS" type="radio" name="survey" value="P/DSS2/Color" checked><label for="DSS">Optical (DSS2) <label>
<input id="2MASS" type="radio" name="survey" value="P/2MASS/Color"><label for="2MASS">Infrared (2MASS)<label>
<script type="module">
import A from '../src/js/A.js';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {target: "0 0", cooFrame: "gal"});
var callback = function(ra, dec, fov) {
aladin.addCatalog(A.catalogFromSimbad( {ra: ra, dec: dec} , 1 , {shape: 'circle', color: '#5d5', onClick: 'showTable'}));
// we must return true, so that the default action (set view to center of image) is performed
return true;
}
$("#slider").on('input', function() {
const opacity = $(this).val();
aladin.getOverlayImageLayer().setOpacity(opacity);
});
aladin.setBaseImageLayer('P/Mellinger/color');
//let fits = aladin.displayFITS('http://goldmine.mib.infn.it/data//B/fits/A04_VC1316_ooooog.fits', 'overlay');
let jpg = aladin.displayJPG(
// the JPG to transform to HiPS
'https://noirlab.edu/public/media/archives/images/large/noirlab1912a.jpg',
// no options
{},
// A callback fn once the overlay is set
callback
);
$('input[name=survey]').change(function() {
let surveyName = $(this).val();
if (surveyName === "P/2MASS/Color") {
aladin.setBaseImageLayer("CDS/P/2MASS/color");
} else if (surveyName === "P/DSS2/Color") {
aladin.setBaseImageLayer("CDS/P/DSS2/color");
}
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,58 @@
<!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: 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', {fov: 360, fullScreen: true, cooFrame: 'galactic'});
aladin.setProjection('MOL');
aladin.setBaseImageLayer("P/PanSTARRS/DR1/g", {
imgFormat: 'fits',
colormap: 'redtemperature',
stretch: 'Asinh'
});*/
/*aladin = A.aladin('#aladin-lite-div', {fov: 360, fullScreen: true, cooFrame: 'galactic'});
aladin.setProjection('AIT');
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');
//let survey = aladin.createImageSurvey("P/PanSTARRS/DR1/g", null, null, null, null, );
/*aladin.setBaseImageLayer("P/PanSTARRS/DR1/g");
aladin.getBaseImageLayer().setColormap('viridis', {stretch: "Asinh"});*/
// manage URL parameters
const searchParams = new URL(document.location).searchParams;
if (searchParams.has('baseImageLayer')) {
aladin.setBaseImageLayer(searchParams.get('baseImageLayer'));
}
if (searchParams.has('overlayImageLayer')) {
aladin.setOverlayImageLayer(searchParams.get('overlayImageLayer'));
}
if (searchParams.has('cooFrame')) {
aladin.setFrame(searchParams.get('cooFrame'));
}
if (searchParams.has('fov')) {
aladin.setFoV(parseFloat(searchParams.get('fov')));
}
if (searchParams.has('ra') && searchParams.has('dec')) {
aladin.gotoRaDec(parseFloat(searchParams.get('ra')), parseFloat(searchParams.get('dec')));
}
});
</script>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<!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';
let aladin;
A.init.then(() => {
// Start up Aladin Lite
aladin = A.aladin('#aladin-lite-div', {target: 'M 82', fov: 0.25, showContextMenu: true});
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'}));
});
</script>
</body>
</html>

View File

@@ -0,0 +1,20 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {target: 'M 45', fov: 5, showContextMenu: true});
const cat = A.catalogFromVizieR('I/311/hip2', 'M 45', 5, {onClick: 'showTable'});
aladin.addCatalog(cat);
});
</script>
</body>
</html>

30
examples/al-ellipse.html Normal file
View File

@@ -0,0 +1,30 @@
<!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(() => {
// Start up Aladin Lite
aladin = A.aladin('#aladin-lite-div', {survey: "CDS/P/DSS2/color", target: 'M 31', fov: 3});
var overlay = A.graphicOverlay({color: '#ee2345', lineWidth: 3});
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.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'}),
// NGC 3048
A.ellipse(180.470842, -18.867589, 5.2/120, 3.1/120, 80, {color: 'cyan'}),
// NGC 3049
A.ellipse(180.4742, -18.8850, 3.1/120, 1.6/120, 50, {color: 'cyan'}),
]);
//overlay.add(); // radius in degrees
});
</script>
</body>
</html>

View File

@@ -0,0 +1,23 @@
<!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';
var vmc_cepheids = 'https://archive.eso.org/tap_cat/sync?REQUEST=doQuery&LANG=ADQL&MAXREC=401&FORMAT=votable&QUERY=SELECT%20*%20from%20vmc_er4_yjks_cepheidCatMetaData_fits_V3%20where%20%20CONTAINS(POINT(%27%27,RA2000,DEC2000),%20CIRCLE(%27%27,80.894167,-69.756111,2.7))=1';
var pessto = 'https://archive.eso.org/tap_cat/sync?REQUEST=doQuery&LANG=ADQL&MAXREC=3&FORMAT=votable&QUERY=SELECT%20*%20from%20safcat.PESSTO_TRAN_CAT_V3%20where%20CONTAINS(POINT(%27%27,TRANSIENT_RAJ2000,TRANSIENT_DECJ2000),%20CIRCLE(%27%27,80.894167,-69.756111,2.7))=1';
var aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {survey: 'P/DSS2/red', target: 'LMC', fov: 5});
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'}), undefined, true);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,57 @@
<!doctype html>
<html>
<head>
</head>
<body>
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
<div id='infoDiv'>&nbsp; </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});
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('objectHovered', function(object, xyMouseCoords) {
if (object) {
msg = 'You hovered object ' + object.data.name + ' located at ' + object.ra + ', ' + object.dec + '; mouse coords - x: '
+ xyMouseCoords.x + ', y: ' + xyMouseCoords.y;
}
else {
msg = 'No object hovered';
}
$('#infoDiv').html(msg);
});
aladin.on('objectHoveredStop', function(object, xyMouseCoords) {
if (object) {
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);
});
// define function triggered when an object is clicked
var objClicked;
aladin.on('objectClicked', function(object, xyMouseCoords) {
if (object) {
objClicked = object;
object.select();
msg = 'You clicked object ' + object.data.name + ' located at ' + object.ra + ', ' + object.dec + '; mouse coords - x: '
+ xyMouseCoords.x + ', y: ' + xyMouseCoords.y;
}
else {
objClicked.deselect();
msg = 'You clicked in void';
}
$('#infoDiv').html(msg);
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,26 @@
<!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(() => {
// Start up Aladin Lite
aladin = A.aladin('#aladin-lite-div', {fov: 122, showContextMenu: true, fullScreen: true});
var overlay = A.graphicOverlay({color: '#ee2345', lineWidth: 3});
aladin.addOverlay(overlay);
overlay.addFootprints([A.polygon(
[[264.375,-35.68533471265207], [258.75,-30.000000000000018], [264.375,-24.624318352164085], [270,-30.000000000000018]],
{color: '#808080', fillColor: '#808080', opacity: .4, lineWidth: 1, fill: true})]);
aladin.gotoRaDec(264.375,-24.624318352164085);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,42 @@
<!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(() => {
// 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);
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.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
aladin.on("footprintClicked", (footprint, xyMouseCoords) => {
console.log("footprint clicked catched: ", footprint, "mouse coords xy: ", xyMouseCoords.x, xyMouseCoords.y);
})
aladin.on("objectClicked", (object, xyMouseCoords) => {
console.log("object clicked catched: ", object, "mouse coords xy: ", xyMouseCoords.x, xyMouseCoords.y);
})
aladin.on("footprintHovered", (footprint, xyMouseCoords) => {
console.log("footprint hovered catched: ", footprint, "mouse coords xy: ", xyMouseCoords.x, xyMouseCoords.y);
})
aladin.on("objectHoveredStop", (object, xyMouseCoords) => {
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});
aladin.addCatalog(cat);
});
</script>
</body>
</html>

145
examples/al-gaiadr3.html Normal file
View File

@@ -0,0 +1,145 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<!-- Recommendation for users smartphone/tablets users -->
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no">
<title>Explore Gaia DR3 in Aladin Lite</title>
</head>
<body>
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
<form class="pure-form pure-form-stacked">
<fieldset>
<label for="option-gdr3-flux-color-map" class="pure-radio">
<input id="option-gdr3-flux-color-map" type="radio" name="img-hips" value="CDS/P/DM/flux-color-Rp-G-Bp/I/350/gaiaedr3">
Gaia DR3 flux map
</label>
<label for="option-gdr3-density-map" class="pure-radio">
<input id="option-gdr3-density-map" type="radio" name="img-hips" value="CDS/P/DM/I/350/gaiaedr3" checked>
Gaia DR3 density map
</label>
<label for="option-DSS-map" class="pure-radio">
<input id="option-DSS-map" type="radio" name="img-hips" value="P/DSS2/color">
DSS Color
</label>
<label for="option-PS1-map" class="pure-radio">
<input id="option-PS1-map" type="radio" name="img-hips" value="P/PanSTARRS/DR1/color-z-zg-g">
Pan-STARRS
</label>
</fieldset>
</form>
</body>
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="module">
import A from '../src/js/A.js';
$('#layersControl').show();
var curSelectedSource = null;
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', { fov: 100, cooFrame: 'galactic', fullscreen: true, showSimbadPointerControl: true });
aladin.gotoRaDec(297.87, 25.96);
aladin.setProjection('MOL');
const fluxMap = aladin.createImageSurvey('gdr3-color-flux-map', 'Gaia DR3 flux map', 'https://alasky.u-strasbg.fr/ancillary/GaiaEDR3/color-Rp-G-Bp-flux-map', 'equatorial', 7);
const densityMap = aladin.createImageSurvey('gdr3-density-map', 'Gaia DR3 density map', 'https://alasky.u-strasbg.fr/ancillary/GaiaEDR3/density-map', 'equatorial', 7, {imgFormat: 'fits'});
aladin.setImageSurvey(densityMap);
var hipsCats = {
//'gdr3': A.catalogHiPS('https://axel.u-strasbg.fr/HiPSCatService/I/355/gaiadr3', { name: 'Gaia DR3 sources', shape: 'circle', sourceSize: 8, color: '#d66bae' }),
'simbad': A.catalogHiPS('https://axel.u-strasbg.fr/HiPSCatService/Simbad', { name: 'Simbad', color: '#6dbdce' })
};
hipsCats['simbad'].hide();
aladin.addCatalog(hipsCats['simbad']);
//aladin.addCatalog(hipsCats['gdr3']);
//cmDensMapChanged = false;
// listen changes on HiPS image background selection
$('input[type=radio][name=img-hips]').change(function () {
if (this.value == 'CDS/P/DM/I/350/gaiaedr3') {
aladin.setBaseImageLayer(densityMap);
}
else if (this.value == "CDS/P/DM/flux-color-Rp-G-Bp/I/350/gaiaedr3") {
aladin.setBaseImageLayer(fluxMap);
} else {
aladin.setBaseImageLayer(this.value)
}
});
// listen changes on HiPS catalogues selection
$('#overlay-form :checkbox').change(function () {
var cat = hipsCats[this.value];
if (this.checked) {
cat.show();
}
else {
cat.hide();
}
});
// listen to click on objects
aladin.on('objectClicked', function (source, xyMouseCoords) {
var html = '<table class="pure-table">';
if (curSelectedSource != null) {
curSelectedSource.deselect();
}
if (source == null) {
$('#explain').html('');
$('#explain').hide();
return;
}
source.select();
curSelectedSource = source;
html += '<tbody>';
if (source.catalog.name !== 'Simbad') {
html += '<h3>Gaia DR3 <em>' + source.data.Source + '</em></h3>';
html += '<tr class="pure-table-odd"><td><b>ra</b></td><td>' + source.data.RAdeg + '</td><td><em>deg</em></td></tr>';
html += '<tr><td><b>dec</b></td><td>' + source.data.dec + '</td><td><em>deg</em></td></tr>';
html += '<tr class="pure-table-odd"><td><b>parallax</b></td><td>' + source.data['parallax'] + '</td><td><em>mas</em></td></tr>';
html += '<tr class="pure-table-odd"><td><b>pmra</b></td><td>' + source.data['pmra'] + '</td><td><em>mas/yr</em></td></tr>';
html += '<tr class="pure-table-odd"><td><b>pmdec</b></td><td>' + source.data['pmdec'] + '</td><td><em>mas/yr</em></td></tr>';
html += '<tr class="pure-table-odd"><td><b>Gmag</b></td><td>' + source.data['phot_g_mean_mag'] + '</td><td><em>mag</em></td></tr>';
html += '<tr class="pure-table-odd"><td><b>Bpmag</b></td><td>' + source.data['phot_bp_mean_mag'] + '</td><td><em>mag</em></td></tr>';
html += '<tr class="pure-table-odd"><td><b>Rpmag</b></td><td>' + source.data['phot_rp_mean_mag'] + '</td><td><em>mag</em></td></tr>';
html += '</tbody>';
html += '</table>';
html += '<br/><a target="_blank" href="https://vizier.u-strasbg.fr/viz-bin/VizieR-5?-out.form=%2bH&-source=I/350/gaiaedr3&Source=' + source.data.source_id + '">More details</a>';
}
else {
console.log(source.data);
html += '<h3>Simbad object <em>' + source.data.main_id + '</em></h3>';
html += '<tr class="pure-table-odd"><td><b>ra</b></td><td>' + source.data.ra + '</td><td><em>deg</em></td></tr>';
html += '<tr><td><b>dec</b></td><td>' + source.data.dec + '</td><td><em>deg</em></td></tr>';
html += '<tr><td><b>main_type</b></td><td>' + source.data.main_type + '</td><td><em>deg</em></td></tr>';
html += '<tr class="pure-table-odd"><td><b>pmra</b></td><td>' + source.data.pmra + '</td><td><em>mas/yr</em></td></tr>';
html += '<tr><td><b>pmdec</b></td><td>' + source.data.pmdec + '</td><td><em>mas/yr</em></td></tr>';
html += '<tr class="pure-table-odd"><td><b>parallax</b></td><td>' + source.data.plx + '</td><td><em>mas</em></td></tr>';
html += '<tr><td><b>B mag.</b></td><td>' + source.data.B + '</td><td><em>mag</em></td></tr>';
html += '<tr class="pure-table-odd"><td><b>V mag.</b></td><td>' + source.data.V + '</td><td><em>mag</em></td></tr>';
html += '</tbody>';
html += '</table>';
html += '<br/><a target="_blank" href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=' + encodeURIComponent(source.data.main_id) + '">More details</a>';
}
$('#explain').html(html);
$('#explain').show();
});
});
</script>
</html>

View File

@@ -0,0 +1,16 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {survey: "P/DSS2/color", fov:1, showCooGridControl:true});
aladin.gotoObject('M 10');
});
</script>
</body>
</html>

25
examples/al-gw.html Normal file
View File

@@ -0,0 +1,25 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {projection: "TAN", target: '15 16 57.636 -60 55 7.49', showCooGrid: true, fov: 90, fullScreen: true});
var moc_0_99 = A.MOCFromURL("./gw/gw_0.9.fits",{ name: "GW 90%", color: "#ff0000", opacity: 0.7, lineWidth: 5, perimeter: true});
var moc_0_95 = A.MOCFromURL("./gw/gw_0.6.fits",{ name: "GW 60%", color: "#00ff00", opacity: 0.8, lineWidth: 5, perimeter: true});
var moc_0_5 = A.MOCFromURL("./gw/gw_0.3.fits",{ name: "GW 30%", color: "#00ffff", opacity: 1.0, lineWidth: 5, perimeter: true});
var moc_0_2 = A.MOCFromURL("./gw/gw_0.1.fits",{ name: "GW 10%", color: "#ff00ff", opacity: 1.0, lineWidth: 5, perimeter: true});
aladin.addMOC(moc_0_99);
aladin.addMOC(moc_0_95);
aladin.addMOC(moc_0_5);
aladin.addMOC(moc_0_2);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,18 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {survey: 'http://alasky.cds.unistra.fr/ancillary/GaiaDR2/hips-density-map/', target: 'galactic center'});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,21 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {target: 'galactic center'});
let survey = aladin.createImageSurvey('hips gaia', "hips gaia name", "./hips/gaia", undefined, undefined, {colormap:"viridis"});
aladin.setBaseImageLayer(survey);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,28 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {survey: 'http://alasky.cds.unistra.fr/ancillary/GaiaDR2/hips-density-map/', target: 'galactic center'});
const fluxMap = aladin.createImageSurvey('gdr3-color-flux-map', 'Gaia DR3 flux map', 'https://alasky.u-strasbg.fr/ancillary/GaiaEDR3/color-Rp-G-Bp-flux-map', 'equatorial', 7);
const densityMap = aladin.createImageSurvey('gdr3-density-map', 'Gaia DR3 density map', 'sdfsg', 'equatorial', 7, {imgFormat: 'fits'});
const decaps = aladin.createImageSurvey("decaps", "DECaPS DR1", "http://alasky.u-strasbg.fr/DECaPS/DR1/color/", "equatorial", 11, {imgFormat: 'png'});
const panstarrs = aladin.createImageSurvey("panstarrs", "PanSTARRS", "http://alasky.u-strasbg.fr/Pan-STARRS/DR1/color-i-r-g/", "equatorial", 11, {imgFormat: 'jpg'});
aladin.setOverlayImageLayer(fluxMap)
aladin.setOverlayImageLayer(densityMap, "density")
aladin.setOverlayImageLayer(decaps, "decaps")
aladin.setOverlayImageLayer(panstarrs, "panstarrs")
});
</script>
</body>
</html>

View File

@@ -0,0 +1,19 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {target: 'galactic center'});
aladin.setImageSurvey('P/allWISE/color');
});
</script>
</body>
</html>

View File

@@ -0,0 +1,31 @@
<!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';
let aladin;
A.init.then(() => {
var aladin = A.aladin(
'#aladin-lite-div',
{
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: '#ff89ff', // change reticle color
reticleSize: 64, // change reticle size
showCooGrid: true, // set the grid
fullScreen: true,
}
);
});
</script>
</body>
</html>

30
examples/al-jwst.html Normal file
View File

@@ -0,0 +1,30 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin(
'#aladin-lite-div',
{
projection: 'AIT', // set a projection
fov: 0.06, // initial field of view in degrees
target: '110.82730 -73.45471', // initial target
cooFrame: 'equatorial', // set galactic frame
showCooGrid: true, // set the grid
fullScreen: true,
}
);
aladin.setOverlayImageLayer("https://alasky.cds.unistra.fr/JWST/CDS_P_JWST_deep_field_smacs0723-5mb")
});
</script>
</body>
</html>

View File

@@ -0,0 +1,16 @@
<!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';
A.init.then(() => {
var aladin = A.aladin('#aladin-lite-div', {survey: 'P/DSS2/red', target: 'LMC', fov: 5});
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'}));
});
</script>
</body>
</html>

View File

@@ -0,0 +1,24 @@
<!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';
A.init.then(() => {
let a = A.aladin('#aladin-lite-div', {target: '03 47 00.00 +24 07 00.0', survey: 'P/DSS2/color', zoom: 2, showReticle: false});
var cat = A.catalog({name: 'Some markers', sourceSize: 18});
a.addCatalog(cat);
cat.addSources([A.marker(56.87115, 24.10514, {popupTitle: 'Alcyone', popupDesc: '<em>Bmag:</em> 2.806<br/><em>Spectral type:</em> B7III<br/>More info <a target="_blank" href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=NAME%20ALCYONE&submit=submit">in Simbad</a>'})]);
cat.addSources([A.marker(57.29673, 24.13671, {popupTitle: 'Pleione', popupDesc: '<em>Bmag:</em> 4.97<br/><em>Spectral type:</em> B8vne<br/>More info <a target="_blank" href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=NAME+PLEIONE&NbIdent=1">in Simbad</a>'})]);
cat.addSources([A.marker(56.58156, 23.94836, {popupTitle: 'Merope', popupDesc: '<em>Bmag:</em> 4.113<br/><em>Spectral type:</em> BVI4e<br/>More info <a target="_blank" href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=V*+V971+Tau&NbIdent=1">in Simbad</a>'})]);
cat.addSources([A.marker(56.45669, 24.36775, {popupTitle: 'Maia', popupDesc: '<em>Bmag:</em> 3.812<br/><em>Spectral type:</em> B8III<br/>More info <a target="_blank" href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=NAME+MAIA&NbIdent=1">in Simbad</a>'})]);
cat.addSources([A.marker(56.21890, 24.11334, {popupTitle: 'Electra', popupDesc: '<em>Bmag:</em> 3.612<br/><em>Spectral type:</em> B6IIIe<br/>More info <a target="_blank" href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=NAME+ELECTRA&NbIdent=1">in Simbad</a>'})]);
cat.addSources([A.marker(57.29059, 24.05342, {popupTitle: 'Atlas', popupDesc: '<em>Bmag:</em> 3.54<br/><em>Spectral type:</em> B8III<br/>More info <a target="_blank" href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=NAME+ATLAS&NbIdent=1">in Simbad</a>'})]);
cat.addSources([A.marker(56.30207, 24.46728, {popupTitle: 'Taygeta', popupDesc: '<em>Bmag:</em> 4.199<br/><em>Spectral type:</em> B6IV<br/>More info <a target="_blank" href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=NAME+TAYGETA&NbIdent=1">in Simbad</a>'})]);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,64 @@
<!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: 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', {fov: 180, fullScreen: true, cooFrame: 'equatorial', showCooGridControl: true, showSimbadPointerControl: true, showCooGrid: false, survey: 'CDS/P/Mars/THEMIS-Day-100m-v12'});
aladin.setProjection('SIN');
const drawFunction = function(source, canvasCtx, viewParams) {
canvasCtx.beginPath();
canvasCtx.arc(source.x, source.y, 4, 0, 2 * Math.PI, false);
canvasCtx.closePath();
canvasCtx.strokeStyle = '#38c';
canvasCtx.lineWidth = 3;
canvasCtx.globalAlpha = 0.7,
canvasCtx.stroke();
const fov = Math.max(viewParams['fov'][0], viewParams['fov'][1]);
// object name is displayed only if fov<15°
if (fov>15) {
return;
}
canvasCtx.globalAlpha = 1;
const xShift = 10;
canvasCtx.font = '15px Arial'
canvasCtx.fillStyle = '#eee';
canvasCtx.strokeStyle = '#222';
canvasCtx.lineWidth = 1;
canvasCtx.fillText(source.data['Feature Name'], source.x + xShift, source.y -4);
//canvasCtx.strokeText(source.data['Feature Name'], source.x + xShift, source.y -4);
// object type is displayed only if fov<5°
if (fov>5) {
return;
}
canvasCtx.font = '12px Arial'
canvasCtx.fillStyle = '#abc';
canvasCtx.strokeStyle = '#222';
canvasCtx.lineWidth = 1;
canvasCtx.fillText(source.data['Feature Type'], source.x + 2 + xShift, source.y + 10);
//canvasCtx.strokeText(source.data['Feature Type'], source.x + 2 + xShift, source.y + 10);
};
aladin.addCatalog(A.catalogFromURL('https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/data/mars-features.xml', {raField: 'Longitude', decField: 'Latitude', shape: drawFunction, onClick: 'showTable'}));
aladin.getBaseImageLayer().setColormap('yiorbr')
aladin.gotoRaDec(226.1433542, 18.6308694);
});
</script>
</body>
</html>

50
examples/al-mars.html Normal file
View File

@@ -0,0 +1,50 @@
<!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', {target: '240 +10.65', cooFrame: 'j2000d', fov: 90, showFrame: false, showCooGrid: true, showLayersControl: false, showGotoControl: false, fullScreen: true, showContextMenu: true});
var mars = aladin.createImageSurvey('Mars', 'Mars', 'https://alasky.u-strasbg.fr/Planets/Mars_Viking_MDIM21/', 'j2000', 5);
aladin.setImageSurvey(mars);
var c = document.createElement('canvas'); c.width = c.height = 11; var ctx = c.getContext('2d'); ctx.beginPath(); ctx.arc(5, 5, 4, 0, 2 * Math.PI, false); ctx.closePath(); ctx.strokeStyle = '#ccc'; ctx.lineWidth = 2; ctx.stroke();
var geoFeatures = A.catalog({shape: c, labelColumn: 'name', displayLabel: true, labelColor: '#fff', labelFont: '14px sans-serif'});
aladin.addCatalog(geoFeatures);
geoFeatures.addSources(A.source(226.2, 18.65, {name: 'Olympus Mons'}));
geoFeatures.addSources(A.source(70.5, -42.4, {name: 'Hellas Planitia'}));
geoFeatures.addSources(A.source(250.4, 40.5, {name: 'Alba Mons'}));
geoFeatures.addSources(A.source(-59.2, -13.9, {name: 'Valles Marineris'}));
geoFeatures.addSources(A.source(147.21, 25.02, {name: 'Elysium Mons'}));
geoFeatures.addSources(A.source(316.0, -49.7, {name: 'Argyre Basin'}));
geoFeatures.addSources(A.source(32.53, 70, {name: 'Vastitas Borealis'}));
geoFeatures.addSources(A.source(-112.58, 1.57, {name: 'Tharsis Montes'}));
geoFeatures.addSources(A.source(298, 25, {name: 'Outflow channels'}));
geoFeatures.addSources(A.source(30, 19.79, {name: 'Arabia Terra'}));
geoFeatures.addSources(A.source(70.5, -42.4, {name: 'Hellas Basin'}));
geoFeatures.addSources(A.source(280, 45, {name: 'Tempe Terra'}));
geoFeatures.addSources(A.source(87, 12.9, {name: 'Isidis Basin'}));
geoFeatures.addSources(A.source(117.5, 46.7, {name: 'Utopia Basin'}));
geoFeatures.addSources(A.source(350, -45, {name: 'Noachis Terra'}));
var landingSites = A.catalog({sourceSize: 16});
aladin.addCatalog(landingSites);
landingSites.addSources([A.marker(-47.95, 22.27, {popupTitle: 'Viking 1', popupDesc: 'Landing date: July 20, 1976 11:53:06'})]);
landingSites.addSources([A.marker(-125.7, 68.22, {popupTitle: 'Phoenix', popupDesc: 'Landing date: May 25, 2008 23:53:44 UTC'})]);
landingSites.addSources([A.marker(-33.22, 19.13, {popupTitle: 'Pathfinder', popupDesc: 'Landing date: July 4, 1997 16:56:55 UTC'})]);
landingSites.addSources([A.marker(354.4734, -1.9462, {popupTitle: 'Opportunity', popupDesc: 'Landing date: January 25, 2004, 05:05 UTC'})]);
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 '})])
});
</script>
</body>
</html>

View File

@@ -0,0 +1,25 @@
<!doctype html>
<html>
<head>
</head>
<body>
<div id="aladin-lite-div" style="width: 1024px; height: 768px">
<div id="ui" class="ui">
</div>
</div>
<script type="module">
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/ISOPHOT/170'});
var moc = A.MOCFromURL('https://cds.unistra.fr/~boch/MOC-ISOPHOT.fits', {color: '#84f', lineWidth: 1, opacity: 1.0}, (moc) => {
// moc is ready
console.log(moc.contains(205.9019247, +2.4492764));
console.log(moc.contains(-205.9019247, +2.4492764));
});
aladin.addMOC(moc);
});
</script>
</body>
</html>

32
examples/al-moc-json.html Normal file
View File

@@ -0,0 +1,32 @@
<!doctype html>
<html>
<head>
</head>
<body>
<div id="aladin-lite-div" style="width: 1024px; height: 768px">
<div id="ui" class="ui">
</div>
</div>
<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});
var json = {"3":[517],
"4":[2065,2066,2067,2112,2344,2346,2432],
"5":[8221,8257,8258,8259,8293,8304,8305,8307,8308,8452,8456,9346,9352,9354,9736],
"6":[32861,32862,32863,32881,32882,32883,32892,32893,33025,33026,33027,33157,33168,33169,33171,
33181,33224,33225,33227,33236,33240,33812,33816,33828,33832,37377,37378,37379,37382,37388,
37390,37412,37414,37420,37422,37562,38928,38930,38936,38948,38952],
"7":[131423,131439,131443,131523,131556,131557,131580,131581,132099,132612,132613,132624,132625,132627,132637,
132680,132681,132683,132709,132720,132721,132904,132905,132948,132952,132964,132968,133008,133009,133012,135252,135256,135268,135316,135320,135332,135336,148143,148152,148154,149507,149520
,149522,149523,149652,149654,149660,149662,149684,149686,149692,149694,149695,150120,150122,150208,150210,150216,150218,150240,150242,150243,155748,155752,155796,155800,155812,155816]};
//var json = {"3":[517],
//"4":[2065, 2067]};
var moc = A.MOCFromJSON(json, {opacity: 0.25, color: 'magenta', lineWidth: 1, adaptativeDisplay: false});
aladin.addMOC(moc);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,30 @@
<!doctype html>
<html>
<head>
</head>
<body>
<div id="aladin-lite-div" style="width: 1024px; height: 768px">
<div id="ui" class="ui">
</div>
</div>
<script type="module">
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, opacity: 1.0}, (moc) => {
// moc is ready
console.log(moc.contains(205.9019247, +2.4492764));
console.log(moc.contains(-205.9019247, +2.4492764));
});
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, fill: true, 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);
aladin.addMOC(moc10);
aladin.addMOC(moc9);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,83 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {survey: "CDS/P/DSS2/color", target: 'M51', fov: 180, fullScreen: true});
var json = {
"3": [13, 24],
"4": [36, 37, 48, 49, 51, 87, 91, 93, 94, 100, 101, 112, 430, 1553, 1555,
1556, 1558, 1564, 2576, 2577, 2579, 2585, 2587, 2618, 2704, 2706, 2712,
2714, 2736, 2738, 2745, 2747, 2848],
"5": [156, 157, 200, 201, 203, 241, 244, 319, 341, 343, 359, 361, 362, 363,
369, 370, 371, 380, 381, 382, 408, 409, 412, 413, 452, 453, 454, 456, 457,
458, 464, 465, 468, 1710, 1711, 1724, 1725, 1726, 4463, 4474, 4475, 6209,
6245, 10261, 10263, 10312, 10313, 10315, 10337, 10339, 10345, 10347,
10433, 10435, 10436, 10437, 10438, 10441, 10443, 10444, 10446, 10465,
10466, 10467, 10468, 10470, 10476, 10478, 10820, 10822, 10828, 10830,
10852, 10854, 10860, 10862, 10948, 10950, 10956, 10958, 10959, 10977,
10979, 10985, 10987, 10994, 11000, 11002, 11003, 11305, 11306, 11307,
11400, 11401, 11402],
"6": [238, 239, 250, 251, 254, 255, 506, 535, 541, 612, 613, 615, 633, 636,
637, 808, 809, 811, 916, 917, 960, 961, 963, 980, 981, 982, 1199, 1211,
1213, 1214, 1215, 1256, 1258, 1259, 1262, 1263, 1274, 1275, 1363, 1369,
1371, 1389, 1390, 1391, 1423, 1431, 1433, 1434, 1435, 1441, 1442, 1443,
1473, 1474, 1475, 1532, 1533, 1534, 1640, 1641, 1642, 1656, 1657, 1660,
1661, 1663, 1664, 1665, 1668, 1669, 1680, 1820, 1821, 1822, 1836, 1837,
1838, 1840, 1842, 1876, 1880, 6826, 6827, 6829, 6830, 6831, 6838, 6839,
6862, 6874, 6875, 6878, 6908, 6909, 6910, 7072, 17829, 17831, 17840,
17842, 17843, 17846, 17847, 17848, 17849, 17890, 17914, 17915, 18241,
18244, 18245, 18256, 18257, 18260, 24844, 24845, 24847, 24869, 24871,
24877, 24912, 24944, 24946, 24954, 24976, 24977, 24988, 24989, 24991,
25056, 25057, 25059, 25060, 41041, 41043, 41049, 41051, 41076, 41077,
41257, 41280, 41281, 41282, 41288, 41314, 41315, 41320, 41321, 41322,
41345, 41347, 41353, 41355, 41377, 41379, 41385, 41387, 41408, 41410,
41416, 41418, 41448, 41450, 41727, 41729, 41731, 41737, 41756, 41757,
41758, 41761, 41763, 41769, 41771, 41780, 41788, 41790, 41792, 41856,
41857, 41859, 41886, 41908, 41910, 41916, 41918, 43101, 43103, 43125,
43127, 43133, 43135, 43221, 43223, 43229, 43231, 43253, 43255, 43261,
43262, 43263, 43284, 43286, 43292, 43294, 43316, 43318, 43324, 43326,
43422, 43444, 43446, 43452, 43454, 43605, 43607, 43612, 43613, 43615,
43637, 43639, 43645, 43796, 43798, 43804, 43806, 43828, 43829, 43830,
43904, 43905, 43907, 43912, 43913, 43915, 43937, 43939, 43947, 43968,
43970, 43971, 44004, 44006, 45217, 45219, 45242, 45584, 45586, 45592,
45612, 45613, 45696],
"7": [1706, 1707, 1786, 1787, 1790, 1791, 1962, 1963, 1966, 1967, 1978, 1979,
1982, 1983, 3240, 3241, 3243, 3652, 3653, 3655, 3848, 3849, 3932, 3933,
3934, 4841, 4842, 4843, 5085, 5086, 5087, 5481, 5482, 5483, 5533, 5534,
5535, 5689, 5690, 5691, 6140, 6141, 6142, 6576, 6577, 6578, 6648, 6649,
6651, 6664, 6665, 6724, 6725, 7364, 7365, 7366, 7456, 7457, 7458, 7476,
7477, 7479, 7680, 7681, 27314, 27315, 27341, 27342, 27343, 27350, 27351,
27453, 27454, 27455, 27516, 27518, 27519, 27644, 27645, 27646, 98302,
98303, 99384, 99385, 99387, 99656, 99658, 99680, 99682, 99688, 99690,
99691, 99808, 99809, 99810, 99916, 99917, 99919, 165036, 165037, 165039,
165248, 165250, 165251, 165292, 165293, 165294, 165768, 165770, 165771,
166920, 166956, 166957, 166959, 167433, 167434, 167435, 167504, 167506,
167512, 167514, 167536, 167538, 167539, 172373, 172375, 172381, 172383,
173648, 173650, 173656, 173658, 173680, 173682, 173683, 174417, 174419,
174425, 174427, 175324, 175326, 175327, 175624, 175625, 175627, 175780,
175781, 175783, 175928, 175930, 175931, 176028, 176030, 176031, 180873,
180874, 180875, 180960, 180962, 180963, 182376, 182377, 182378, 182456,
182457, 182458, 182788, 182789, 182790, 182792, 182793, 182794],
"8": [667684, 667685, 667686],
"9": [2670748, 2670749],
"10": [10683000, 10683001]
};
var moc = A.MOCFromJSON(json, {opacity: 0.25, color: 'magenta', lineWidth: 1});
aladin.addMOC(moc);
const skyFraction = moc.skyFraction();
console.assert(0.027083873748779297==skyFraction, "Sky fraction ", skyFraction, "not equal to", 0.02708387374877929);
});
</script>
</body>
</html>

28
examples/al-moment.html Normal file
View File

@@ -0,0 +1,28 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin(
'#aladin-lite-div',
{
survey: 'https://alasky.cds.unistra.fr/hips-cube-services/moment/hips:httpsalasky.cds.unistra.fr;MaNGA_DR13_Ncube%7Cmoment_order:0',
projection: 'AIT', // set a projection
fov: 0.1, // initial field of view in degrees
target: '135.0668750000, 40.2981666667', // initial target
cooFrame: 'equatorial', // set galactic frame
showCooGrid: true, // set the grid
fullScreen: true,
}
);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,26 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {target: 'M 45', fov: 5, showContextMenu: true});
const cat = A.catalogFromVizieR('I/311/hip2', 'M 45', 5, {onClick: 'showTable'});
const cat2 = A.catalogFromVizieR('I/312/sample', 'M 45', 0.5, {onClick: 'showTable'});
aladin.addCatalog(cat);
aladin.addCatalog(cat2);
aladin.select();
});
</script>
</body>
</html>

View File

@@ -0,0 +1,23 @@
<!doctype html>
<html>
<head>
</head>
<body>
<div id="al1" style="width: 500px; height: 500px">
</div>
<div id="al2" style="width: 500px; height: 500px">
</div>
<script type="module">
import A from '../src/js/A.js';
let al1;
let al2;
A.init.then(() => {
// Start up Aladin Lite
al1 = A.aladin('#al1', {target: 'M51', fov: 0.3, survey: 'P/DSS2/color', fullScreen: false});
al2 = A.aladin('#al2', {target: 'M51', fov: 180, survey: 'P/PanSTARRS/DR1/z', fullScreen: false});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,17 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {fullScreen: true, survey: ['P/DM/vizMine', 'P/HST/GOODS/color', 'P/MATLAS/g'], target: '0 0', showCooGrid: true, fov: 180});
});
</script>
</body>
</html>

26
examples/al-no-cors.html Normal file
View File

@@ -0,0 +1,26 @@
<!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';
let aladin;
A.init.then(() => {
// Start up Aladin Lite
aladin = A.aladin('#aladin-lite-div', {
fov: 360,
target: '0 0',
fullScreen: true,
survey: "P/GLIMPSE360",
showCooGrid: true,
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,26 @@
<!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';
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,
});
});
</script>
</body>
</html>

23
examples/al-obscore.html Normal file
View File

@@ -0,0 +1,23 @@
<!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', {target: '14 18 16.868 +56 44 29.37', fov: 360, projection: 'AIT', showContextMenu: true});
const c1 = A.catalogFromURL('https://raw.githubusercontent.com/VisIVOLab/SKA-Discovery-Service-Mockup/main/ObsCore/ObsCore_003.xml', {onClick: 'showTable'});
aladin.addCatalog(c1);
const c2 = A.catalogFromVizieR('B/assocdata/obscore', '14 18 16.868 +56 44 29.37', 100, {onClick: 'showTable', limit: 1000});
aladin.addCatalog(c2);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,17 @@
<!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', {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.addCatalog(cat);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,20 @@
<!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', {cooFrame: 'galactic', fov: 110, target: 'galactic center'});
aladin.setBaseImageLayer('https://alasky.cds.unistra.fr/MellingerRGB');
aladin.setOverlayImageLayer(aladin.createImageSurvey('VTSS', 'VTSS', 'https://alasky.u-strasbg.fr/VTSS/Ha', 'galactic', 3, {imgFormat: 'png'}));
aladin.getOverlayImageLayer().setOpacity(0.5);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,28 @@
<!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';
let aladin;
A.init.then(() => {
// Start up Aladin Lite
aladin = A.aladin('#aladin-lite-div', {
fov: 360,
target: '0 0',
fullScreen: true,
survey: "CDS/P/Mars/Pan-Perseverance-PIA24422",
showCooGrid: true,
showCooGridControl: true,
});
aladin.setProjection('MER');
});
</script>
</body>
</html>

22
examples/al-polyline.html Normal file
View File

@@ -0,0 +1,22 @@
<!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', {target: 'Gamma Cas', fov: 10});
var overlay = A.graphicOverlay({color: '#ee2345', 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] ]));
});
</script>
</body>
</html>

View File

@@ -0,0 +1,47 @@
<!doctype html>
<html>
<head>
</head>
<body>
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
<div id='aladin-statsDiv'></div>
<div id='buttons'></div>
<script type="module">
import A from '../src/js/A.js';
A.init.then(() => {
var a = A.aladin('#aladin-lite-div', {target: '03 47 00.00 +24 07 00.0', survey: 'P/DSS2/color', zoom: 2, showReticle: false});
var cat = A.catalog({color: 'red', onClick: 'showTable'});
var originalSources = [
A.source(56.87115, 24.10514, {name: 'Alcyone'}),
A.source(57.29673, 24.13671, {name: 'Pleione'}),
A.source(56.58156, 23.94836, {name: 'Merope'}),
A.source(56.45669, 24.36775, {name: 'Maia'}),
A.source(56.21890, 24.11334, {name: 'Electra'}),
A.source(57.29059, 24.05342, {name: 'Atlas'}),
A.source(56.30207, 24.46728, {name: 'Taygeta'})
];
cat.addSources(originalSources);
a.addCatalog(cat);
// add button to remove sources
var buttonsDiv = document.getElementById('buttons');
for (var k=0; k<originalSources.length; k++) {
var s = originalSources[k];
var btn = document.createElement('button');
btn.innerHTML = 'Delete ' + s.data.name;
btn.value = k; // we store the index in the originalSources array
buttonsDiv.appendChild(btn);
}
document.querySelectorAll('button').forEach(function(item) {
item.addEventListener('click', function() {
cat.remove(originalSources[parseInt(this.value)]);
});
});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,17 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {target: 'M81', fov: 1});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,50 @@
<!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(() => {
// Start up Aladin Lite
aladin = A.aladin('#aladin-lite-div', { target: '0 0', cooFrame: 'j2000d', showCooGrid: true, fov: 90, fullScreen: true});
var mars = aladin.createImageSurvey('Mars', 'Mars', 'https://alasky.u-strasbg.fr/Planets/Mars_Viking_MDIM21/', 'j2000', 5);
aladin.setImageSurvey(mars);
var c = document.createElement('canvas'); c.width = c.height = 11; var ctx = c.getContext('2d'); ctx.beginPath(); ctx.arc(5, 5, 4, 0, 2 * Math.PI, false); ctx.closePath(); ctx.strokeStyle = '#ccc'; ctx.lineWidth = 2; ctx.stroke();
var geoFeatures = A.catalog({shape: c, labelColumn: 'name', displayLabel: true, labelColor: '#fff', labelFont: '14px sans-serif'});
aladin.addCatalog(geoFeatures);
geoFeatures.addSources(A.source(226.2, 18.65, {name: 'Olympus Mons'}));
geoFeatures.addSources(A.source(70.5, -42.4, {name: 'Hellas Planitia'}));
geoFeatures.addSources(A.source(250.4, 40.5, {name: 'Alba Mons'}));
geoFeatures.addSources(A.source(-59.2, -13.9, {name: 'Valles Marineris'}));
geoFeatures.addSources(A.source(147.21, 25.02, {name: 'Elysium Mons'}));
geoFeatures.addSources(A.source(316.0, -49.7, {name: 'Argyre Basin'}));
geoFeatures.addSources(A.source(32.53, 70, {name: 'Vastitas Borealis'}));
geoFeatures.addSources(A.source(-112.58, 1.57, {name: 'Tharsis Montes'}));
geoFeatures.addSources(A.source(298, 25, {name: 'Outflow channels'}));
geoFeatures.addSources(A.source(30, 19.79, {name: 'Arabia Terra'}));
geoFeatures.addSources(A.source(70.5, -42.4, {name: 'Hellas Basin'}));
geoFeatures.addSources(A.source(280, 45, {name: 'Tempe Terra'}));
geoFeatures.addSources(A.source(87, 12.9, {name: 'Isidis Basin'}));
geoFeatures.addSources(A.source(117.5, 46.7, {name: 'Utopia Basin'}));
geoFeatures.addSources(A.source(350, -45, {name: 'Noachis Terra'}));
var landingSites = A.catalog({sourceSize: 16}); aladin.addCatalog(landingSites);
landingSites.addSources([A.marker(-47.95, 22.27, {popupTitle: 'Viking 1', popupDesc: 'Landing date: July 20, 1976 11:53:06'})]);
landingSites.addSources([A.marker(-125.7, 68.22, {popupTitle: 'Phoenix', popupDesc: 'Landing date: May 25, 2008 23:53:44 UTC'})]);
landingSites.addSources([A.marker(-33.22, 19.13, {popupTitle: 'Pathfinder', popupDesc: 'Landing date: July 4, 1997 16:56:55 UTC'})]);
landingSites.addSources([A.marker(354.4734, -1.9462, {popupTitle: 'Opportunity', popupDesc: 'Landing date: January 25, 2004, 05:05 UTC'})]);
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 '})])
//aladin.setOverlayImageLayer(aladin.createImageSurvey('VTSS', 'VTSS', '', 'galactic', 3, {imgFormat: 'png'}));
});
</script>
</body>
</html>

View File

@@ -0,0 +1,18 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {target: 'M81', fov: 1});
aladin.setImageSurvey(aladin.createImageSurvey('Panstarrs', 'Panstarrs', 'http://alasky.cds.unistra.fr/Pan-STARRS/DR1/g/', 'equatorial', 11, {imgFormat: 'fits', colormap: "redtemperature"}));
});
</script>
</body>
</html>

30
examples/al-sdc2.html Normal file
View File

@@ -0,0 +1,30 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin(
'#aladin-lite-div',
{
projection: 'AIT', // set a projection
fov: 360, // initial field of view in degrees
target: '110.82730 -73.45471', // initial target
cooFrame: 'equatorial', // set galactic frame
showCooGrid: true, // set the grid
fullScreen: true,
}
);
const sdc2 = aladin.newImageSurvey('https://alasky.cds.unistra.fr/hips-cube-services/compute/hips:httpsalasky.cds.unistra.fr;SKA-demo;hips;CDS_P_SKA-DC_v2%7Cexpr:s6540_6580');
aladin.setOverlayImageLayer(sdc2);
});
</script>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<!doctype html>
<html>
<head>
</head>
<body>
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
<div id='aladin-statsDiv'></div>
<script type="module">
import A from '../src/js/A.js';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {cooFrame: 'galactic', target: 'galactic center', survey: 'P/Finkbeiner'});
// possible values are 'blues', 'cividis', 'cubehelix', 'eosb', 'grayscale', 'inferno', 'magma', 'native', 'parula', 'plasma', 'rainbow',
// 'rdbu', 'rdylbu', 'redtemperature', 'sinebow', 'spectral', 'summer', 'viridis', 'ylgnbu' and 'ylorbr'
aladin.getBaseImageLayer().setColormap("cubehelix");
//aladin.getBaseImageLayer().setColor([1.0, 0.0, 1.0, 1.0], { tf: 'Linear'} );
});
</script>
</body>
</html>

View File

@@ -0,0 +1,21 @@
<!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';
let aladin;
A.init.then(() => {
// Start up Aladin Lite
aladin = A.aladin('#aladin-lite-div', {fov: 180.0, fullScreen: true, survey: "CDS/P/DM/simbad-biblio/allObjects", target: '12 25 41.512 +12 48 47.2', showCooGrid: true});
aladin.setProjection("TAN");
aladin.getBaseImageLayer().setColormap("redtemperature")
});
</script>
</body>
</html>

View File

@@ -0,0 +1,20 @@
<!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';
let aladin;
A.init.then(() => {
// Start up Aladin Lite
aladin = A.aladin('#aladin-lite-div', {target: '12 25 41.512 +12 48 47.2', fov: 0.8, showSimbadPointerControl: true});
});
</script>
</body>
</html>

18
examples/al-snippet.html Normal file
View File

@@ -0,0 +1,18 @@
<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>
<script type="text/javascript" src="https://aladin.cds.unistra.fr/AladinLite/api/v3/latest/aladin.umd.cjs" charset="utf-8"></script>
<script type="text/javascript">
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {fov: 360, projection: "AIT", cooFrame: 'equatorial', showCooGridControl: true, showSimbadPointerControl: true, showCooGrid: true});
});
</script>
</body>
</html>

View File

@@ -0,0 +1,21 @@
<!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';
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});
// 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', {onClick: 'showTable'}));
});
</script>
</body>
</html>

View File

@@ -0,0 +1,30 @@
<!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';
let aladin;
A.init.then(() => {
aladin = A.aladin(
'#aladin-lite-div',
{
projection: 'AIT', // set a projection
fov: 0.1, // initial field of view in degrees
target: '338.98958 33.96', // initial target
cooFrame: 'equatorial', // set galactic frame
showCooGrid: true, // set the grid
fullScreen: true,
}
);
aladin.setOverlayImageLayer("https://alasky.cds.unistra.fr/JWST/CDS_P_JWST_Stephans-Quintet_NIRCam+MIRI")
});
</script>
</body>
</html>

113
examples/al-vr.html Normal file
View File

@@ -0,0 +1,113 @@
<!doctype html>
<html>
<head>
</head>
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.157.0/build/three.module.js",
"three/addons/": "https://unpkg.com/three@0.157.0/examples/jsm/"
}
}
</script>
<body>
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
<script type="module">
import A from '../src/js/A.js';
import * as THREE from 'three';
let aladin;
A.init.then(() => {
aladin = A.aladin(
'#aladin-lite-div',
{
survey: 'P/DSS2/color', // set a survey
projection: 'TAN', // set a projection
fov: 70, // initial field of view in degrees
target: '338.98958 33.96', // initial target
cooFrame: 'equatorial', // set galactic frame
showCooGrid: true, // set the grid
fullScreen: true,
vr: {animation: animate.bind(renderer)},
}
);
//aladin.setOverlayImageLayer("https://alasky.cds.unistra.fr/JWST/CDS_P_JWST_Stephans-Quintet_NIRCam+MIRI")
initScene(aladin.view.imageCanvas);
aladin.setRenderer(renderer);
});
let renderer = null;
let scene = null;
let camera = null;
let cubeMesh = null;
// let controls = null;
/**
* Initializes a 3D scene, camera, and renderer for virtual reality (VR).
*
* @param {HTMLCanvasElement} canvas - The HTML canvas element to render the
* 3D scene
*/
function initScene(canvas) {
scene = new THREE.Scene();
camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.1, 1000);
scene.add(camera);
renderer = new THREE.WebGLRenderer({canvas: canvas, context: canvas.getContext('webgl2', {xrCompatible: true})}); // NOTE Une différence ici
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.xr.enabled = true;
// renderer.xr.setReferenceSpaceType('local');
renderer.autoClear = false;
const light = new THREE.PointLight(0xffffff, 10);
light.position.set(0, 2, 1);
scene.add(light);
const planeGeometry = new THREE.PlaneGeometry(10, 10);
const planeMaterial = new THREE.MeshPhongMaterial({ color: 0xff00ff });
const planeMesh = new THREE.Mesh(planeGeometry, planeMaterial);
planeMesh.position.set(0, -1, 0);
planeMesh.rotation.x = -Math.PI / 2;
scene.add(planeMesh);
const cubeGeometry = new THREE.BoxGeometry(1, 1, 1);
const cubeMaterial = new THREE.MeshPhongMaterial({ color: 0x00ff00 });
cubeMesh = new THREE.Mesh(cubeGeometry, cubeMaterial);
cubeMesh.position.set(0, 0, -2);
scene.add(cubeMesh);
}
/**
* Function to animate the 3D scene and rendering it.
*/
function animate() {
cubeMesh.rotation.x += 0.001;
cubeMesh.rotation.y += 0.001;
renderer.render( scene, camera );
}
// /**
// * Initializes a WebGL2 context and handles potential errors.
// */
// function initWebGL2() {
// // canvas = aladin.view.imageCanvas;
// canvas = document.getElementById(aladin.view.imageCanvas);
// // gl = canvas.getContext("webgl2", { alpha: true });
// gl = canvas.getContext('webgl2');
// if (!gl) { // If the gl didn't create properly
// alert('This browser doesn\'t support WebGL2');
// return;
// }
// }
</script>
</body>
</html>

View File

@@ -0,0 +1,41 @@
<!doctype html>
<html>
<head>
</head>
<body>
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
<div id='aladin-statsDiv'></div>
<script type="module">
import A from '../src/js/A.js';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {survey: ["P/Mellinger"], cooFrame: 'galactic', fov: 1000, fullScreen: true, showCooGrid: true});
const meerkat = aladin.newImageSurvey('P/MeerKAT/Galactic-Centre-1284MHz-StokesI', {imgFormat: 'fits'});
meerkat.setColormap('magma', {stretch: "asinh"})
aladin.setOverlayImageLayer(meerkat)
aladin.setProjection("MOL")
let fov = 1000;
setInterval(function zoom() {
if (fov > 1) {
fov *= 0.995;
aladin.setFov(fov);
}
}, 10);
setInterval(function () {
const t = Date.now() / 1000;
let lambda = Math.sin(t) * 0.5 + 0.5;
let cut0 = -0.0004 * lambda + (1 - lambda) * -0.00132;
let cut1 = 0.005 * lambda + (1 - lambda) * 0.05759;
meerkat.setCuts(cut0, cut1);
})
});
</script>
</body>
</html>

View File

@@ -0,0 +1,31 @@
<!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: 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', {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('rightClickMove', (x, y) => {
console.log("right click move", x, y)
})
});
</script>
</body>
</html>

BIN
examples/gw/gw_0.1.fits Normal file

Binary file not shown.

BIN
examples/gw/gw_0.3.fits Normal file

Binary file not shown.

BIN
examples/gw/gw_0.6.fits Normal file

Binary file not shown.

BIN
examples/gw/gw_0.9.fits Normal file

Binary file not shown.

BIN
examples/hips/gaia/Moc.fits Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 805 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 781 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1001 B

Some files were not shown because too many files have changed in this diff Show More