Compare commits

...

263 Commits

Author SHA1 Message Date
Matthieu Baumann
ac4af8fb18 fix Circle::intersectBbox 2025-08-29 11:54:31 +02:00
Erik Mellegard
279f93c4ba Fix Circle intersectBBox 2025-06-13 10:14:15 +02:00
Matthieu Baumann
5d6e113c19 fix filterFn on footprints in catalogs: #301 2025-05-27 14:53:14 +02:00
Matthieu Baumann
2f9a1f297d impl #286: add eRosita to default HiPSList 2025-05-25 00:35:45 +02:00
Matthieu Baumann
0d2c0889a1 update playwright snapshots 2025-05-23 18:48:11 +02:00
Matthieu Baumann
0cbd0c9f23 fix test ci fmt 2025-05-23 18:48:11 +02:00
Matthieu Baumann
16a1e808a2 cargo fmt 2025-05-23 18:48:11 +02:00
Matthieu Baumann
7b718eae96 cargo clippy 2025-05-23 18:48:11 +02:00
Matthieu Baumann
221132ee1a remove warnings 2025-05-23 18:48:11 +02:00
Matthieu Baumann
f796a4c036 fix allsky retrieval and simplify hips rendering 2025-05-23 18:48:11 +02:00
Matthieu Baumann
5d20bf3946 add documentation for the EventListener positionChanged and mouseMove events. Return the frame for the mouseMove event. Fix #299 2025-05-14 14:28:41 +02:00
bmatthieu3
5d449b6185 fix #298 A.coo not imported 2025-05-14 10:04:00 +02:00
bmatthieu3
89e3eb7e0a remove rust warning 2025-05-07 16:37:56 +02:00
bmatthieu3
05f1ae2808 feat: color picker and read pixel
This PR targets: #253, #76 and to some extent, maybe #208

It features:
* api: readPixel on a HiPS object method taking x, y pixel values on the
  screen. When no screen coo are given, the one of the center screen is
used.
* api: HiPS.probe a general method using HiPS.readPixel under the hood.
  It allow to probe the survey pixel values on a pixel, along a screen line and
along a great circle arc on the sky
* fix: readPixel could throw an exception if the tile has not been
  received. If so, now, we return a JS null value
* fix: retrieve pixels on fits HiPS bitpix=-32
* feat: a new aladin mode called TOOL_COLOR_PICKER.
* tool: showColorPickerControl: when clicking on it, enter the
  TOOL_COLOR_PICKER mode. The user can move the mouse on a pixel to know
its value. With a click, the pixel value is copied to its clipboard
* fix: restore samp button to connect to a hub
* fix: call redraw when calling gotoRaDec to update instantly the
  imageCanvas #208
* a new global readCanvas method on the Aladin object that
will simply read the final image Canvas. User can give a pixel coo, a
line (2 pixel coos), a rect (2 pixel coos for the box)
2025-05-07 16:37:56 +02:00
Philip Matsson
261ea2b68c Support credentials on MOC queries 2025-05-07 14:49:34 +02:00
Philip Matsson
deab96c4d5 Support credentials on allsky queries, adding docs and cleaning up 2025-05-07 14:49:34 +02:00
Philip Matsson
48ba43eba7 Allow setting HiPS CORS and credential options 2025-05-07 14:49:34 +02:00
Alexandra Moskowitz
5d67b7f260 docs: clarify use of precision in Coo 2025-05-02 15:51:06 +02:00
Thomas Boch
30112c300d Merge pull request #290 from cds-astro/fix-avm-example
docs: change to an image with correct astrometry in example
2025-04-23 13:39:19 +02:00
MARCHAND MANON
35840e60a0 docs: change to an image with correct astrometry in example
Co-authored-by: tboch <tboch@users.noreply.github.com>
2025-04-23 11:55:53 +02:00
MARCHAND MANON
9a3a8a0599 docs: just fixing typo in image's doc 2025-04-16 17:10:52 +02:00
MARCHAND MANON
b5fcd02b96 feat: add a rotationChanged event 2025-04-16 08:40:32 +02:00
MARCHAND MANON
6c3aa0bf00 group hips layer events together 2025-04-16 08:40:32 +02:00
bmatthieu3
ea38cdce30 Reverse the longitude axis globally
This method does add:
* reverseLongitude method on aladin object
* add a longitudeReversed flag in AladinOptions, when creating the
aladin view to reverse the longitude axis globally at start.
* BREAKS the HiPS options API by removing the longitudeReversed option
at the HiPS level, replacing it by a global flag on the aladin lite view
* fix: when adding two times the same survey, we could not change its
hips options

This commit also impl #191
2025-04-09 16:08:48 +02:00
Matthieu Baumann
645bab7cd9 Subdivision tuning
Cells are all subdivided at the same level.
One subdivision is added if:
* the cell is on a pole
* the cell is at a frontier of a base cells (and in collignon zona)
2025-04-09 13:35:20 +02:00
bmatthieu3
62f9e61978 New option to make the north pole remain up to the view
* lockNorthUp new Aladin init option. False by default.
* setRotation is still allowed if lockNorthUp=true but when panning, the
view resets its orientation so that the north pole is up
2025-04-09 13:35:20 +02:00
bmatthieu3
addbd555c1 Performance
Do all CPU computations on Vec3 and not Vec4
2025-04-09 13:35:20 +02:00
bmatthieu3
db70a6b9cd Set zoomfactor when using smartphones
Refers back to PR #249
2025-04-09 13:35:20 +02:00
bmatthieu3
258781d078 update readme, make the release page link more visible 2025-04-09 13:35:20 +02:00
bmatthieu3
7418ed822d add getZoomFactor method in Aladin 2025-04-09 13:35:20 +02:00
bmatthieu3
ba728c23c7 Enhance zooming on mouse/trackpad
When zooming with a mouse or a trackpad a wheel event is triggered.
Originally the fov of the viewport was changed but it happened setting
the fov is projection dependant therefore leading to big zooming effect
for TAN projection for example.
Now there is a new way of zooming which is done by setting the screen
zoom factor instead of the fov. Zooming with this factor is projection
agnostic.
With that the pr adds:
* an interpolated zooming effect moving the viewport from a start screen
zoom factor to another by following a hermite cubic interpolation
function
* bugfix: originally, multiple wheel events done shortly in time resulted in a
zooming "congestion" bug leading to a zoom effect similar to only one
isolated wheel event. Now triggering several wheel event allow to zoom
more than only one isolated.
* a new listener `wheelTriggered` allowing the user to define its own zooming.
When wheelTriggered is set, the default zooming is not executed
2025-04-09 13:35:20 +02:00
bmatthieu3
89f760c1db Update changelog 2025-04-09 13:35:20 +02:00
Matthieu Baumann
c5d0875265 First commit for 3.7.0
* add MOC setable properties: fill, edge and perimeter
* change package.json to 3.7.0-beta
2025-04-09 13:35:18 +02:00
Matthieu Baumann
4a8d3bfa65 Fix selection of footprints not associated with catalog sources
Targets #274

* fix: handleSelect now call selectObjects with not only the list of catalog sources but also with the footprints
* fix: View.closestFootprints: if no lineWidth was given to a footprint then it could happen that this method set it to 1px, erasing its previous undefined value
* Circle and Ellipse now behaves like PolyLine and Vector, if no linewidth is given, the one from its GraphicOverlay is taken.
2025-04-09 13:34:38 +02:00
Matthieu Baumann
bde5a37b51 codemeta 3.6.5 2025-04-09 13:33:29 +02:00
Matthieu Baumann
fbdc7e2e76 3.6.5 2025-04-09 11:57:10 +02:00
Matthieu Baumann
312b9844d1 Fix allsky fits display
Bug introduced in #254. Allsky is also downloaded if the tile_size is <= 256
2025-04-09 11:47:53 +02:00
bmatthieu3
0e740454bd Fix #278
When creating a new default survey the DSS2 survey is chosen. We use
the one cached instead of creating a plain new one.
2025-04-08 18:09:09 +02:00
bmatthieu3
18e98e9f5f fix: fullscreen closing
Bug happening when realFullscreen is true and we click on the
fullscreen button. Following #151 fix, commit #a19a050
2025-04-03 18:01:58 +02:00
Matthieu Baumann
c938a58cbc Fix selection of footprints not associated with catalog sources
Targets #274

* fix: handleSelect now call selectObjects with not only the list of catalog sources but also with the footprints
* fix: View.closestFootprints: if no lineWidth was given to a footprint then it could happen that this method set it to 1px, erasing its previous undefined value
* Circle and Ellipse now behaves like PolyLine and Vector, if no linewidth is given, the one from its GraphicOverlay is taken.
2025-04-03 18:01:46 +02:00
Matthieu Baumann
4a5d66768c 3.6.4 2025-04-01 11:10:17 +02:00
Matthieu Baumann
239ae2ce74 fix make it work for safari 16.1
Revert wasm-bindgen version to 0.2.92 to make it work for safari 16.1 (and maybe older?)
(This is very obscure)
2025-03-31 17:09:05 +02:00
Matthieu Baumann
9bf898c104 3.6.3 2025-03-26 18:06:12 +01:00
Matthieu Baumann
6f085429f5 background color set to (0.1, 0.1, 0.1)
jpeg HiPS that does not cover all the sky are plotted as black when data is missing. This allow to recognize the border of the projection
2025-03-26 17:18:23 +01:00
Matthieu Baumann
b49c763e07 Improved distant HiPS url detection
This targets #270

* Use js URL object to detect if the user gives an url
* There is important point: a user can give a path pointing towards a local HiPS. For those Aladin Lite will think the path is an ID but it is not. That is why after failing fetching the MocServer for its properties, we simply try to reconsider it as an URL so that a local HiPS can be load afterwards.
2025-03-26 17:10:13 +01:00
Matthieu Baumann
fcacda0c19 Several fixes:
* use Utils.copy2Clipboard in contextmenu and shareview
* check for a mousedown before computing distance from the position when the mouse has been clicked
* smartphone 2 fingers pinched rotation between lon pi and 2*pi seems to have been fixed. The bug seem to be there from a long time ago.
2025-03-26 15:47:32 +01:00
Matthieu Baumann
f6acb3a324 3.6.2 2025-03-26 11:51:57 +01:00
Matthieu Baumann
14d54b03bc Fix css selector
Add a width: 100% to make the selector fits in its parent
2025-03-26 11:42:32 +01:00
Matthieu Baumann
9e2779837d Remove Shift shortcut
We will work on keyboard shortcuts for a next version
2025-03-26 11:03:04 +01:00
Matthieu Baumann
e29b5202b3 Fix context menu showing up
Change heuristic for showing up the contextual menu. Before we were waiting 100ms before changing the cuts but this does not work for users doing long timed right click without moving. Now, we look for the mouse offset after rightclicking. If it exceeds an offset of 10px then the contextual menu will not open and the cuts will change instead.
2025-03-26 10:34:32 +01:00
Matthieu Baumann
13125b155e 3.6.1 release 2025-03-25 18:27:53 +01:00
Matthieu Baumann
f56468d402 change package json to 3.6.1 2025-03-25 18:12:09 +01:00
bmatthieu3
5823901e92 Revert #264
* rename J2000 to ICRS as HiPSes are built in ICRS
* update the ancient J2000 conversion matrices to ICRS ones.
2025-03-25 18:09:36 +01:00
bmatthieu3
3b00a79e02 fix label name from ICRS to FK5J2000 2025-03-25 14:11:04 +01:00
bmatthieu3
31e7d6f0ac additionnal commit for solving #246 2025-03-24 17:46:15 +01:00
bmatthieu3
f656176e28 Fix MOC settings after its creation
MOC settings after their creation was not possible. This PR fix it.
It is also possible to directly set the 'color', 'fillColor', 'opacity'
and 'lineWidth' MOC properties without doing any reportChange
afterwards. These settings will automatically notify the wasm part for
change of the MOC options and will update the view.
2025-03-24 11:56:37 +01:00
bmatthieu3
9b31210066 set wasm opt 2025-03-20 20:55:05 +01:00
bmatthieu3
425e3e2459 hide the popup when its associated Source is out of fov 2025-03-20 20:52:09 +01:00
bmatthieu3
6bd9c43d88 Shape function given to a catalog
* fix: returning nothing or an invalid value from it will displays the
source as the square shape. Before, it was forgetting to display the
source
* Possibility to return a string in "rhomb", "circle", "square",
"cross", "triangle" from it.
* Set the color of footprint to the color of the Catalog. This thus
overwrites the color that could have been given in the footprint
directly. To compensate that, I think it could be great to allow a color func as well.
2025-03-20 18:54:40 +01:00
bmatthieu3
ebb9d6d3d6 Display labels
Two modes of display:
* ICRSd & GALACTIC frame set the formatting of grid labels to decimal
with digit precision being computed from the grid step selected
* ICRS frame set the formatting to sexagesimal in the format: deg min
sec.ddd .

