Open astrofrog opened 3 years ago
Since we actually store the config, probably not hard to only run this if certain viz is loaded:
I don't think we want to have it live on the main class and optionally select it based on the configuration - after all that is what the subclasses are for - so it could live on the relevant applications. I don't think the default application should do any auto linking.
I see people calling Application(configuration)
in their notebooks. I don't think subclass will work.
Ah I see - then yes maybe there should be an option for this, but in any case the way the function is written is prone to breakage so needs to be improved to more explicitly link spectral coordinates. I am writing up an issue about improving linking across the board, I will touch on that function in there.
xref #804
The following code in Application:
https://github.com/spacetelescope/jdaviz/blob/d296c6312b020897034e9dd1fc58c84a2559efa5/jdaviz/app.py#L241-L260
is actually wrong for some applications such as MOSViz. It will link the first world coordinates of all datasets, regardless of whether the data are images or spectra and so on. This means that some links will end up being Declination and Spectral axis and so on.
I think this code made sense for e.g. specviz and probably cubeviz but it is too specific to live in the main Application (and is incorrect for some applications)