cds-astro / aladin-lite Goto Github PK
View Code? Open in Web Editor NEWAn astronomical HiPS visualizer in the browser
Home Page: https://aladin.cds.unistra.fr/AladinLite/
License: GNU General Public License v3.0
An astronomical HiPS visualizer in the browser
Home Page: https://aladin.cds.unistra.fr/AladinLite/
License: GNU General Public License v3.0
Many TAP services now output base64 VOTable serialization
Aladin Lite currently only supports TABLEDATA serialization
Using votable.js for the parsing the could fix this
Hi, I have a feature request. I think it would be nice to have the package available in an npm registry (could be npm, github, whatever) so it is easier to install and manage in our applications.
Thanks in advance.
Initial idea by @ggreco77
Implementation could be done mimicking the one in Aladin Desktop or drawing inspiration from MOCPy border function
Rationale: currently, customizing the toolbar with new icons, or changing the order of current icons is cumbersome. Having a Toolbar object with methods to add/remove icons linked to specific actions would help.
Aladin Lite should make use of HiPS mirrors , and choose the fastest one from the point of view of the user.
Hi to the maintainers of this repo. 👋
One thing I have been thinking of implementing for a while is a re-write of Aladin lite in Typescript, which can be embedded from either a CDN or imported as import Aladdin from 'aladdin'
or similar.
Would this be something of merit to the maintainability of the project?
It would be extremely useful to have the ability to rotate and flip the view field. Rotation by an arbitrary amount and flipping of the field would allow an observer to exactly match the orientation of the field to that of and telescope orientation. In the case of finding objects, this would prove very useful.
A poorly executed working 'hack' of this can be viewed here: http://asteroid.lowell.edu/astfinder/ . However, when rotating and flipping the field, the frame of reference becomes out of sync. For example, after a few rotations, click-dragging doesn't behave as expected.
For references, this was the basic addition I attempted to get the rotation (poorly) working:
View.prototype.applyRotation = function (direction, angle) {
// get the image catalog canvas context
var img_context = this.imageCtx,
ctlg_context = this.catalogCtx;
// translate the context to the center of the canvas
img_context.translate(this.width / 2., this.height / 2.);
// rotate the image canvas (needs to be radians)
img_context.rotate(direction * angle * Math.PI / 180.);
// translate the context back to origin (else corner of layer gets drawn at center)
img_context.translate(-this.width / 2., -this.height / 2.);
// same for catalog
ctlg_context.translate(this.width / 2., this.height / 2.);
// rotate the image canvas (needs to be radians)
ctlg_context.rotate(direction * angle * Math.PI / 180.);
// translate the context back to origin (else corner of layer gets drawn at center)
ctlg_context.translate(-this.width / 2., -this.height / 2.);
this.forceRedraw();
this.requestRedraw();
};```
I am using the function A.catalogFromURL
to load a catalog from tapvizier. I am using the following query to obtain the coordinates corrected by proper motion:
SELECT TOP 1000000
(ra_epoch2000 + pmra*(-5.551753e-7)) as ra,
(dec_epoch2000 + pmdec*(-5.551753e-7)) as dec,
pmra/1000 as pmRa, pmdec/1000 as pmDec,
ra_epoch2000 as raj2000,
dec_epoch2000 as decj2000,
phot_g_mean_mag as mag
FROM "I/345/gaia2" WHERE CONTAINS(POINT('ICRS', ra, dec), CIRCLE('ICRS', 180.52643034974523, 15.34492408258429, 0.18333333333333332)) = 1 AND phot_g_mean_mag*1.0 BETWEEN 0 AND 30 ORDER BY mag ASC
The problem is that in GAIA the proper motion is null for some sources, and they are not displayed by aladin.
Unfortunately ADQL does not allow me to interpret that null as 0, as far as I know.
I tried to define a callback that goes through the sources and modifies those fields, but the sources are not displayed: I guess the callback is invoked after the sources have been drawn?
Is there a way to tell aladin to read the data from the other columns if the main ones are empty?
I think this is a known bug, but I couldn't find an open issue for it.
When you draw a polygon and then zoom in on one of the sides, the side disappear as soon as the vertices are not in the field of view.
This is particularly a problem when the polygon represents a long slit, and you would like to zoom in in the center to make sure that your target is in the slit.
When the base URL is given with a final slash, AL makes calls with duplicate slashes, leading to unnecessary 301 round-trips!
When displaying HIPS made of sparse observations and with low brightness or low featured fields, it is very difficult to distinguish the areas covered by observations from the gaps in between observations.
The picture below illustrates that issue with the XMM color survey in the neighborhood of Cygnus X-1
The screenshot below shows the same area displayed with Aladin Desktop.
The use of a non-black gap color dramatically enhances the readability of the display.
Could this method be applied to Aladin Lite?
Allow (in the API and the UI) access to the HiPS2FITS (https://alasky.u-strasbg.fr/hips-image-services/hips2fits ) service to retrieve a cutout of the current view, with options to choose dimensions, resolution, etc.
In HpxImageSurvey.js (v3), line 520, HTTPS_WHITELIIST should be HTTPS_WHITELIST.
See the JS console log "Uncaught (in promise) TypeError: D.HTTPS_WHITELIIST is undefined".
It would be nice to add a filter function option for regular catalogues and HiPS catalogues, as to allow for filtering based on catalogue content for instance (I want to display only spiral galaxies or I want to display stars fainter than magB=15)
a quite popular request !
Source class should have a remove() method
This behaviour can be seen in the example at https://aladin.u-strasbg.fr/AladinLite/doc/API/examples/polyline/ where the line appears white instead of the specified #ee2345. The cause is this line, where I think that "white"
should be undefined
:
aladin-lite/src/js/Polyline.js
Line 40 in 64fcc77
If the initial viewport location (resp. zoom level) has not been changed yet, we should use values of hips_initial_ra|dec (resp. fov) to set location (resp. fov) at HiPS loading time.
Hi,
I'm really happy that you are making the code available on GitHub. It is a great project and more documentation will make it easier for casual users such as me to make websites with it.
I am using Aladin Lite to show HiPS catalogues and am getting an effect where when I zoom in. Objects appear to flash on and off then disappear. I thought this might be to do with how I was making the HiPS (with hipsgen-cat.jar) but I think I can see a similar effect for the GAIA-DR2 release.
Example can be seen zooming into a region with dense objects here:
http://hedam.lam.fr/HELP/dataproducts/dmu31/dmu31_HiPS/data/help_dr1_alist/
Also other strange effects like clicking on an object makes objects disappear. The webpage is getting a lot of 404 errors for tsv files that aren't there. Perhaps it looks for all tiles and they are missing if there are no objects in the tile?
Otherwise, great work with this, it is excellent to have an easy to use tool for displaying your images and catalogues.
The full project I am working on is here for reference:
http://hedam.lam.fr/HELP/dataproducts/dmu31/dmu31_HiPS/viewer/
Many thanks,
Raphael.
UPDATE: This behaviour seems to happen in Chrome but not Firefox.
Currently, we can only define source size in pixels. There are some use cases where one might want to give an angular size in degrees or arcmin
By reading the Moc.fits file associated to a HiPS, Aladin Lite will be able to avoid trying to retrieve tiles in regions not covered by the HiPS.
Add method A.catalogFromTAPQuery(serviceEndpoint, adqlQuery)
The behavior can be observed in this fiddle:
https://jsfiddle.net/hpawoe3f/
Steps to reproduce:
var aladin = A.aladin('#aladin-lite-div', {fov:1, target: 'M81'});
setInterval(function() {
var fov = aladin.getFov();
console.log(fov);
aladin.setFov(fov[1]);
}, 500)
In the browser console (but also in the FoV label in Aladin window) one can notice the fov values keep descreasing.
It is currently possible to change the default shape of an A.source....but not for an A.marker (currently always a disk).
I'm building out a new front-end Vuejs project and would like to incorporate a custom version of AladinLite into it. I tried building a custom version of the source code and adding it into my project, but ran into problems since the source code bundle and the master
branch still depend on jquery and are "script-based" javacsript files, rather than importable modules. I noticed there's an active develop
branch focused for the new AladinLite 3.0, with many improvements, one of which seems to be a switch to importable modules with no jquery dependency. So I'm wondering if y'all have any recommended development workflows? How robust is this branch currently for others to develop off of, and/or how close is this branch being merged back into master
? Is the develop
branch the recommended one to use for customizing AladinLite and integrating into newer front-ends built from React or Vue? Or do you still recommend embedding AladinLite manually into html via a script
tag?
This could be done globally, or on a per catalog basis.
Support the drawing of footprints as they get returned in s_region columns of VOTables.
NED cone search service is slow for medium radius. The TAP service ( https://ned.ipac.caltech.edu/Documents/Guides/Interface/TAP ) looks quite faster. Maybe the internal of catalogFromNED should switch to this instead of querying the CS service.
This applies when a limit has been set.
Current behaviour is to sort by decreasing number of references. This behaviour should be kept as the default.
A cone search special mode should be implemented in the core of aladin lite.
People would call a method from the aladin lite javascript API to enter this mode. For the moment, I would see something like:
aladin.enterConeSearchMode((center, radius) => {
// callback function executed when leaving the cone search mode.
})
When the user is in the cone search mode, aladin lite could wait for:
The user should be able to move around the sphere during the cone search mode. He may do it with the middle mouse button pressed while dragging (or something else).
A little tooltip should appear to tell the user he is in the cone search mode and what he should do to define a cone. It should be possible I think for the user to erase its cone by redefining a new one before leaving the cone search mode (and even quit the mode without defining a cone).
Currently, Aladin Lite does not use Norder 0, 1 and 2 that are created for recent HiPS.
Using them would improve the user experience, preventing the gap in resolution we observe now between Allsky tiles and Norder3 tiles.
When multiple catalogs are overlaid on an image, if the same source is present in multiple catalogs, then the symbols (understandably) are overlaid on top of each other. If one wants to see the properties of a source in a given catalog, clicking on the symbol activates the pop-up for the topmost symbol, but it's hard to see the properties / pop-up for the catalogs that aren't on top. You can work around this to some extent by turning off one catalog or the other, but it would be nice if there was a way to set the z-axis ordering of overlaid catalogs, if one should be prioritized over the others.
This might already exist, but I couldn't find it. Is there any way to do this, or any clever way to activate either pop-up for two overlaid symbols, without turning one catalog off?
A related technical question: is the clickable area set by the bounding box of the symbol, or by the colored pixels of the symbol itself? For example, for an "x" marker, can you click anywhere in the square defined by the corners of the x?
Under some race conditions, some tiles may not be loaded or not be visible.
The resulting view is something like this:
This JSBIN shows the problem:
https://jsbin.com/habarud/edit?html,output
(you might have to disable your browser cache to reproduce the issue)
cc @lmichel
Hello,
first of all thanks a lot for making this amazing tool, among many others provided by CDS!
We'd like to include it in our project, but I found that one feature which is important for us does not seem to be available in the Aladin Light: the possibility to change the scale of the image in the interface. Surely it is possible to adjust the image before convering it to hips, but it's not interactive.
Is it really missing or I just did not find it?
I met Giuseppe Greco on Multi-Messenger ASTERICS conference and he told me that it could be possible to write a plugin to implement such a functionality. I'd be happy to try myself, if I knew were to start.
Best Regards
Volodymyr SAVCHENKO
There is a very nice feature in V3 which is the possibility of having a specific background color applied to the regions not covered by the HiPS.
This allows to make the distinction between an area covered by the HiPS but without any visible feature and an area not covered by it.
It is also possible to choose that color.
This dramatically enhances the readability of pointed surveys such as XMM.
The issue is that the default color set by AL is black which masks the advantage of that colored background until the user find out the menu to change it.
My suggestion would be to use a default color contrasting with usual sky backgrounds, e.g. aqua blue.
Currently, onClick: showPopup will auto-generate the popup content from the catalogue content. Having an option to pass a function to customize this would be great.
If the projection is not SIN, there is a wrong display of polyline and polygon when points are located at different sides of the celestial sphere.
the example code:
var overlay = A.graphicOverlay({color: '#ee2345', lineWidth: 3});
aladin.addOverlay(overlay);
overlay.addFootprints([A.polygon([ [75.09706569902252, 28.254025356561616],[85.65058303267622, 29.095894440421656],[85.04345555479651, 38.3910524704836],[73.31926048625968, 37.399614744176404],[75.09706569902252, 28.254025356561616]])]);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.