This fixes #172
2025-03-20 15:47:59 +01:00
bmatthieu3
ee2eb6e704 Fix NaN detection by the GPU on float textures for window platform
float textures coming from BITPIX<0 fits images are sent to GPU as
RGBA8UI textures. Float decoding from a vec4 rgba is done in the shader.
Then this obtained decoded float can be tested against nan/inf in the
shader
2025-03-19 15:45:23 +01:00
bmatthieu3
68d9e67774 fix: download csv from measurement table 2025-03-19 13:34:03 +01:00
bmatthieu3
109cb48367 add click event on labels associated to checkbox so that the user can (un)check the checkbox by clicking on its label too. 2025-03-19 12:35:18 +01:00
bmatthieu3
749d963029 reduce +/- zooming factor 2025-03-19 12:35:18 +01:00
bmatthieu3
b2bb7df6e3 min cut and max cuts in 0-255 range for jpeg/png colors HiPS 2025-03-19 12:35:18 +01:00
bmatthieu3
492927c557 access HiPS2FITS interface from the contextual menu by giving the WCS object 2025-03-19 12:35:18 +01:00
bmatthieu3
accd4a6c7e show the scrollbar appear and impl a scrollbar offset save 2025-03-19 12:35:18 +01:00
bmatthieu3
6b21b2899f remove second contextual menu as it brings nothing more than the full contextual menu 2025-03-19 12:35:18 +01:00
bmatthieu3
628ea826bf make the toolbar elements aligned vertically and with the same size 2025-03-19 12:35:18 +01:00
bmatthieu3
5604ea2be6 disable changing cuts the first 100ms after the right click to prevent changing cuts when opening the context menu 2025-03-19 12:35:18 +01:00
Alexandra Moskowitz
6d458ccab7 fix: stop contextmenu event propagation only if context menu enabled 2025-03-18 16:29:36 +01:00
bmatthieu3
ae00021fab deprecate the property in the api doc 2025-03-12 10:09:49 +01:00
bmatthieu3
7512adf900 fix commit 2025-03-12 09:52:53 +01:00
bmatthieu3
a19a050ee7 fix exiting when realfullscreen is true. Refers back to #151 2025-03-10 17:50:51 +01:00
bmatthieu3
5f9c9d9154 JPEG case: draw black when the tile is missing 2025-03-05 11:12:50 +01:00
bmatthieu3
3f248a82ea add docs on HiPSOptions to explain some properties that prevent to fetch the properties file of a HiPS. Copied from #242 2025-03-04 17:12:24 +01:00
bmatthieu3
c2dd66c5b3 fix issue #234 2025-02-28 18:01:56 +01:00
Patrick Custer
35f6037f7f include hipsList in options merge 2025-02-28 13:28:14 +01:00
Patrick Custer
255f123652 combine requsetedOptions and Aladin.DEFAULT_OPTIONS with spread operator 2025-02-28 13:28:14 +01:00
bmatthieu3
43faf2170d fix issue 2025-02-27 14:26:47 +01:00
bmatthieu3
efdfb190dd remove rust warnings and update wcs dep to a the fixed version 0.3.1 2025-02-20 12:52:33 +01:00
Matthieu Baumann
1b2f298817 Update README.md 2025-02-15 09:02:21 +01:00
Matthieu Baumann
98e1c6cfca Update README.md 2025-02-15 09:02:01 +01:00
Matthieu Baumann
fa7781037e update playwright snapshots on darwin 2025-02-14 17:48:31 +01:00
bmatthieu3
834b831084 v3.6.1-beta 2025-02-14 17:33:05 +01:00
bmatthieu3
2dd8ab643b add playwright snapshots for linux 2025-02-14 17:23:37 +01:00
Carlos Quiroz
02c6b6e468 Remove old files using jquery 2025-02-14 15:30:26 +01:00
bmatthieu3
826ef4fdb7 Fix #151. It is now possible to escape the fullscreen. I fixed a refresh of the fullscreen button bug by defining a special alevent:fullscreen_toggled that the fullscreen button can listen to in order to change its arrow image (opening or closing). Also fix mouseup bug during selection 2025-02-14 15:26:52 +01:00
Matthieu Baumann
bf12e85c70 fix #228, complete the api doc to help the user understand the edge, fill and perimeter booleans 2025-02-14 09:55:10 +01:00
Matthieu Baumann
ac880608af #160 apply the workaround for non secured context. Not tested 2025-02-14 09:12:07 +01:00
Matthieu Baumann
7994ecc40e add a .gitignore to help the compilation phase and contribution #205 2025-02-14 08:42:09 +01:00
Matthieu Baumann
9049fec040 restore setrotation and getrotation in aladin object API. #211 2025-02-14 08:42:09 +01:00
Matthieu Baumann
4eea3d3bf9 #210 add documentation for catalogFromSimbad and fix the default nb_ref order to be in desc order direction by default 2025-02-14 08:42:09 +01:00
Matthieu Baumann
aed511abd8 fix #214 2025-02-14 08:42:09 +01:00
Matthieu Baumann
e654f4376e add a addHiPSToFavorites to counterbalance the removeHiPSFromFavorites, asked by #199 2025-02-14 08:42:09 +01:00
Matthieu Baumann
5d3d0b2cfc fix #225 2025-02-14 08:42:09 +01:00
Matthieu Baumann
f75211902b fix #225. I set to the hips object the cached options if there are instead of erasing the Hips object given by the user with a new one with the cached options 2025-02-14 08:42:09 +01:00
bmatthieu3
8844dc3c61 fix compiling issues on windows + update readme for contributors, they do not need rust nightly anymore 2025-02-08 13:58:56 +01:00
bmatthieu3
165c246605 fix compiling issues on windows + update readme for contributors, they do not need rust nightly anymore 2025-02-08 13:57:50 +01:00
Matthieu Baumann
542b1d0ace fix access to ska dachs service 2025-02-06 11:59:06 +01:00
Thomas Boch
6cc5814868 Merge pull request #226 from cds-astro/add-zenodo-file
maint: add zenodo.json file
2025-01-23 15:14:45 +01:00
MARCHAND MANON
712fe2bff0 maint: add zenodo.json file 2025-01-22 17:20:52 +01:00
bmatthieu3
ccc329be04 remove npm dev dep in package json 2025-01-16 17:03:04 +01:00
bmatthieu3
6833c21115 perform radec2xyz on double before sending it to the GPU. Should fix https://github.com/cds-astro/aladin-lite/issues/219 2025-01-16 16:42:02 +01:00
Thomas Boch
bb8116eb4e Merge pull request #224 from cds-astro/fix-pr-213
Bug fix for issue #213: CSS style for canvas element is more selective
2025-01-16 14:14:35 +01:00
Thomas Boch
afce55f1dd Bug fix for issue #213: CSS style for canvas element is more selective 2025-01-16 14:09:53 +01:00
MARCHAND MANON
718a8a073c fix: this.view does not exist, so it's better to use reportChange than requestRedraw 2025-01-16 13:09:51 +01:00
Thomas Boch
c620069c18 Bug fix for issue #216: circle radius is computed more accurately now 2025-01-16 12:01:14 +01:00
Thomas Boch
921d395cb2 Merge pull request #222 from cds-astro/fix-circle-opacity-not-working
Fix circle opacity not working
2025-01-16 10:12:20 +01:00
Thomas Boch
bbd5848bdb Bug fix: opacity is now available for Circle overlays (issue #215) 2025-01-16 09:58:17 +01:00
Thomas Boch
cc8becb437 Merge pull request #218 from cds-astro/fix-redraw-after-footprints
fix: request a redraw after adding an array of footprints
2025-01-15 11:19:07 +01:00
MARCHAND MANON
e28c37e5e0 fix: request a redraw after adding an array of footprints 2025-01-15 11:10:50 +01:00
Thomas Boch
7062a3cd76 Update README.md with terms of use
Add Terms of use for Aladin Lite embedding.
2024-12-05 10:26:32 +01:00
Matthieu Baumann
5f57f037f8 fix removal when rebasing, remove z-index of the tooltip causing bugs in the ui 2024-11-08 14:55:28 +01:00
Philip Matsson
765c0d0dcb Add documentation for the selector options 2024-11-08 14:55:28 +01:00
Philip Matsson
1f790a4b54 Fix issue with selection fillColor opacity 2024-11-08 14:55:28 +01:00
Philip Matsson
baa8f53349 Cleaning up 2024-11-08 14:55:28 +01:00
Philip Matsson
42ece4fba1 Add option for manual selection logic 2024-11-08 14:55:28 +01:00
Philip Matsson
35f13fe1f0 Push overlayItems in selector getObjects as an array for consistency 2024-11-08 14:55:28 +01:00
Philip Matsson
ddfd5ead05 Update select logic 2024-11-08 14:55:28 +01:00
Philip Matsson
5410544404 Allow color as function for select types 2024-11-08 14:55:28 +01:00
Philip Matsson
00c9d6ffc5 Customize select logic 2024-11-08 14:55:28 +01:00
Philip Matsson
3fb4a6493a Update polyline select implementation 2024-11-08 14:55:28 +01:00
Philip Matsson
0e27fb8765 Fix typo in polyline BB intersect function 2024-11-08 14:55:28 +01:00
Philip Matsson
6f2730893f Modify objects returned from selector and finish poly select impl 2024-11-08 14:55:28 +01:00
Matthieu Baumann
a83cfaab25 CD: use rustup stable 2024-11-06 16:45:52 +01:00
Matthieu Baumann
aa261b49ef ci: build in dbg 2024-11-06 15:44:08 +01:00
Matthieu Baumann
24be79c412 ci: no need for nightly rust 2024-11-06 15:41:46 +01:00
Matthieu Baumann
8cac042a18 fix: only cache the HiPS object atm 2024-11-06 15:30:30 +01:00
Matthieu Baumann
a6f2f1ed76 UI: expose gamma slider. Fix #190 2024-11-06 15:30:30 +01:00
Matthieu Baumann
5562d74c0b fix hover color on catalogs 2024-11-06 15:30:30 +01:00
Matthieu Baumann
e85945947a add channel slider when adding from the hips browser window 2024-11-06 15:30:30 +01:00
Matthieu Baumann
1e51a6e17e wip: hips3d struct and hips enum 2024-11-06 15:30:30 +01:00
Matthieu Baumann
8ca394459d buffer for 3D hipses + prepare refac of HiPS2D and its buffer + + hpx_unproj gpu side (not tested) 2024-11-06 15:30:30 +01:00
Matthieu Baumann
97b51f1567 first commit 2024-11-06 15:30:30 +01:00
Matthieu Baumann
9b098fdcdd restore zooming out feature 2024-10-11 13:45:04 +02:00
Matthieu Baumann
278bba0cb3 doc: add MOC and GraphicOverlay method documentation 2024-10-10 10:20:11 +02:00
Matthieu Baumann
d94a93c33f doc: add Image methods 2024-10-09 18:18:16 +02:00
Matthieu Baumann
84f998afb8 fix: precision reading of fields when parsing binary VOTable 2024-10-09 17:07:40 +02:00
Matthieu Baumann
d792b2e8e9 add release badge 2024-10-09 16:49:49 +02:00
Matthieu Baumann
52ea23a2d8 use texture2darray for displaying HiPS 2024-10-09 16:46:12 +02:00
Simon Torres
9100d971fb add selectionColor, onClick to catalog parameters handled by updateShape 2024-10-09 15:58:42 +02:00
Matthieu Baumann
af9fd4ee77 add api examples link in the doc 2024-09-25 22:14:10 +02:00
Matthieu Baumann
e1ec21ce12 add typedefs 2024-09-25 19:17:43 +02:00
Matthieu Baumann
8a33084de9 make jsdoc a little more responsive 2024-09-25 00:24:14 +02:00
Matthieu Baumann
f2687bf860 fix doc deploy workflow 2024-09-24 23:39:25 +02:00
Matthieu Baumann
ec54ca5625 fix doc deploy workflow 2024-09-24 23:38:25 +02:00
Matthieu Baumann
f79d47d61e update jsdoc template to docdash 2024-09-24 23:36:19 +02:00
Matthieu Baumann
e6321f3950 resize vignettes 2024-09-24 18:27:42 +02:00
Matthieu Baumann
ea174b2182 Update README.md
contributing guidelines
2024-09-24 15:43:28 +02:00
Matthieu Baumann
1ad6c54538 README.md 2024-09-24 15:12:42 +02:00
Matthieu Baumann
7d3eb6e80a Update README.md
Add links to editable examples
2024-09-24 15:10:21 +02:00
Matthieu Baumann
61f9af1415 use Moc.fits when loading a local HiPS + add readme example vignettes 2024-09-24 14:29:32 +02:00
Matthieu Baumann
2395cb9425 wcs basic doc + filelist doc 2024-09-19 11:38:11 +02:00
Matthieu Baumann
f5da11c337 Merge branch 'develop' 2024-09-18 17:30:48 +02:00
Matthieu Baumann
d61b56c0ce 3.5.1-beta 2024-09-18 17:29:25 +02:00
Matthieu Baumann
9c9ebb0ed1 add sesame access in A.Utils + Aladin.remove that removes either an overlay or a layer 2024-09-18 17:22:17 +02:00
Matthieu Baumann
64d013618f fix: remove overlay by name 2024-09-18 15:00:17 +02:00
Matthieu Baumann
504cab42bb feat: add possibility of loading a local hips without the need of starting an http server 2024-09-18 14:52:18 +02:00
Matthieu Baumann
bf726088ad trigger positionChanged with dragging false when releasing the mouse 2024-09-13 11:22:17 +02:00
Matthieu Baumann
4fe70f09bb prepare alpha npm package 2024-09-12 17:08:59 +02:00
Matthieu Baumann
aa8c31d246 simplify new test 2024-09-12 17:05:33 +02:00
Matthieu Baumann
1271e5f0ac remove inject css vite plugin to manually insert the content of aladin.css in js inside the aladin lite div container 2024-09-12 17:05:33 +02:00
MARCHAND MANON
afca8f8be9 fix: also add style sheet in shadow dom context 2024-09-12 17:05:33 +02:00
Matthieu Baumann
f5ac0dff61 npm packaging: reduce the size of the package 2024-09-12 10:54:12 +02:00
Matthieu Baumann
959c99fb19 make rust test pass 2024-09-11 18:15:17 +02:00
Matthieu Baumann
8ee161481e expose in the doc the api of coo class 2024-09-11 18:15:17 +02:00
Matthieu Baumann
3c23b6dbe9 remove rust warning, fix rust compilation 2024-09-11 18:15:17 +02:00
Matthieu Baumann
b4f905e745 fix css browser text input width so that user can redefine css 2024-09-11 18:15:17 +02:00
Matthieu Baumann
4c48d9a2a1 fix default allwise hips stored 2024-09-11 18:15:17 +02:00
Matthieu Baumann
7379e81277 add new tests. configure playwright to be less subject to timeouts by avoiding doing requests and using mocked data (gw local fits files, image fits files, local hips jpg tiles) 2024-09-11 18:15:17 +02:00
Matthieu Baumann
3f1702b34c add gw to playwright tests 2024-09-11 18:15:17 +02:00
Matthieu Baumann
aacf79007e fix playwright snapshots 2024-09-11 18:15:17 +02:00
Matthieu Baumann
180b63db37 rename ImageHiPS in HiPS, factorize Image/HiPS, zoom for trackpad refined 2024-09-11 18:15:17 +02:00
Matthieu Baumann
46cf0c2939 wip have a default hips url on allsky for the default hips list to begin to query while waiting for the mocserver response 2024-09-11 18:15:17 +02:00
Matthieu Baumann
69b2254542 fasten a little bit the starting by disabling the download of less precised tiles and thus it will only blend the good resolued tiles with less precised ones. 2024-09-11 18:15:17 +02:00
Matthieu Baumann
c9b1fc5f7f fix issue #179: onClick can be associated to user defined function 2024-09-11 18:15:17 +02:00
Matthieu Baumann
0024032861 WIP: try to enhance starting 2024-09-11 18:15:17 +02:00
Matthieu Baumann
b9fb0b7e53 avoid computing the full unprojected texturefor the raytracing step. Hope it's gonna fasten the starting of aladin lite 2024-09-11 18:15:17 +02:00
Matthieu Baumann
38d14e2239 add possibility to associate an Image or HTMLCanvasElement to a specific source in the shape function 2024-09-11 18:15:17 +02:00
Matthieu Baumann
b0bf7da8b1 add error ellipse example for 2mass 2024-09-11 18:15:17 +02:00
Matthieu Baumann
3dd2c19c4c first commit hips cube impl 2024-09-11 18:15:17 +02:00
Matthieu Baumann
f0d9ccaf0f remove tsconfig, happy-dom dep 2024-09-10 18:28:30 +02:00
Matthieu Baumann
6021514ab7 fix test in ci 2024-09-10 18:28:30 +02:00
Matthieu Baumann
e6acb80f4d add to changelog 2024-09-10 18:28:30 +02:00
Matthieu Baumann
bd1b165971 remove firefox test, mock some assets (MOC, votable), remove CI for the moment, local use only 2024-09-10 18:28:30 +02:00
Xen0Xys
4eb2dece2c Remove vitest from project dependencies 2024-09-10 18:28:30 +02:00
Xen0Xys
c89156211b Add basic playwright tests for Aladin Lite UI 2024-09-10 18:28:30 +02:00
szpetny
fcefe89f17 restore A.footprint function 2024-08-21 18:53:34 +02:00
Xen0Xys
1d68d0e6e3 🎨 Improve variable names and documentation 2024-08-12 10:54:49 +02:00
Tom Czekaj
5a49ccb7b3 📝 Add overlay type definition
Co-authored-by: Matthieu Baumann <baumannmatthieu0@gmail.com>
2024-08-12 10:54:49 +02:00
Xen0Xys
c16309f670 Add removeOverlayByName function 2024-08-12 10:54:49 +02:00
bmatthieu3
cedea781a1 allow the user to define and use its own colormaps.
Aladin.getListOfColormaps() and Aladin.addColormap new method. Solve #174
2024-07-29 12:13:00 +02:00
Matthieu Baumann
d8ff8aa41e remove tiff dep 2024-07-29 09:45:33 +02:00
bmatthieu3
3c4ec3a0c1 wip tiff support 2024-07-29 09:45:33 +02:00
Matthieu Baumann
dcf3bb360a wip parse the header inside xmp 2024-07-29 09:45:33 +02:00
bmatthieu3
c42002db8f wip: image format inference, avm parser based on https://www.strudel.org.uk/avm/js/, wcs creation from avm tags 2024-07-29 09:45:33 +02:00
Matthieu Baumann
e0726590ab Update README.md 2024-07-28 00:00:23 +02:00
Matthieu Baumann
4baab48716 return pos in icrs for the click 2024-07-24 20:57:53 +02:00
Matthieu Baumann
b9791be5e3 update codemeta [skip ci] 2024-07-22 18:23:02 +02:00
Matthieu Baumann
1714e8705e v3.4.5 latest 2024-07-22 18:13:22 +02:00
bmatthieu3
0cf53a6997 add local hips example, hips cache is not a static variable anymore, disable scroll bar style in the measurementdiv table 2024-07-22 17:42:41 +02:00
Matthieu Baumann
7c4fdb80a7 hips cache store the hips object directly 2024-07-22 09:24:32 +02:00
Matthieu Baumann
888aa6fc45 stack close btn 2024-07-21 12:14:33 +02:00
Matthieu Baumann
5a298f6ee1 fix some bugs, adapt ui for a new release 2024-07-17 18:43:29 +02:00
Xen0Xys
80f48331df 📝 Add documentation for layerChanged event 2024-07-17 09:58:28 +02:00
Xen0Xys
746e20f2f0 📝 Update changelog 2024-07-17 09:58:28 +02:00
Xen0Xys
1c15d6578c 🔇 Remove unused log 2024-07-17 09:58:28 +02:00
Xen0Xys
ba85bb496d Change layerChanged event trigger strategy 2024-07-17 09:58:28 +02:00
Xen0Xys
609b78dda3 📝 Add layerChanged event example to al-event-listeners.html 2024-07-17 09:58:28 +02:00
Xen0Xys
4c7449ce54 Add baseLayerChanged event when the base layer is changed 2024-07-17 09:58:28 +02:00
Matthieu Baumann
ad3e86b146 add format change ui, send a hips_removed event when a layer changes 2024-07-16 22:48:22 +02:00
Matthieu Baumann
b2b7985f7e v3.4.4 bugfix version 2024-07-15 18:45:12 +02:00
Matthieu Baumann
b632db96b1 fix some ui, line thickness, add resizeChanged and projectionChanged callbacks 2024-07-15 18:35:16 +02:00
Matthieu Baumann
e9fbafca18 add doc example 2024-07-12 19:03:43 +02:00
Matthieu Baumann
16b01504a6 fix hips icon name 2024-07-12 18:59:57 +02:00
Matthieu Baumann
c8a4fb25d3 add an API example for putting an image as overlay with a WCS given as JS objec 2024-07-12 17:57:36 +02:00
Matthieu Baumann
7da91d7293 points to wcs git path until a new official version is deployed 2024-07-06 14:29:55 +02:00
Matthieu Baumann
9fa4159ae0 ui: catalog query box 2024-07-06 12:20:04 +02:00
Matthieu Baumann
73f29a5e72 remove rust warnings 2024-07-04 10:40:35 +02:00
Matthieu Baumann
3937febb46 fix issue https://github.com/cds-astro/aladin-lite/issues/136, handle fits display with CDELT1 > 0.0 2024-07-04 10:19:16 +02:00
Matthieu Baumann
4b5dc7ecf1 beta 3.4.3 2024-07-03 16:09:45 +02:00
Matthieu Baumann
00f13403f5 [ci skip] remove some rust warnings 2024-07-03 16:05:23 +02:00
Matthieu Baumann
9ccc7ce602 fix some bugs: zoom buttons, fits image display 2024-07-03 16:03:52 +02:00
Matthieu Baumann
ca5cf261f3 [skip-ci] fix ci doc deploy 2024-07-02 19:11:55 +02:00
Matthieu Baumann
4cc7185090 update changelog 2024-07-02 19:11:55 +02:00
Matthieu Baumann
0d172707aa set rust lib version 2024-07-02 19:11:55 +02:00
Matthieu Baumann
1313aeab4b doc fixes 2024-07-02 19:11:55 +02:00
Matthieu Baumann
a2d85aa0a5 fix context sub menu deploy for small screen 2024-07-02 19:11:55 +02:00
Matthieu Baumann
dbd43e9809 Adapt Aladin lite display for small sized devices
In particular for iphones (320px wide). This use media queries (that will be documented) that hide some UI ele
ments if aladin lite is too small. Users still can override the css if they want.
2024-07-02 19:11:55 +02:00
Matthieu Baumann
141ea497f6 update changelog for v3.4.2-beta 2024-07-02 19:00:16 +02:00
Matthieu Baumann
291146779d remove some rust warnings 2024-07-02 19:00:16 +02:00
Matthieu Baumann
098ef8f69d handle rotation for ICRS frame when exporting the WCS. CRVAL on the equator and Galactic frame with cylindrical projection are not handled. This targets issue https://github.com/cds-astro/aladin-lite/issues/170 2024-07-02 19:00:16 +02:00
Matthieu Baumann
d27138e086 WIP: polyline catalog renderer 2024-07-02 19:00:16 +02:00
Matthieu Baumann
bb288bd5b0 propose a removeHiPSFromFavorites method on the aladin object. Targets issue: https://github.com/cds-astro/aladin-lite/issues/171 2024-07-02 19:00:16 +02:00
Matthieu Baumann
0cdc513cb8 move grid rendering from line rasterizer to grid module 2024-07-02 19:00:16 +02:00
Matthieu Baumann
5ae04a98ca rename coverage -> moc 2024-07-02 19:00:16 +02:00
Matthieu Baumann
7b4197a2cd cache the 12 base cell textures 2024-07-02 19:00:16 +02:00
Matthieu Baumann
37c3588348 move rendering part from line rasterizer to the moc renderable 2024-07-02 19:00:16 +02:00
Matthieu Baumann
3b7ef36212 store shaders in the wasm, add a build:dbg vite bundle mode, projections on the gpu 2024-07-02 19:00:16 +02:00
Matthieu Baumann
fe88b2774d use of instancing and impl inside the line rasterizer. Lyon is not needed anymore for plotting lines, but still used for plotting filled paths 2024-07-02 19:00:16 +02:00
Matthieu Baumann
44ce41d9db first commit 2024-07-02 19:00:16 +02:00
Xen0Xys
1065dbe714 Add new function to get view as differents data formats 2024-06-14 10:35:53 +02:00
Xen0Xys
dcbefb6daa 📝 Update changelog 2024-06-11 08:51:12 +02:00
Xen0Xys
4d1a3f08d7 🐛 Update Aladin#getViewWCS to have RADESYS instead of RADECSYS that is now deprecated for the fits standard 2024-06-11 08:51:12 +02:00
Matthieu Baumann
2b5f8a751a add some docs on UI customization, a jsdoc conf file, fix some class links in the doc 2024-06-11 08:32:05 +02:00
Matthieu Baumann
6df2ee9757 clean rust warnings 2024-06-11 08:32:05 +02:00
Matthieu Baumann
813589bfdc restore the use of last version of moclibrust and cdshealpix. Still need to wait for proper version release so that we can points towards them instead of the github repo. This should fix https://github.com/cds-astro/aladin-lite/issues/163 and https://github.com/cds-astro/aladin-lite/issues/150 2024-06-11 08:32:05 +02:00
Simon Torres
51a1c514ae Add selection color to 2024-06-10 23:42:53 +10:00
MARCHAND MANON
c881d1c01c maint: upgrade vite-top-level-await 2024-05-29 13:44:59 +02:00
Matthieu Baumann
93a7c7c642 points to moc/healpix released versions + multi selection 2024-05-29 19:26:35 +10:00
Matthieu Baumann
bada1dcecb fix: restore context after drawing overlay + rename Overlay -> GraphicOverlay 2024-05-21 17:40:22 +10:00
Philip Matsson
e080f9f7d0 Add documentation for the lineDash option 2024-05-21 17:40:22 +10:00
Philip Matsson
fea04ae118 Add line dash option to Overlay class 2024-05-21 17:40:22 +10:00
Matthieu Baumann
fade1f95d2 only authorize giving shape's positions in icrs frame 2024-05-21 11:47:41 +10:00
Matthieu Baumann
ccb7347e54 css links in table color change 2024-05-20 11:30:42 +10:00
Matthieu Baumann
6ab5abae09 fix pixel res filtering 2024-05-19 22:10:46 +10:00
Matthieu Baumann
00f7005bce set url when querying simbad cone search as well 2024-05-19 17:43:14 +10:00
Matthieu Baumann
219761c512 make the HiPS browser more robust and implement a very proto interface for querying the HiPS on the fly generation from cube service: https://alasky.cds.unistra.fr/onthefly-cube-hips/ 2024-05-16 11:51:35 +02:00
Matthieu Baumann
cd363ca4b9 multiple fixes for accessing SODA SKA services, HiPS browser, etc... 2024-05-16 11:51:35 +02:00
Matthieu Baumann
fda33df813 ui fixes and WIP browser 2024-05-16 11:51:35 +02:00
Matthieu Baumann
ee1c23e34f fix: select options remove multiple spaces 2024-05-16 11:51:35 +02:00
Matthieu Baumann
22db1baac7 first commit 2024-05-16 11:51:35 +02:00
660 changed files with 45857 additions and 17311 deletions

View File

@@ -37,13 +37,13 @@ jobs:
uses: actions/configure-pages@v4
- name: Build docs
run: |
npm install -g jsdoc
npm install
npm run doc
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './doc'
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@@ -24,8 +24,6 @@ jobs:
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
rustup default nightly
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
- name: "Install wasm-pack"
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y

View File

@@ -22,18 +22,19 @@ jobs:
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
rustup default nightly
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
- name: "Install wasm-pack"
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y
- name: "Run cargo clippy"
run: cd src/core && cargo clippy --all-targets --features=webgl2 -- -D warnings
- name: Format check
run: cd src/core && cargo fmt --all -- --check
- name: "Install dependencies"
run: |
npm install
- name: "Build Aladin Lite"
run: |
npm run build
- name: "Run some tests"
npm run build:dbg
- name: "Run the rust tests"
run: |
npm run test:build
npm run test:unit

43
.gitignore vendored Normal file
View File

@@ -0,0 +1,43 @@
# vscode files
.vscode/
# for mac os users
.DS_Store
out/
# deployment scripts
deploy/
# node dependencies
node_modules/
package-lock.json
# rust tmp files for useful for the compilation phase
src/core/Cargo.lock
src/core/target/
# this rust file is generated when compiling the code, so it is not
# useful to put it on git
src/core/src/shaders.rs
## python related
# python environment
aladin-lite-venv
# python cached files
__pycache__/
## API doc related
# folder containing the generated HTML API documentation files
docs/
# style jsdoc files generated with npm run doc
jsdoc-custom-styledocs
# responsive jsdoc files generated with npm run doc
jsdoc-make-responsivedocs
## playwright testing framework related
test-results/
playwright-report/
## packaged tar obtained from the cmd: npm run predeploy or npm run deploy
aladin-lite*.tgz
# folder where the generated bundle lies
dist/

33
.zenodo.json Normal file
View File

@@ -0,0 +1,33 @@
{
"license": "GPL-3.0",
"access_right": "open",
"description": "An astronomical HiPS visualizer in the browser ",
"keywords": ["astronomy", "visualizer", "images"],
"language": "eng",
"title": "Aladin Lite",
"grants": [
{
"id": "824064"
}
],
"creators": [
{
"type": "ProjectLeader",
"orcid": "0000-0002-7123-773X",
"name": "Baumann, Matthieu",
"affiliation": "Université de Strasbourg, CNRS, Observatoire astronomique de Strasbourg, UMR 7550, F-67000 Strasbourg, France"
},
{
"type": "ProjectLeader",
"orcid": "0000-0001-5818-2781",
"name": "Boch, Thomas",
"affiliation": "Université de Strasbourg, CNRS, Observatoire astronomique de Strasbourg, UMR 7550, F-67000 Strasbourg, France"
},
{
"type": "ProjectMember",
"orcid": "0000-0001-5713-0998",
"name": "Marchand, Manon",
"affiliation": "Université de Strasbourg, CNRS, Observatoire astronomique de Strasbourg, UMR 7550, F-67000 Strasbourg, France"
}
]
}

View File

@@ -1,20 +1,135 @@
# Changelogs
## 3.3.3
## Unreleased
### What's Changed
* [perf] perform CPU computations with Vec3 and Matrix3 and not 4 dimensions matrices/vectors
* [feat] lockNorthUp Aladin object new option locking the north pole up to the view center
## Released
### 3.6.3
#### What's Changed
* [maint] remove Shift shorcut for triggering rectangular source selection. Shortcuts will be implemented later. by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/269>
* [fix] decide to show the contextual menu only if user has not right click while moving more than 10px. by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/269>
* [fix] CSS selector took the whole div in smartphone usage. by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/269>
* [fix] smartphone 2 fingers zoom pinching around the 180deg meridian. by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/269>
* [fix] use copy2Clipboard utils functions from contextual menu. by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/269>
* [fix] improved ID/HiPS url detection (retry if a relative path to a local HiPS is given as it is considered as an ID). by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/269>
### 3.6.1
#### What's Changed
* [feat] AVM tags support found in jpeg headers by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/178>
* [feat] Merge remove overlay by name to Develop by [@Xen0Xys][Xen0Xys] in <https://github.com/cds-astro/aladin-lite/pull/182>
* [fix] Restore A.footprint function by [@szpetny][szpetny] in <https://github.com/cds-astro/aladin-lite/pull/183>
* [testing] Merge playwright tests to Develop by [@Xen0Xys][Xen0Xys] in <https://github.com/cds-astro/aladin-lite/pull/176>
* [fix] Version 3.5.1 by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/180>
* [fix] Also add style sheet in shadow dom context by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/194>
* [feat] Add selectionColor, onClick to catalog parameters handled by updateShape by [@simontorres][simontorres] in <https://github.com/cds-astro/aladin-lite/pull/198>
* [feat] HiPS cube support by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/204>
* [feat] PolySelect implementation and miscellaneous selection improvements by [@pmatsson][pmatsson] in <https://github.com/cds-astro/aladin-lite/pull/195>
* [fix] Request a redraw after adding an array of footprints by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/218>
* [fix] Circle opacity not working by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/222>
* [fix] Bug introduced in #218 by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/223>
* [fix] CSS style for canvas element is more selective by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/224>
* [maint] Add zenodo.json file by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/226>
* [maint] Remove old files using jquery by [@cquiroz][cquiroz] in <https://github.com/cds-astro/aladin-lite/pull/231>
* [fix] Display of HiPS with maxOrder = 0 by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/236>
* [fix] Combine requestedOptions and Aladin.DEFAULT_OPTIONS with spread operator by [@pcuste1][pcuste1] in <https://github.com/cds-astro/aladin-lite/pull/237>
* [fix] Add back cmap reverse checkbox by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/238>
* [fix] JPEG draw black screen when tiles are missing by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/246>
* [fix] Filled moc drawing reverse longitude by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/250>
* [doc] Deprecate longitudeReversed HiPS options property by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/251>
* [fix] Stop contextmenu event propagation only if context menu enabled by [@alexgoff][alexgoff] in <https://github.com/cds-astro/aladin-lite/pull/259>
* [ui] Minor fixes and enhancements by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/256>
* [fix] Handle NaNs by the GPU (fix for windows) by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/254>
* [fix] Grid labels formatting by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/261>
* [feat] Shape function given to a catalog by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/262>
* [fix] Tooltip pos out of fov by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/263>
* [fix] MOC settings after its creation by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/265>
* [fix] ICRS to FK5J2000 cooframe renaming by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/264>
* [fix] Revert #264 by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/268>
#### New Contributors
* [@cquiroz][cquiroz] made their first contribution in <https://github.com/cds-astro/aladin-lite/pull/231>
* [@pcuste1][pcuste1] made their first contribution in <https://github.com/cds-astro/aladin-lite/pull/237>
* [@alexgoff][alexgoff] made their first contribution in <https://github.com/cds-astro/aladin-lite/pull/259>
**Full Changelog**: <https://github.com/cds-astro/aladin-lite/compare/3.4.5...3.6.1>
### 3.6.1-beta
#### What's Changed
* [feat] Add selectionColor, onClick to catalog parameters handled by updateShape by [@simontorres][simontorres] in <https://github.com/cds-astro/aladin-lite/pull/198>
* [feat] HiPS cube support by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/204>
* [feat] PolySelect implementation and miscellaneous selection improvements by [@pmatsson][pmatsson] in <https://github.com/cds-astro/aladin-lite/pull/195>
* [fix] Request a redraw after adding an array of footprints by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/218>
* [fix] Circle opacity not working by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/222>
* [fix] Bug introduced in #218 by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/223>
* [fix] CSS style for canvas element is more selective by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/224>
* [maint] add zenodo.json file by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/226>
* [maint] Remove old files using jquery by [@cquiroz][cquiroz] in <https://github.com/cds-astro/aladin-lite/pull/231>
#### New Contributors
* [@cquiroz][cquiroz] made their first contribution in <https://github.com/cds-astro/aladin-lite/pull/231>
**Full Changelog**: <https://github.com/cds-astro/aladin-lite/compare/3.5.1-beta...3.6.1-beta>
### 3.5.1-beta
* [feat] Add support for name removing in `removeOverlay` method
* [test] Add support of playwright. Instructions in the readme for running the test matching snapshots [PR #176]
* [fix] Order of overlays in the stack now matches the addMOC/addCatalog/addOverlay calls ordering
* [doc] Expose the API of Coo class
* [fix] Insert aladin css inside the aladin lite so that it should be compliant with the use of shadow DOMs [cds-astro/ipyaladin#113], [marimo-team/marimo#2106]
* [feat] Add possibility of giving a local JS FileList to load a locally-stored HiPS without starting an HTTP server <https://github.com/cds-astro/aladin-lite/pull/103>
* [fix] removeOverlayByName
### 3.5.0-beta
* [enhancement] add `options.colnames` to A.catalogFromVizieR to tell VizieR we want absolutely want to retrieve specific columns
* [feat] provide a new drawAxes option to A.ellipse. This is useful for plotting error ellipsis.
### 3.4.5-beta
* [feat] add `layerChanged` event when a layer is added or removed
* [deprecate] of `select` event, use `objectsSelected` event instead
* [ui] add the ability to switch the tile format to download
### 3.4.3-beta
* [bugfix] zoom control buttons
* [feat] save a MOC as a JSON file from the UI <https://github.com/cds-astro/aladin-lite/issues/154>
* [feat] save a source selection from the measurement table as a CSV file
* [feat] allow to display jpeg/jpg images with a wcs passed as a JS dictionary: <https://github.com/cds-astro/aladin-lite/issues/173>
### 3.4.2-beta
* [impr] Improve smartphone support by setting media queries + a better logic for deploying the contextual menu sub options.
* [impr] Improve `WCS` view export with 3rd euler rotation encoding: <https://github.com/cds-astro/aladin-lite/issues/170>. Still some cases are to be handled like: crval on the equator or cylindrical with a galactic frame rotation.
* [fixed] Change `RADECSYS` to `RADESYS` for `Aladin#getViewWCS` to follow fits standard deprecation
* [feat] Add new method `Aladin#getViewImageBuffer` to get the current view as a PNG buffer
* [feat] New line rasterizer using GL instancing. This enhances the rendering speed of MOCs.
### 3.3.3
* [feat] UI: add HiPS basic filter that filters the `hipsList` given
* [feat] New `hipsList` option parameter when instancing a new Aladin object.
* [feat] Zoom smoothing using hermite cubic interpolation functions
* [feat] shape option of Catalog and ProgressiveCat accepts a function returning a Footprint. This allow user to
associate a footprint to a specific source
* [feat] Hover color support by @pmatsson and @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/145>
* [feat] Hover color support by [@pmatsson][pmatsson] and [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/145>
## 3.3.2
### 3.3.2
* [fixed] do not allow to query the properties several times for an imageHiPS
* [fixed] Detecting raytracing rendering mode. Adapt the rendering mode in function of the fov value and the projection used. Some projections do have more distortions with wide FoVs so it is better to use the raytracing rendering mode when fov >= smaller FoV threshold.
## 3.3.0
### 3.3.0
* [fixed] multiple calls to setImageSurvey with the same survey object led to strange behaviour.
* [perf] Display the first tile received instantly with no blending. Should enhance the slow reported in issue #88.
@@ -35,61 +150,61 @@
* [fixed] The parameters `gridColor` and `gridOpacity`, `gridOptions.showLabels` now work as expected
* New documentation API (W.I.P) here: <https://cds-astro.github.io/aladin-lite/>
* New release page here: <https://aladin.cds.unistra.fr/AladinLite/doc/release/>
* A major UI update by @bmatthieu3
* A major UI update by [@bmatthieu3][bmatthieu3]
1. Some API new classes A.box, A.button
2. A status bar where the user can enque messages for a specific amount of time (Aladin.addStatusBarMessage)
* Remove of JQuery and autocompletejs dependencies by @bmatthieu3
* Fix some performances issues, i.e. a bug when resizing the aladin lite view and which launched several parallel requestAnimationFrame by @bmatthieu3
* Remove of JQuery and autocompletejs dependencies by [@bmatthieu3][bmatthieu3]
* Fix some performances issues, i.e. a bug when resizing the aladin lite view and which launched several parallel requestAnimationFrame by [@bmatthieu3][bmatthieu3]
* Polygon and circular selection (see Aladin class API documentation for how to use it)
* ObsCore and Datalink votable parsing and interpretation. This work is still in progress and made in the frame of the SKA radio mission by @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/116>
* SODA service query window formular by @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/116>
* read only catalog option by @szpetny in <https://github.com/cds-astro/aladin-lite/pull/117>
* Small changed regarding drawing a footprint by @szpetny in <https://github.com/cds-astro/aladin-lite/pull/118>
* Object and footprint click/hover events expose mouse coordinates by @szpetny in <https://github.com/cds-astro/aladin-lite/pull/121>
* A proposal of a new feature - fill the polygon with a color by @szpetny in <https://github.com/cds-astro/aladin-lite/pull/122>
* update getViewWCS to adapt to projection by @ManonMarchand in <https://github.com/cds-astro/aladin-lite/pull/119>
* New SAMP support by @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/128>
* A possibility to create Coo and Footprint objects by @szpetny in <https://github.com/cds-astro/aladin-lite/pull/130>
* ObsCore and Datalink votable parsing and interpretation. This work is still in progress and made in the frame of the SKA radio mission by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/116>
* SODA service query window formular by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/116>
* read only catalog option by [@szpetny][szpetny] in <https://github.com/cds-astro/aladin-lite/pull/117>
* Small changed regarding drawing a footprint by [@szpetny][szpetny] in <https://github.com/cds-astro/aladin-lite/pull/118>
* Object and footprint click/hover events expose mouse coordinates by [@szpetny][szpetny] in <https://github.com/cds-astro/aladin-lite/pull/121>
* A proposal of a new feature - fill the polygon with a color by [@szpetny][szpetny] in <https://github.com/cds-astro/aladin-lite/pull/122>
* update getViewWCS to adapt to projection by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/119>
* New SAMP support by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/128>
* A possibility to create Coo and Footprint objects by [@szpetny][szpetny] in <https://github.com/cds-astro/aladin-lite/pull/130>
* new method aladin.getFrame() that returns the name of the current coordinate system
* `getViewWCS` now adapts to the `cooFrame` and the `projection`
* `getFov` is no longer capped at 180°
* bugfix `setProjection` now also updates for 'PAR' and 'SFL' projections
## 3.2.0
### 3.2.0
* MOC rendering perf enhanced. Possibility to draw only the perimeter of a MOC object (perimeter set to True)
* Many fixes e.g. footprint rendering for all sky projections
* A line/shape webgl rasterizer thanks to the use of the `lyon`crate. MOCs and grid lines are rendered that way. Therefore, it is possible to change the grid lines thickness
* Use of vite for the project management and deployment
## 3.1.0
### 3.1.0
* Add message for safari users to enable WebGL2 feature and reload the page by @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/54>
* Starting fits support by @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/70>
* display fits images with the drag and drop by @bmatthieu3
* Add message for safari users to enable WebGL2 feature and reload the page by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/54>
* Starting fits support by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/70>
* display fits images with the drag and drop by [@bmatthieu3][bmatthieu3]
![Kapture 2023-03-23 at 14 34 28](https://user-images.githubusercontent.com/2772384/227264124-8e05a3d8-1565-497f-a118-39fab3c6ed83.gif)
* support `webp` tile format by @bmatthieu3 and @tboch
* planetary name resolver by @tboch
* small ui changes and bug fixes by @bmatthieu3
* add codemeta and its validatior action by @ManonMarchand in <https://github.com/cds-astro/aladin-lite/pull/66>
* support `webp` tile format by [@bmatthieu3][bmatthieu3] and [@tboch][tboch]
* planetary name resolver by [@tboch][tboch]
* small ui changes and bug fixes by [@bmatthieu3][bmatthieu3]
* add codemeta and its validatior action by [@ManonMarchand][ManonMarchand] in <https://github.com/cds-astro/aladin-lite/pull/66>
## 3.0.0
### 3.0.0
Official release of Aladin Lite v3, [as announced in CDS news](https://cds.unistra.fr/news.php?fn_mode=fullnews&fn_incl=0&fn_id=958).
* Fix missing tiles issue by @tboch in <https://github.com/cds-astro/aladin-lite/pull/18>
* Hips catalogue filtering by @tboch in <https://github.com/cds-astro/aladin-lite/pull/28>
* Make footprint selection easier by @tboch in <https://github.com/cds-astro/aladin-lite/pull/19>
* Bug fix: enable different colors for multiple polylines in same layer by @tboch in <https://github.com/cds-astro/aladin-lite/pull/30>
* Method remove to delete individual source from a catalogue layer by @tboch in <https://github.com/cds-astro/aladin-lite/pull/37>
* Stop animation by @tboch in <https://github.com/cds-astro/aladin-lite/pull/40>
* Add message for safari users to enable WebGL2 feature and reload the page by @bmatthieu3 in <https://github.com/cds-astro/aladin-lite/pull/54>
* Fix missing tiles issue by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/18>
* Hips catalogue filtering by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/28>
* Make footprint selection easier by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/19>
* Bug fix: enable different colors for multiple polylines in same layer by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/30>
* Method remove to delete individual source from a catalogue layer by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/37>
* Stop animation by [@tboch][tboch] in <https://github.com/cds-astro/aladin-lite/pull/40>
* Add message for safari users to enable WebGL2 feature and reload the page by [@bmatthieu3][bmatthieu3] in <https://github.com/cds-astro/aladin-lite/pull/54>
## 2.x.x
## Version: 2.x.x
### 2020-08
* polyline improvements (by @imbasimba)
* polyline improvements (by [@imbasimba][imbasimba])
### 2020-07
@@ -353,4 +468,34 @@ New in the API:
### Fin 2013
* ajout catalogue progressif
* ajout on select, objectClicked, objectHovered
* ajout on select, objectClicked, objectHovered
## Contributors
Aladin Lite is made possible thanks to those people:
* [@alexgoff][alexgoff]
* [@bmatthieu3][bmatthieu3]
* [@cquiroz][cquiroz]
* [@imbasimba][imbasimba]
* [@ManonMarchand][ManonMarchand]
* [@pcuste1][pcuste1]
* [@pmatsson][pmatsson]
* [@simontorres][simontorres]
* [@szpetny][szpetny]
* [@tboch][tboch]
* [@Xen0Xys][Xen0Xys]
[alexgoff]: https://github.com/alexgoff
[bmatthieu3]: https://github.com/bmatthieu3
[cquiroz]: https://github.com/cquiroz
[imbasimba]: https://github.com/imbasimba
[ManonMarchand]: https://github.com/ManonMarchand
[pcuste1]: https://github.com/pcuste1
[pmatsson]: https://github.com/pmatsson
[simontorres]: https://github.com/simontorres
[szpetny]: https://github.com/szpetny
[tboch]: https://github.com/tboch
[Xen0Xys]: https://github.com/Xen0Xys

182
README.md
View File

@@ -1,4 +1,4 @@
# Aladin Lite v3
# [Aladin Lite](https://aladin.u-strasbg.fr/AladinLite)
**An astronomical HiPS visualizer in the browser** <img src="aladin-logo.png" alt="Aladin Lite logo" width="220">
@@ -9,32 +9,54 @@ See [A&A 578, A114 (2015)](https://arxiv.org/abs/1505.02291) and [IVOA HiPS Reco
Aladin Lite is built to be easily embeddable in any web page. It powers astronomical portals like [ESASky](https://sky.esa.int/), [ESO Science Archive portal](http://archive.eso.org/scienceportal/) and [ALMA Portal](https://almascience.eso.org/asax/).
More details on [Aladin Lite documentation page](http://aladin.u-strasbg.fr/AladinLite/doc/).
A new [API technical documentation](https://cds-astro.github.io/aladin-lite/) is now available.
[![Run tests](https://github.com/cds-astro/aladin-lite/actions/workflows/test.yml/badge.svg)](https://github.com/cds-astro/aladin-lite/actions/workflows/test.yml)
[![API Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://cds-astro.github.io/aladin-lite)
[![API Documentation](https://img.shields.io/badge/API-documentation-blue.svg)](https://cds-astro.github.io/aladin-lite)
[![Release page](https://img.shields.io/badge/Release-download-yellow.svg)](https://aladin.cds.unistra.fr/AladinLite/doc/release/)
# How to test it ?
Aladin Lite is available [at this link](https://aladin.u-strasbg.fr/AladinLite).
Aladin Lite v3 is out! Please play with [Aladin Lite v3 at this link](https://aladin.u-strasbg.fr/AladinLite).
## Running & editable JS examples
<!-- Examples -->
<table><tbody>
<tr><td>Basic Aladin Lite setup</td><td>Load SIMBAD & NED catalog data</td><td>Load a FITS image</td></tr>
<tr><td align="left"><a href="https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/AL-in-responsive-div/"><img height="200" src="https://github.com/cds-astro/aladin-lite/blob/develop/assets/vignettes/Basic%20Aladin%20Lite%20instanciation.png?raw=true"></img></a></td>
<td align="center"><a href="https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/easy-access-simbad-ned/"><img height="200" src="https://github.com/cds-astro/aladin-lite/blob/develop/assets/vignettes/Load%20SIMBAD%20&%20NED%20catalogs%20data.png?raw=true"></img></a></td>
<td align="right"><a href="https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/load-FITS-image-URL/"><img height="200" src="https://github.com/cds-astro/aladin-lite/blob/develop/assets/vignettes/Load%20a%20FITS%20image.png?raw=true"></img></a></td></tr><tr>
<td>American Astronomical Society 225<br/>example</td><td>Display proper motion vectors</td><td>Visualization of Mars</td></tr><tr>
<td align="left"><a href="https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/AAS225/"><img height="200" src="https://github.com/cds-astro/aladin-lite/blob/develop/assets/vignettes/American%20Astronomical%20Society%20225%20demonstration.png?raw=true"></img></a></td>
<td align="center"><a href="https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/show-proper-motions/"><img height="200" src="https://github.com/cds-astro/aladin-lite/blob/develop/assets/vignettes/Display%20proper%20motions.png?raw=true"></img></a></td>
<td align="right"><a href="https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/mars-visualisation/"><img height="200" src="https://github.com/cds-astro/aladin-lite/blob/develop/assets/vignettes/Visualization%20of%20Mars.png?raw=true"></img></a></td></tr></tbody></table>
<!-- Examples -->
## Releases
For integrating Aladin Lite into your personal website, please refer to this [release page](https://aladin.cds.unistra.fr/AladinLite/doc/release/).
Always prefer using the latest version. If you want the new features without minding about the bugs coming with it, then the beta is the good way to go.
A [release page](https://aladin.cds.unistra.fr/AladinLite/doc/release/) keeps track of all the current and previous builds.
A ``release`` and ``beta`` versions, regularly updated are available. The ``beta`` version is usually more advanced than the ``release`` one but features more error prone and not production-ready code.
## API documentation
> [!TIP]
> If you are working on a project that uses Aladin Lite, prefer working with a fixed version. Every build is tagged with a version number and accessible with:
>
> ```https://aladin.cds.unistra.fr/AladinLite/api/v3/<version>/aladin.js```
There is a new in progress API documentation at [this link](https://cds-astro.github.io/aladin-lite).
## Documentation
There is a new API documentation available [here](https://cds-astro.github.io/aladin-lite).
Editable examples showing the API can also be found [here](https://aladin.cds.unistra.fr/AladinLite/doc/API/examples/).
## Embed it into your projects
**Terms of use**: you are welcome to integrate Aladin Lite in your web pages and to customize its GUI to your needs, but **please leave the Aladin logo and link intact** at the bottom right of the view.
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
```html
<!doctype html>
<html>
<head>
@@ -57,60 +79,37 @@ Please include [the javascript script of Aladin Lite v3](https://aladin.cds.unis
</html>
```
### Using the aladin lite NPM package
### NPM deployment
First, install it with npm:
A [NPM package](https://www.npmjs.com/package/aladin-lite) is deployed and maintained. It is used by [ipyaladin](https://github.com/cds-astro/ipyaladin), a jupyter widget allowing to run aladin lite in a notebook.
```npm i aladin-lite```
Second, you can use it that way:
```js
<!doctype html>
<html>
<head>
<!-- Mandatory when setting up Aladin Lite v3 for a smartphones/tablet usage -->
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no">
</head>
<body>
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
Aladin Lite can be imported with:
```html
<script type="module">
import A from 'aladin-lite';
A.init.then(() => {
let aladin = A.aladin('#aladin-lite-div', {fov: 360, projection: "AIT", cooFrame: 'equatorial', showCooGridControl: true, showSimbadPointerControl: true, showCooGrid: true});
});
// your code...
</script>
</body>
</html>
```
## Goals of v3
## New features
- Rust/WebGL new core integration
- Remove jQuery dep
- UI dev, better support for smartphones
- FITS images support
- easy sharing of current « view »
- support of all VOTable serializations (using votable.js?)
- support of FITS tables?
- creating HiPS instance from an URL
- multiple mirrors handling for HiPS tile retrival
## Source code
Source code is available in the ``src`` directory.
* [X] Rust/WebGL2 new rendering engine
* [X] Remove jQuery dep
* [ ] UI dev, better support for smartphones
* [X] FITS images support
* [X] WCS parsing, displaying an (JPEG/PNG) image in aladin lite view
* [X] Display customized shapes (e.g. proper motions) from astronomical catalog data
* [X] AVM tags parsing support
* [X] Easy sharing of current « view »
* [ ] All VOTable serializations
* [ ] FITS tables
* [X] Creating HiPS instance from an URL
* [X] Local HiPS loading
* [X] Multiple mirrors handling for HiPS tile retrival
* [ ] HiPS cube
## Licence
@@ -118,7 +117,7 @@ Aladin Lite is currently licensed under GPL v3.0
If you think this license might prevent you from using Aladin Lite in your pages/application/portal, please open an issue or [contact us](mailto:cds-question@unistra.fr)
## Contributing
## Contribution guidelines
There are several ways to contribute to Aladin Lite:
@@ -129,12 +128,12 @@ There are several ways to contribute to Aladin Lite:
- **develop new features/provide code fixing bugs**. As open development is a new thing for us, we will in a first time only take into consideration code contribution (_i.e._ Pull Requests) from our close partners.
In any case, please get in touch before starting a major update or rewrite.
### Building the application steps
### Building steps
First you need to install the dependencies from the package.json
Please run:
```bash
```sh
npm install
```
@@ -143,53 +142,68 @@ 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 will need to switch to the nightly rust version:
```bash
rustup default nightly
```
Then you can build the project:
```bash
```sh
npm run build
```
:warning: **If you are experimenting rust error compilations**:
> [!WARNING]
> **If you are experimenting Rust compiling issues:**
> - Make sure you have your **wasm-pack** version updated. To do so:
> ```sh
> cargo install wasm-pack --version ~0.12
> ```
> - Remove your `src/core/Cargo.lock` file and `src/core/target` directory -- this ensures that you'd escape any bad compilation state:
> ```sh
> git clean -di
> ```
> - Then recompile
> ```sh
> npm run build
> ```
- Make sure you have your **wasm-pack** version updated. To do so:
It will generate the aladin lite compiled code into a `dist/` directory located at the root of the repository. This directory contains two javascript files. `aladin.umd.cjs` follows the UMD module export convention and it is the one you need to use for your project.
```bash
cargo install wasm-pack --version ~0.12
```
### Testing guidelines
- Make sure you are using the rust **nightly** toolchain
- Remove your `src/core/Cargo.lock` file and `src/core/target` directory -- this ensures that you'd escape any bad compilation state:
#### Run the examples
```bash
git clean -di
```
- then recompile with `npm run build`.
A bunch of examples are located into the `examples` directory.
To run them, start a localhost server:
It will generate the aladin lite compiled code into a `dist/` directory located at the root of the repository. This directory contains two javascript files. `aladin.umd.cjs` follows the UMD module export convention and it is the one you can use for your project.
To run the examples, you can start a localhost server with the following command:
```bash
```sh
npm run serve
```
For just compiling the rust core, from the root location do:
#### Rust tests
```bash
These can be executed separately from the JS part:
* Compile the Rust code:
```sh
cd src/core
cargo check --features webgl2
```
and run the tests:
* Run the tests:
```bash
cd src/core
```sh
cargo test --features webgl2
```
#### Snapshot comparisons
We use [playwright](https://playwright.dev/) for snapshot comparison testing. Only ground truth snapshots have been generated for MacOS/Darwin architecture.
First install playwright:
```sh
npx playwright install
```
Run the tests, advises are given for opening the UI mode or for generating your own ground truth snapshots.
```sh
npm run test:playwright
```

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<rect x="0" fill="none" width="20" height="20"/>
<g>

After

Width:  |  Height:  |  Size: 529 B

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17 17H17.01M17.4 14H18C18.9319 14 19.3978 14 19.7654 14.1522C20.2554 14.3552 20.6448 14.7446 20.8478 15.2346C21 15.6022 21 16.0681 21 17C21 17.9319 21 18.3978 20.8478 18.7654C20.6448 19.2554 20.2554 19.6448 19.7654 19.8478C19.3978 20 18.9319 20 18 20H6C5.06812 20 4.60218 20 4.23463 19.8478C3.74458 19.6448 3.35523 19.2554 3.15224 18.7654C3 18.3978 3 17.9319 3 17C3 16.0681 3 15.6022 3.15224 15.2346C3.35523 14.7446 3.74458 14.3552 4.23463 14.1522C4.60218 14 5.06812 14 6 14H6.6M12 15V4M12 15L9 12M12 15L15 12" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 834 B

5
assets/icons/freq.svg Normal file
View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M3 4.5L6 7L6 5.25H18V7L21 4.5L18 2V3.75H6L6 2L3 4.5Z" />
<path d="M6.63935 11.9367C7.14967 10.7061 8.89138 10.7018 9.4077 11.9299L12.735 19.8442C13.9443 22.7205 18.0283 22.6965 19.2036 19.8061L21.1579 15H18.9989L17.351 19.0527C16.8472 20.2915 15.0969 20.3018 14.5787 19.0691L11.2514 11.1548C10.0466 8.28919 5.98264 8.29911 4.79189 11.1706L3.20392 15H5.36906L6.63935 11.9367Z" />
</svg>

After

Width:  |  Height:  |  Size: 623 B

2
assets/icons/hips.svg Normal file
View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20.83 3.078a12.674 12.674 0 0 0-4.52-.878c-3.847 0-3.891 1.6-7.74 1.6a15.028 15.028 0 0 1-4.52-.722L1 20.783A13.093 13.093 0 0 0 6.424 21.8c5.242 0 6.792-1.634 12.034-1.634a13.093 13.093 0 0 1 5.423 1.017zM6.425 20.8a13.724 13.724 0 0 1-4.3-.65l1.063-6.173 7.9 6.296a20.11 20.11 0 0 1-4.663.527zm-1.909-6.973l3.272-2.607 3.258 2.597-3.271 2.607zm4.199 3.346l3.271-2.607 3.286 2.618L12 19.791zm4.211-3.356l3.273-2.608 3.285 2.618-3.272 2.608zm.737 5.859L21 13.828 16.197 10l-4.213 3.357-4.196-3.345-4.54 3.619 1.6-9.288A16.193 16.193 0 0 0 8.57 4.8a9.957 9.957 0 0 0 2.888-.38L7.5 7.5l4.484 3.5L16.5 7.5l-4.286-3.334c.21-.08.413-.161.607-.241a7.791 7.791 0 0 1 3.49-.725 11.86 11.86 0 0 1 3.63.615l2.674 15.872a16.248 16.248 0 0 0-4.157-.52 21.93 21.93 0 0 0-4.796.509zM12 5.156L15.01 7.5l-3.024 2.344-3-2.342z"/><path opacity=".5" d="M4.512 13.827l3.272-2.607 3.258 2.597-3.271 2.607-3.259-2.597z"/><path opacity=".25" d="M12.923 13.818l3.272-2.608 3.286 2.619-3.273 2.608-3.285-2.619z"/><path fill="none" d="M0 0h24v24H0z"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

2
assets/icons/inside.svg Normal file
View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4,3H9A1,1,0,0,1,9,5H5V9A1,1,0,0,1,3,9V4A1,1,0,0,1,4,3ZM9,19H5V15a1,1,0,0,0-2,0v5a1,1,0,0,0,1,1H9a1,1,0,0,0,0-2Zm11-5a1,1,0,0,0-1,1v4H15a1,1,0,0,0,0,2h5a1,1,0,0,0,1-1V15A1,1,0,0,0,20,14ZM20,3H15a1,1,0,0,0,0,2h4V9a1,1,0,0,0,2,0V4A1,1,0,0,0,20,3ZM7,8v8a1,1,0,0,0,1,1h8a1,1,0,0,0,1-1V8a1,1,0,0,0-1-1H8A1,1,0,0,0,7,8Z"/></svg>

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -8,8 +8,8 @@
"dateModified": "2023-01-31",
"issueTracker": "https://github.com/cds-astro/aladin-lite/issues",
"name": "Aladin Lite",
"version": "3.4.0-beta",
"softwareVersion": "3.4.0-beta",
"version": "3.6.5",
"softwareVersion": "3.6.5",
"description": "An astronomical HiPS visualizer in the browser.",
"identifier": "10.5281/zenodo.7638833",
"applicationCategory": "Astronomy, Visualization",

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@@ -0,0 +1,45 @@
hips_doi = 10.26093/cds/aladin/ht9n-7r
creator_did = ivo://CDS/P/DSS2/color
obs_collection = DSS colored
obs_title = DSS colored
obs_description = Color composition generated by CDS. This HiPS survey is based on 2 others HiPS surveys, respectively DSS2-red and DSS2-blue HiPS, both of them directly generated from original scanned plates downloaded from STScI site. The red component has been built from POSS-II F, AAO-SES,SR and SERC-ER plates. The blue component has been build from POSS-II J and SERC-J,EJ. The green component is based on the mean of other components. Three missing plates from red survey (253, 260, 359) has been replaced by pixels from the DSSColor STScI jpeg survey. The 11 missing blue plates (mainly in galactic plane) have not been replaced (only red component).
obs_copyright = Digitized Sky Survey - STScI/NASA, Colored & Healpixed by CDS
obs_copyright_url = http://archive.stsci.edu/dss/copyright.html
client_category = Image/Optical/DSS
client_sort_key = 03-00
hips_builder = Aladin/HipsGen v10.123
hips_creation_date = 2010-05-01T19:05Z
hips_release_date = 2019-05-07T10:55Z
hips_creator = Oberto A. (CDS) , Fernique P. (CDS)
hips_version = 1.4
hips_order = 7
hips_frame = equatorial
hips_tile_width = 512
hips_tile_format = jpeg
dataproduct_type = image
client_application = AladinLite
hips_status = public partial unclonable
hips_rgb_red = DSS2Merged [1488.0 8488.8125 14666.0 Linear]
hips_rgb_blue = DSS2-blue-XJ-S [4286.0 12122.5 19959.0 Linear]
hips_hierarchy = median
hips_pixel_scale = 2.236E-4
hips_initial_ra = 085.30251
hips_initial_dec = -02.25468
hips_initial_fov = 2
moc_sky_fraction = 1.0
hips_copyright = CNRS/Unistra
obs_ack = The Digitized Sky Surveys were produced at the Space Telescope Science Institute under U.S. Government grant NAG W-2166. The images of these surveys are based on photographic data obtained using the Oschin Schmidt Telescope on Palomar Mountain and the UK Schmidt Telescope. The plates were processed into the present compressed digital form with the permission of these institutions. The National Geographic Society - Palomar Observatory Sky Atlas (POSS-I) was made by the California Institute of Technology with grants from the National Geographic Society. The Second Palomar Observatory Sky Survey (POSS-II) was made by the California Institute of Technology with funds from the National Science Foundation, the National Geographic Society, the Sloan Foundation, the Samuel Oschin Foundation, and the Eastman Kodak Corporation. The Oschin Schmidt Telescope is operated by the California Institute of Technology and Palomar Observatory. The UK Schmidt Telescope was operated by the Royal Observatory Edinburgh, with funding from the UK Science and Engineering Research Council (later the UK Particle Physics and Astronomy Research Council), until 1988 June, and thereafter by the Anglo-Australian Observatory. The blue plates of the southern Sky Atlas and its Equatorial Extension (together known as the SERC-J), as well as the Equatorial Red (ER), and the Second Epoch [red] Survey (SES) were all taken with the UK Schmidt. Supplemental funding for sky-survey work at the ST ScI is provided by the European Southern Observatory.
prov_progenitor = STScI
bib_reference = 1996ASPC..101...88L
bib_reference_url = http://cdsads.u-strasbg.fr/abs/1996ASPC..101...88L
t_min = 42413
t_max = 51179
obs_regime = Optical
em_min = 4e-7
em_max = 6e-7
hips_order_min = 0
dataproduct_subtype = color
hipsgen_date = 2019-05-07T10:55Z
hipsgen_params = out=/asd-volumes/sc1-asd-volume8/DSS/DSSColor UPDATE
hipsgen_date_1 = 2024-09-10T16:50Z
hipsgen_params_1 = in=https://alasky.cds.unistra.fr/DSS/DSSColor/ out=./CDS_P_DSS2_color region=3/357 order=5 MIRROR

View File

@@ -8,17 +8,17 @@
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"}));
aladin = A.aladin('#aladin-lite-div', { fov:0.15, target: 'Arp 240', showContextMenu: true, showReticle: false, fullScreen: true });
aladin.setBaseImageLayer(aladin.newImageSurvey('P/SDSS9/g', {colormap: "eosb", stretch: "linear"}));
var simbad = A.catalog({name: 'Simbad', sourceSize: 16, color: '#4050F0'});
aladin.addCatalog(simbad);
simbad.addSources([A.marker(204.97010833333336, 0.8400166666666667, {popupTitle: 'NGC 5257', popupDesc: '<em>Object type:</em> HII galaxy<br/><em>Morphological type:</em> Sbc<br/><br/>More info <a href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=NGC+5257">in Simbad</a>'}), A.marker(204.9903125, 0.8309694444444445, {popupTitle: 'NGC 5258', popupDesc: '<em>Object type:</em> Galaxy in Pair of Galaxies <br/><em>Morphological type:</em> Sb<br/><br/>More info <a href="https://simbad.u-strasbg.fr/simbad/sim-id?Ident=NGC+5258">in Simbad</a>'})]);
var overlay = A.graphicOverlay({color: '#aa2222', lineWidth: 4});
overlay.addFootprints(A.polygon([[204.970214, 0.81206], [204.97110047, 0.80993368], [204.978723, 0.79165], [204.999152, 0.800162], [204.99482125, 0.81055582], [205.002941, 0.813851], [204.99986816, 0.82141125], [205.010312, 0.825578], [205.002112, 0.846123], [204.981546, 0.837916], [204.98157771, 0.83783654], [204.962977, 0.830202], [204.9703941, 0.81213504]]));
aladin.addOverlay(overlay);
overlay.addFootprints(A.polygon([[204.970214, 0.81206], [204.97110047, 0.80993368], [204.978723, 0.79165], [204.999152, 0.800162], [204.99482125, 0.81055582], [205.002941, 0.813851], [204.99986816, 0.82141125], [205.010312, 0.825578], [205.002112, 0.846123], [204.981546, 0.837916], [204.98157771, 0.83783654], [204.962977, 0.830202], [204.9703941, 0.81213504]]));
aladin.displayJPG('http://images.ipac.caltech.edu/esahubble/heic0810at/esahubble_heic0810at_1600.jpg');
});

View File

@@ -10,10 +10,11 @@
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, projection: "AIT", cooFrame: 'icrs', target: "stephan's quintet", fov: 1000, showGotoControl: false, showFrame: false, fullScreen: true, showLayersControl: true, showCooGrid: true, showCooGridControl: false});
let startFov = 1000;
aladin = A.aladin('#aladin-lite-div', {showSettingsControl: true, survey: "P/PanSTARRS/DR1/color-z-zg-g", showReticle: false, projection: "AIT", cooFrame: 'icrs', target: "stephan's quintet", fov: startFov, showGotoControl: false, showFrame: false, fullScreen: true, showLayersControl: true, showCooGridControl: false});
const chft = aladin.createImageSurvey('CFHT', "CFHT deep view of NGC7331 and Stephan's quintet u+g+r", "https://cds.unistra.fr/~derriere/PR_HiPS/2022_Duc/", null, null, {imgFormat: 'png'});
const nircamJWST = aladin.createImageSurvey('Nircam', "Stephans Quintet NIRCam+MIRI", "http://alasky.cds.unistra.fr/JWST/CDS_P_JWST_Stephans-Quintet_NIRCam+MIRI/", null, null, {imgFormat: 'png', colormap: "viridis"});
const nircamJWST = aladin.createImageSurvey('Nircam', "Stephans Quintet NIRCam+MIRI", "https://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");
@@ -21,7 +22,7 @@
aladin.getOverlayImageLayer("CFHT").toggle();
aladin.getOverlayImageLayer("Nircam").toggle();
let fov = 360;
let fov = startFov;
let rotation = 0;
setInterval(function zoom() {
@@ -29,7 +30,7 @@
fov *= 0.997;
rotation += 0.07;
aladin.setRotation(rotation)
aladin.setViewCenter2NorthPoleAngle(rotation)
aladin.setFoV(fov);
if (fov < 3 && fov > 0.5) {

View File

@@ -5,7 +5,8 @@
<body>
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
<script type="module">
import A from '../src/js/A.js';
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});
@@ -14,11 +15,12 @@ A.init.then(() => {
hscGreenSurvey.setColormap("green", { stretch: "asinh" });
hscGreenSurvey.setCuts(-0.2186, 5.30322);
const HSCRedSurvey = aladin.newImageSurvey('CDS/P/HSC/DR2/deep/r', {imgFormat: 'fits', colormap: "red", minCut: 0.34228, maxCut: 2.75785, additive: true, stretch: "asinh"});
const HSCBlueSurvey = aladin.newImageSurvey('CDS/P/HSC/DR2/deep/z', {imgFormat: 'fits', colormap: "blue", minCut: -0.01218, maxCut: 2.27397, additive: true, stretch: "asinh"});
const HSCRedSurvey = aladin.newImageSurvey('P/HSC/DR2/deep/r', {imgFormat: 'fits', colormap: "red", minCut: 0.34228, maxCut: 2.75785, additive: true, stretch: "asinh"});
const HSCBlueSurvey = aladin.newImageSurvey('P/HSC/DR2/deep/z', {imgFormat: 'fits', colormap: "blue", minCut: -0.01218, maxCut: 2.27397, additive: true, stretch: "asinh"});
HSCRedSurvey.setColormap('red', {stretch: 'linear'});
aladin.setOverlayImageLayer('CDS/P/HSC/DR2/deep/r', 'hsc red layer');
aladin.setOverlayImageLayer('CDS/P/HSC/DR2/deep/z', 'hsc blue layer');
aladin.setOverlayImageLayer('P/HSC/DR2/deep/r', 'hsc red layer');
aladin.setOverlayImageLayer('P/HSC/DR2/deep/z', 'hsc blue layer');
});
</script>
</body>

View File

@@ -11699,7 +11699,7 @@
aladin.addOverlay(overlay);
var polygons = [];
verticesArr.forEach(function(vertices) {
polygons.push(A.polygon(vertices, {color: '#808080', fillColor: '#808080', opacity: .4, lineWidth: 1, fill: true}))
polygons.push(A.polygon(vertices, {closed: true, color: '#808080', fillColor: '#808080', opacity: .4, lineWidth: 1, fill: true}))
});
overlay.addFootprints(polygons);
aladin.gotoRaDec(156.2162606, 63.8522344);

View File

@@ -195,13 +195,13 @@
async function s10() {
for await(const it of interval(50, 80)) {
aladin.setRotation(0.5 * it)
aladin.setViewCenter2NorthPoleAngle(0.5 * it)
}
}
let stephansNIRCamMIRI
async function s11() {
stephansNIRCamMIRI = aladin.createImageSurvey('CDS/P/JWST/Stephans-Quintet/NIRCam+MIRI', "stephansMIRI", null, null, null)
stephansNIRCamMIRI = aladin.createImageSurvey('CDS/P/JWST/Stephans-Quintet/NIRCam-MIRI', "stephansNircamMIRI", null, null, null)
stephansNIRCamMIRI.setOpacity(0.0)
aladin.setOverlayImageLayer(stephansNIRCamMIRI, 'stephansNIRCamMIRI')
@@ -264,7 +264,7 @@
for await(const it of interval(intervalMs, nbIt+1)) {
fov = fovStart / Math.pow(fovEnd/fovStart, -it/nbIt)
aladin.setFoV(fov)
aladin.setRotation(40 - 40 * it/nbIt)
aladin.setViewCenter2NorthPoleAngle(40 - 40 * it/nbIt)
}
aladin.setFoV(fovEnd)

View File

@@ -4,7 +4,7 @@
</head>
<body>
<div id="aladin-lite-div" style="width: 1024px; height: 100%;"></div>
<div id="aladin-lite-div" style="width: 1024px; height: 768px;"></div>
<script type="module">
import A from '../src/js/A.js';
@@ -13,12 +13,14 @@
var aladin = A.aladin(
'#aladin-lite-div',
{
survey: 'https://alasky.cds.unistra.fr/Pan-STARRS/DR1/color-z-zg-g/', // set initial image survey
survey: 'data/hips/wcs', // 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
fov: 80.0, // initial field of view in degrees
target: '96.5279427 -88.0037230', // initial target
cooFrame: 'galactic', // set galactic frame
showCooGrid: true, // set the grid,
fullScreen: true,
showSettingsControl: true,
}
);
});

View File

@@ -1,6 +1,7 @@
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, height=device-height, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
</head>
<body>
@@ -24,14 +25,21 @@
let pmraMean = null, pmdecMean = null;
const pmCat = A.catalogFromURL('./data/proper_motion.xml', {
const pmCat = A.catalogFromURL('./data/votable/proper_motion.xml', {
onClick: 'showTable',
name: 'mean pm over HPX cells around LMC from GaiaDR2',
hoverColor: 'yellow',
selectionColor: 'white',
// Footprint associated to sources
shape: (s) => {
// discard drawing a vector for big pm
let totalPmSquared = s.data.pmra*s.data.pmra + s.data.pmdec*s.data.pmdec;
if (totalPmSquared > 6) {
return;
}
let color = rainbowColorMap((totalPmSquared - 2.5) / 2)
// Compute the mean of pm over the catalog sources
if (!pmraMean || !pmdecMean) {
pmraMean = 0, pmdecMean = 0;
@@ -46,28 +54,15 @@
pmdecMean /= numSources
}
console.log("mean", pmraMean, pmdecMean)
let dra = +s.data.pmra - pmraMean;
let ddec = +s.data.pmdec - pmdecMean;
// discard drawing a vector for big pm
let totalPmSquared = s.data.pmra*s.data.pmra + s.data.pmdec*s.data.pmdec;
if (totalPmSquared > 6) {
return;
}
let color = rainbowColorMap((totalPmSquared - 2.5) / 2)
return A.vector(
s.ra,
s.dec,
s.ra + dra,
s.dec + ddec,
null,
{lineWidth: 3, color}
{color}
)
}
});

View File

@@ -9,14 +9,19 @@
let aladin;
A.init.then(() => {
aladin = A.aladin("#aladin-lite-div", {
target: "12 25 41.512 +12 48 47.2",
inertia: false,
fov: 1,
target: "03 36 31.65 -35 17 43.1",
survey: "CDS/P/DES-DR2/ColorIRG",
fov: 3 / 60,
fullScreen: true,
showContextMenu: true,
showZoomControl: true,
showSettingsControl: true,
showSimbadPointerControl: true,
samp: true,
});
// define custom draw function
var hips = A.catalogHiPS(
/*var hips = A.catalogHiPS(
"https://axel.u-strasbg.fr/HiPSCatService/Simbad",
{
onClick: "showTable",
@@ -24,17 +29,34 @@
color: "cyan",
hoverColor: "red",
shape: (s) => {
let galaxy = ["Seyfert","Seyfert_1", "Seyfert_2","LSB_G","PartofG","RadioG","Gin","GinPair","HII_G","LensedG","BClG","BlueCompG","EmG","GinCl","GinGroup","StarburstG","LINER","AGN","Galaxy"].some((n) => s.data.main_type.indexOf(n) >= 0);
if (!galaxy) return;
let a = +s.data.size_maj;
let b = +s.data.size_min;
let galaxy = ["Seyfert","Gin","StarburstG","LINER","AGN","Galaxy"].some((n) => s.data.main_type.indexOf(n) >= 0);
if (!galaxy) return;
let theta = +s.data.size_angle || 0.0;
return A.ellipse(s.ra, s.dec, a / 60, b / 60, theta, { color: "cyan" });
},
}
);
);*/
var hips = A.catalogHiPS(
"https://axel.cds.unistra.fr/HiPSCatService/II/371/des_dr2",
{
onClick: "showTable",
name: "Simbad",
color: "cyan",
hoverColor: "red",
shape: (s) => {
let a = +s.data['Aimg']/3600;
let b = +s.data['Bimg']/3600;
let theta = +s.data['PA'];
return A.ellipse(s.ra, s.dec, a, b, theta, { color: "cyan" });
},
}
)
aladin.addCatalog(hips);
});
</script>

View File

@@ -4,17 +4,17 @@
</head>
<body>
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
<div id="aladin-lite-div" style="width: 512px; height: 512px"></div>
<script type="module">
import A from '../src/js/A.js';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {survey: "P/PanSTARRS/DR1/color-z-zg-g", fov:1.5, target: "NGC 7318B"});
aladin = A.aladin('#aladin-lite-div', {samp: true, survey: "data/hips/PanSTARRS_DR1_color-z-zg-g", fov:2.0, target: "22 35 58.39 +33 57 57.8", showSettingsControl: true, log: false});
aladin.setProjection('AIT');
let cfht = aladin.createImageSurvey("CFHT", "CFHT MegaCam u+g+r", "https://cds.unistra.fr/~derriere/PR_HiPS/2022_Duc/", "equatorial", 10, {imgFormat: 'png'});
let jwst1 = aladin.createImageSurvey("CDS/P/JWST/Stephans-Quintet/NIRCam+MIRI", "JWST NIRCam+MIRI", "http://alasky.cds.unistra.fr/JWST/CDS_P_JWST_Stephans-Quintet_NIRCam+MIRI", null, null, {imgFormat: 'png'});
let jwst2 = aladin.createImageSurvey("JWST2", "JWST MIRI", "http://alasky.cds.unistra.fr/JWST/CDS_P_JWST_Stephans-Quintet_MIRI", "equatorial", 12, {imgFormat: 'png'});
let cfht = aladin.createImageSurvey("CFHT", "CFHT MegaCam u+g+r", "./data/hips/CFHT", "equatorial", 10, {imgFormat: 'png'});
let jwst1 = aladin.createImageSurvey("CDS/P/JWST/Stephans-Quintet/NIRCam+MIRI", "JWST NIRCam+MIRI", "data/hips/JWST_NIRCam_MIRI", null, null, {imgFormat: 'png'});
let jwst2 = aladin.createImageSurvey("JWST2", "JWST MIRI", "data/hips/JWST_MIRI", "equatorial", 12, {imgFormat: 'png'});
aladin.setOverlayImageLayer('CFHT', 'overlay_CFHT');
aladin.setOverlayImageLayer('CDS/P/JWST/Stephans-Quintet/NIRCam+MIRI', 'overlay_JWST1');
aladin.setOverlayImageLayer('JWST2', 'overlay_JWST2');

View File

@@ -0,0 +1,81 @@
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, height=device-height, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
</head>
<body>
<div id="aladin-lite-div" style="width: 1024px; height: 768px">
<div class="box-content" style="width:200px">
<div style="display:inline-flex">
<label for="cat-color">Color</label>
<input type="color" id="cat-color" value="#ff0000">
</div>
</div>
</div>
<script type="module">
import A from '../src/js/A.js';
let aladin;
A.init.then(() => {
var aladin = A.aladin(
'#aladin-lite-div',
{
fov: 1.5, // initial field of view in degrees
target: 'NGC 2175', // initial target
}
);
// Add a catalog
let cat = A.catalogFromSimbad('NGC 2175', 0.1, {onClick: 'showTable'});
aladin.addCatalog(cat);
// Logic for changing the color of catalog sources
let colorPicker = document.querySelector('#cat-color');
colorPicker.value = cat.color;
colorPicker.addEventListener('input', function (e) {
// Change the color of the catalog
cat.updateShape({color: this.value});
})
// Define the box
let catalogSettingsBox = A.box({
header: {
title: "Settings",
},
content: document.querySelectorAll('.box-content')[0],
});
catalogSettingsBox._hide();
// Define the button that toggles the box
let catalogSettingsBtn = A.button({
content: 'Catalog',
classList: ['catalogSettingsTogglerBtn'],
action(o) {
if (catalogSettingsBox.isHidden) {
catalogSettingsBox._show({
position: {
nextTo: catalogSettingsBtn,
direction: 'right',
}
})
} else {
catalogSettingsBox._hide()
}
}
});
aladin.addUI([catalogSettingsBtn, catalogSettingsBox])
});
</script>
<style>
.catalogSettingsTogglerBtn {
position: absolute;
top: 200px;
left: 0;
}
</style>
</body>
</html>

View File

@@ -23,6 +23,7 @@
<script src="https://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript">
let aladin;
let longitudeReversed = false;
</script>
<div id="aladin-lite-div" style="width:100vw;height:100vh;">
<div id="calibCircle" style="display: none;"></div>
@@ -37,8 +38,8 @@
<!-- 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>
<button id="hips-coronelli" class="pure-button" name="ref-hips" onclick="longitudeReversed = false; aladin.reverseLongitude(longitudeReversed)">Normal</button><br>
<button id="hips-illenoroc" class="pure-button" name="ref-hips" onclick="longitudeReversed = true; aladin.reverseLongitude(longitudeReversed)">Inversé</button>
<br><br>
<b>Constellations</b>
@@ -232,8 +233,7 @@
A.init.then(() => {
var hipsDir="http://alasky.u-strasbg.fr/CDS_P_Coronelli";
aladin = A.aladin("#aladin-lite-div", {showSimbadPointerControl: true, expandLayersControl: true, realFullscreen: true, fov: 100, allowFullZoomout: true, showReticle: false });
aladin.createImageSurvey('illenoroC', 'illenoroC', hipsDir, 'equatorial', 4, {imgFormat: 'jpg', longitudeReversed: false});
aladin.createImageSurvey('Coronelli', 'Coronelli', hipsDir, 'equatorial', 4, {imgFormat: 'jpg', longitudeReversed: true});
aladin.createImageSurvey('Coronelli', 'Coronelli', hipsDir, 'equatorial', 4, {imgFormat: 'jpg'});
aladin.setImageSurvey('Coronelli');
$('#layersControlLeft').show();

View File

@@ -1,7 +1,8 @@
<!doctype html>
<html>
<head>
</head>
<head>
<meta name="viewport" content="width=device-width, height=device-height, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
</head>
<body>
@@ -22,6 +23,7 @@
reticleColor: '#ff89ff', // change reticle color
reticleSize: 64, // change reticle size
showContextMenu: true,
fullScreen: true,
}
);
@@ -75,11 +77,7 @@
});
</script>
<style>
.aladin-stack-control {
position: absolute;
top: 10rem;
left: 10rem;
}
.myBox {
top: unset;
@@ -89,16 +87,12 @@
.myButton {
position: absolute;
bottom: 0;
bottom: 100px;
left: 0;
background-color: pink;
}
.aladin-cooFrame {
position: absolute;
top: 10rem;
}
</style>
</body>
</html>

View File

@@ -12,9 +12,11 @@
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {projection: 'AIT', cooFrame: 'galactic', fov: 200, target: 'galactic center'});
let dss = aladin.createImageSurvey("DSS blue band", "Color DSS blue HiPS", "http://alasky.cds.unistra.fr/DSS/DSS2-blue-XJ-S/", "equatorial", 9, {imgFormat: 'fits'})
aladin.setBaseImageLayer(dss);
aladin.getBaseImageLayer().setCuts(2, 10000);
dss.setCuts(2, 10000);
});
</script>

View File

@@ -5,29 +5,23 @@
</head>
<body>
<div id="aladin-lite-div" style="width:440px;height:300px"></div>
<div id="aladin-lite-div" style="width: 512px; height: 512px"></div>
<script type="module">
import A from '../src/js/A.js';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {cooFrame: "icrs", fullScreen: true});
aladin = A.aladin('#aladin-lite-div', {cooFrame: "icrs", log: false, backgroundColor: 'red'});
aladin.displayFITS(
//'https://fits.gsfc.nasa.gov/samples/FOCx38i0101t_c0f.fits', // url of the fits file
'data/fits/HorseHead.fits',
//'data/fits/neowise.fits',
//'data/fits/irac.fits',
//'data/fits/FOCx38i0101t_c0f.fits',
'data/fits/panstarrs-g-m61.fits',
{
minCut: 5000,
maxCut: 17000,
name: 'm61',
colormap: 'viridis'
}, // no optional params
(ra, dec, fov, image) => {
(ra, dec, fov, _) => {
// ra, dec and fov are centered around the fits image
image.setColormap("magma", {stretch: "asinh"});
aladin.gotoRaDec(ra, dec);
aladin.setFoV(fov);
},

View File

@@ -42,7 +42,7 @@ Image Opacity: <br/> <input id="slider" type="range" value=1 min=0 max=1 step=0.
'https://noirlab.edu/public/media/archives/images/large/noirlab1912a.jpg',
// no options
{
transparency: 0.6,
transparency: 1.0,
},
// A callback fn once the overlay is set
callback

19
examples/al-disto.html Normal file
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';
var aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {showContextMenu: true, survey: 'https://alasky.cds.unistra.fr/Pan-STARRS/DR1/color-i-r-g/', fov: 0.00833333333, target: '270.334079 66.730469'});
aladin.showHealpixGrid(true)
});
</script>
</body>
</html>

View File

@@ -20,6 +20,7 @@
showSettingsControl: true,
showStackLayerControl: true,
samp: true,
showCooGrid: true,
});
aladin.addCatalog(A.catalogFromSimbad('M 82', 0.1, {onClick: 'showTable'}));

View File

@@ -21,12 +21,11 @@ var pessto = 'https://archive.eso.org/tap_cat/sync?REQUEST=doQuery&LANG=ADQL&MAX
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {survey: 'https://alasky.cds.unistra.fr/DSS/DSSColor/', target: 'LMC', fov: 5, showContextMenu: true});
aladin = A.aladin('#aladin-lite-div', {survey: 'https://alasky.cds.unistra.fr/DSS/DSSColor/', target: 'LMC', fov: 5, showContextMenu: true, showSettingsControl:true, samp:true});
aladin.addCatalog(A.catalogFromURL('https://vizier.u-strasbg.fr/viz-bin/votable?-source=HIP2&-c=LMC&-out.add=_RAJ,_DEJ&-oc.form=dm&-out.meta=DhuL&-out.max=9999&-c.rm=180', {sourceSize:12, color: '#f08080'}));
aladin.addCatalog(A.catalogFromURL(vmc_cepheids, {onClick: 'showTable', sourceSize:14, color: '#fff080'}));
@@ -35,7 +34,7 @@ A.init.then(() => {
console.log(objs, "are selected");
})
aladin.select();
aladin.select('circle');
});
</script>

View File

@@ -19,11 +19,11 @@
overlay.addFootprints([
A.polygon([[83.64287, 22.01713], [83.59872, 22.01692], [83.59852, 21.97629], [83.64295, 21.97629]]),
A.polygon([[83.62807, 22.06330], [83.58397, 22.02280], [83.62792, 22.02258]]),
A.ellipse(10.6833, 41.2669, 3.33333/2, 1.1798333/2, 35, {color: 'cyan'}),
A.ellipse(10.6833, 41.2669, 3.33333/2, 1.1798333/2, 10, {color: 'cyan'}),
// NGC 3048
A.ellipse(180.470842, -18.867589, 5.2/120, 3.1/120, 80, {color: 'cyan'}),
A.ellipse(180.470842, -18.867589, 5.2/120, 3.1/120, 10, {color: 'cyan'}),
// NGC 3049
A.ellipse(180.4742, -18.8850, 3.1/120, 1.6/120, 50, {color: 'cyan'}),
A.ellipse(180.4742, -18.8850, 3.1/120, 1.6/120, 10, {color: 'cyan'}),
]);
//overlay.add(); // radius in degrees
});

View File

@@ -0,0 +1,38 @@
<!doctype html>
<html>
<head>
</head>
<body>
<div id="aladin-lite-div" style="width: 500px; height: 400px"></div>
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css">
<script type="module">
import A from '../src/js/A.js';
var aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {survey: 'https://alasky.cds.unistra.fr/DSS/DSSColor/', target: 'm1', fov: 5, showContextMenu: true, showSettingsControl:true, samp:true});
var customImg = new Image();
customImg.onload = function() {
const cat = A.catalogFromVizieR('II/246/out', 'm1', 0.1, {onClick: 'showTable', hoverColor: 'purple', limit: 1000, colnames: ["errMin", "errMaj", "errPA"], shape: (s) => {
if (+s.data['Jmag'] > 15) {
return;
} else {
let a = +s.data['errMaj']/36;
let b = +s.data['errMin']/36;
let theta = +s.data['errPA'];
return A.ellipse(s.ra, s.dec, a, b, theta, {fillColor: 'rgba(255, 0, 255, 0.2)', drawAxes: true})
}
}});
aladin.addCatalog(cat);
};
customImg.src = 'https://aladin.u-strasbg.fr/AladinLite/doc/API/examples/img/star.png';
});
</script>
</body>
</html>

View File

@@ -4,19 +4,23 @@
</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});
var aladin = A.aladin('#aladin-lite-div', {showContextMenu: true, target: '05 37 58 +08 17 35', fov: 12, backgroundColor: 'rgb(120, 0, 0)'});
var cat = A.catalog({sourceSize: 20, onClick: (s) => {console.log("kjk", s)}});
aladin.addCatalog(cat);
cat.addSources([A.source(83.784490, 9.934156, {name: 'Meissa'}), A.source(88.792939, 7.407064, {name: 'Betelgeuse'}), A.source(81.282764, 6.349703, {name: 'Bellatrix'})]);
var msg;
// define function triggered when a source is hovered
aladin.on('click', function(e) {
console.log(e)
});
let infoDiv = document.querySelector("#infoDiv");
aladin.on('objectHovered', function(object, xyMouseCoords) {
if (object) {
msg = 'You hovered object ' + object.data.name + ' located at ' + object.ra + ', ' + object.dec + '; mouse coords - x: '
@@ -25,7 +29,7 @@
else {
msg = 'No object hovered';
}
$('#infoDiv').html(msg);
infoDiv.innerText = msg;
});
aladin.on('objectHoveredStop', function(object, xyMouseCoords) {
@@ -33,7 +37,7 @@
msg = 'You stopped hove object ' + object.data.name + ' located at ' + object.ra + ', ' + object.dec + '; mouse coords - x: '
+ xyMouseCoords.x + ', y: ' + xyMouseCoords.y;
}
$('#infoDiv').html(msg);
infoDiv.innerText = msg;
});
// define function triggered when an object is clicked
@@ -49,8 +53,26 @@
objClicked.deselect();
msg = 'You clicked in void';
}
$('#infoDiv').html(msg);
infoDiv.innerText = msg;
});
aladin.on('resizeChanged', function() {
console.log("resize")
});
aladin.on('projectionChanged', function(proj) {
console.log(proj)
});
aladin.on('positionChanged', function(pos) {
console.log(pos)
});
aladin.on('layerChanged', function(imageLayer, layer, state){
console.log(imageLayer, layer, state)
});
cat.sources[0].actionClicked();
});
</script>
</body>

View File

@@ -0,0 +1,23 @@
<!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', {longitudeReversed: true, showCooGrid: true, cooFrame: 'galactic', target: '0 0', fov: 100});
//aladin.reverseLongitude(true)
setTimeout(
() => {
aladin.reverseLongitude(false)
},
5000
)
});
</script>
</body>
</html>

View File

@@ -11,8 +11,8 @@
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 = A.aladin('#aladin-lite-div', {target: 'M 1', fov: 0.2, showContextMenu: true, fullScreen: true});
var overlay = A.graphicOverlay({color: '#ee2345', lineWidth: 3, lineDash: [2, 2]});
aladin.addOverlay(overlay);
overlay.addFootprints([
A.polygon([[83.64287, 22.01713], [83.59872, 22.01692], [83.59852, 21.97629], [83.64295, 21.97629]], {hoverColor: 'green'}),
@@ -20,7 +20,8 @@
A.polygon([[8.62807, 220.06330], [83.58397, 10.02280], [150.62792, 87.02258]])
]);
overlay.add(A.circle(83.66067, 22.03081, 0.04, {color: 'cyan'})); // radius in degrees
overlay.add(A.vector(83.66067, 22.03081, 0.04, {color: 'cyan'})); // radius in degrees
aladin.on("footprintClicked", (footprint, xyMouseCoords) => {
console.log("footprint clicked catched: ", footprint, "mouse coords xy: ", xyMouseCoords.x, xyMouseCoords.y);
})
@@ -34,8 +35,8 @@
console.log("Object hovered stopped: ", object, "mouse coords xy: ", xyMouseCoords.x, xyMouseCoords.y);
})
const cat = A.catalogFromVizieR('B/assocdata/obscore', 'M 1', 10, {onClick: 'showTable', hoverColor: 'purple', limit: 10000});
aladin.addCatalog(cat);
//const cat = A.catalogFromVizieR('B/assocdata/obscore', 'M 1', 10, {onClick: 'showTable', selectionColor: "orange", hoverColor: 'red', limit: 10000});
//aladin.addCatalog(cat);
});
</script>
</body>

View File

@@ -15,7 +15,7 @@
{
survey: 'P/allWISE/color', // set initial image survey
projection: 'AIT', // set a projection
fov: 1.5, // initial field of view in degrees
fov: 0.1, // initial field of view in degrees
target: 'NGC 2175', // initial target
cooFrame: 'galactic', // set galactic frame
reticleColor: '#00ff00', // change reticle color

View File

@@ -5,16 +5,16 @@
<body>
<div>
<div id="offset" style="display: inline-block; width: 200px; height: 100px"></div>
<div id="aladin-lite-div" style="display: inline-block; width: 50%"></div>
<div id="aladin-lite-div" style="width: 500px; height: 500px"></div>
</div>
<!--<script type="text/javascript" src="https://aladin.cds.unistra.fr/AladinLite/api/v3/latest/aladin.js" charset="utf-8"></script>-->
<script>let aladin, hips</script>
<script type="module">
import A from '../src/js/A.js';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {projection: 'TAN', cooFrame: 'galactic', showSettingsControl: true, showSimbadPointerControl: true, showContextMenu: true, target: 'galactic center', survey: 'P/Finkbeiner'});
aladin = A.aladin('#aladin-lite-div', {projection: 'TAN', cooFrame: 'galactic', showSettingsControl: true, showSimbadPointerControl: true, showContextMenu: true, target: 'galactic center'});
// possible values are 'blues', 'cividis', 'cubehelix', 'eosb', 'grayscale', 'inferno', 'magma', 'native', 'parula', 'plasma', 'rainbow',
// 'rdbu', 'rdylbu', 'redtemperature', 'sinebow', 'spectral', 'summer', 'viridis', 'ylgnbu' and 'ylorbr'

View File

@@ -1,6 +1,8 @@
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=no">
</head>
<body>
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
@@ -10,12 +12,12 @@
import A from '../src/js/A.js';
//let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {showReticle: true, showSurveyStackControl: true, showOverlayStackControl: false, projection: "TAN", target: '15 16 57.636 -60 55 7.49', showProjectionControl: true, realFullscreen: true, showZoomControl: true, showSimbadPointerControl: true, showShareControl: true, showContextMenu: true, showCooGridControl: true, fullScreen: true, showCooGrid: true, fov: 90});
var moc_0_99 = A.MOCFromURL("./data//gw/gw_0.9.fits",{ name: "GW 90%", color: "#ff0000", opacity: 0.0, lineWidth: 3, fill: false, perimeter: true});
var moc_0_95 = A.MOCFromURL("./data/gw/gw_0.6.fits",{ name: "GW 60%", color: "#00ff00", opacity: 0.5, lineWidth: 3, fill: true, perimeter: true});
var moc_0_5 = A.MOCFromURL("./data/gw/gw_0.3.fits",{ name: "GW 30%", color: "#00ffff", opacity: 0.5, lineWidth: 3, fill: true, perimeter: true});
var moc_0_2 = A.MOCFromURL("./data/gw/gw_0.1.fits",{ name: "GW 10%", color: "#ff00ff", opacity: 0.5, lineWidth: 3, fill: true, perimeter: true});
aladin = A.aladin('#aladin-lite-div', {survey: "data/hips/CDS_P_DSS2_color", showReticle: true, showSurveyStackControl: true, showOverlayStackControl: false, projection: "TAN", target: '15 16 57.636 -60 55 7.49', showProjectionControl: true, realFullscreen: true, showZoomControl: true, showSimbadPointerControl: true, showShareControl: true, showContextMenu: true, showCooGridControl: true, fullScreen: true, showCooGrid: true, fov: 180, log: false});
var moc_0_99 = A.MOCFromURL("./data/gw/gw_0.9.fits",{ name: "GW 90%", color: "#ff0000", opacity: 0.7, lineWidth: 10, fill: false, perimeter: true});
var moc_0_95 = A.MOCFromURL("./data/gw/gw_0.6.fits",{ name: "GW 60%", color: "#00ff00", opacity: 0.3, lineWidth: 3, fill: false, perimeter: true});
var moc_0_5 = A.MOCFromURL("./data/gw/gw_0.3.fits",{ name: "GW 30%", color: "#00ffff", opacity: 0.2, lineWidth: 3, fill: true, perimeter: true});
var moc_0_2 = A.MOCFromURL("./data/gw/gw_0.1.fits",{ name: "GW 10%", color: "#ff00ff", opacity: 0.1, lineWidth: 3});
aladin.addMOC(moc_0_99);
aladin.addMOC(moc_0_95);

View File

@@ -0,0 +1,52 @@
<!doctype html>
<html>
<head>
</head>
<body>
<div id="aladin-lite-div" style="width: 768px; height: 512px"></div>
<script>let aladin; let hips;</script>
<script type="module">
import A from '../src/js/A.js';
A.init.then(() => {
aladin = A.aladin(
'#aladin-lite-div',
{
showSimbadPointerControl: true,
projection: 'AIT', // set a projection
fov: 360, // initial field of view in degrees
target: '169.58868 +45.74914', // initial target
cooFrame: 'icrs', // set galactic frame
reticleColor: '#ff89ff', // change reticle color
reticleSize: 64, // change reticle size
showContextMenu: true,
showFrame: true,
showZoomControl:true,
showSettingsControl:true,
showCooGrid: true,
fullScreen: true,
samp: true,
}
);
hips = aladin.newImageSurvey("https://alasky.cds.unistra.fr/GALFAHI/GALFAHI-Narrow-DR2/");
aladin.setImageLayer(hips)
/*let id;
aladin.on("zoomChanged", () => {
if (id)
clearTimeout(id);
id = setTimeout(() => {
console.log("wheel stopped, new cone search here")
}, 500);
})*/
});
</script>
<style>
.aladin-cat-browser-box {
width: 600px;
}
</style>
</body>
</html>

View File

@@ -4,16 +4,14 @@
</head>
<body>
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
<div id="aladin-lite-div" style="width: 512px; height: 512px"></div>
<script type="module">
import A from '../src/js/A.js';
let aladin;
A.init.then(() => {
aladin = A.aladin('#aladin-lite-div', {target: 'galactic center'});
let survey = aladin.createImageSurvey('hips gaia', "hips gaia name", "data/hips/gaia", undefined, undefined, {colormap:"viridis"});
aladin.setBaseImageLayer(survey);
aladin = A.aladin('#aladin-lite-div', {survey: "data/hips/CDS_P_DSS2_color", target: "05 40 59.12 -02 27 04.1", fov: 2, log: false});
});
</script>

View File

@@ -10,7 +10,7 @@
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/', showProjectionControl: true, showContextMenu: true, showStatusBar: true, fullScreen: true, target: 'galactic center'});
aladin = A.aladin('#aladin-lite-div', {survey: 'http://alasky.cds.unistra.fr/ancillary/GaiaDR2/hips-density-map/', showProjectionControl: true, showContextMenu: true, showStatusBar: true, fullScreen: true, target: 'galactic center', expandLayersControl: true});
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, {formats: ['fits']});

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';
A.init.then(() => {
let aladin = A.aladin('#aladin-lite-div', {fov: 30, target: "280 +0", projection: "AIT", showShareControl:true, showSettingsControl: true, showContextMenu:true});
aladin.setOverlayImageLayer(A.image(
"https://www.virtualastronomy.org/files/avm_examples/spitzer/ssc2005-24a1.jpg",
{
name: "spitzer-ssc2005-24a1",
successCallback: (ra, dec, fov, image) => {
console.log(ra, dec)
aladin.gotoRaDec(ra, dec);
aladin.setFoV(fov * 5)
}
},
));
});
</script>
</body>
</html>

View File

@@ -0,0 +1,46 @@
<!doctype html>
<html>
<head>
</head>
<body>
<div id="aladin-lite-div" style="width: 1024px; height: 768px"></div>
<script type="module">
import A from '../src/js/A.js';
A.init.then(() => {
let aladin = A.aladin('#aladin-lite-div', {fov: 30, survey: "CDS/P/GALEXGR6/AIS/FUV", target: "280 +0", projection: "AIT", showShareControl:true, showSettingsControl: true, showContextMenu:true});
aladin.setOverlayImageLayer(A.image(
"https://nova.astrometry.net/image/25038473?filename=M61.jpg",
{
name: "M61",
wcs: {
NAXIS: 0, // Minimal header
CTYPE1: 'RA---TAN', // TAN (gnomic) projection
CTYPE2: 'DEC--TAN', // TAN (gnomic) projection
EQUINOX: 2000.0, // Equatorial coordinates definition (yr)
LONPOLE: 180.0, // no comment
LATPOLE: 0.0, // no comment
CRVAL1: 185.445488837, // RA of reference point
CRVAL2: 4.47896032431, // DEC of reference point
CRPIX1: 588.995094299, // X reference pixel
CRPIX2: 308.307905197, // Y reference pixel
CUNIT1: 'deg', // X pixel scale units
CUNIT2: 'deg', // Y pixel scale units
CD1_1: -0.000223666022989, // Transformation matrix
CD1_2: -0.000296578064584, // no comment
CD2_1: -0.000296427555509, // no comment
CD2_2: 0.000223774308964, // no comment
NAXIS1: 1080, // Image width, in pixels.
NAXIS2: 705 // Image height, in pixels.
},
successCallback: (ra, dec, fov, image) => {
aladin.gotoRaDec(ra, dec);
aladin.setFoV(fov * 5)
}
},
));
});
</script>
</body>
</html>

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