darioflute / sospex Goto Github PK
View Code? Open in Web Editor NEWSOFIA SPectral EXplorer (GUI to explore spectral cubes obtained with FIFI-LS, PACS, and GREAT)
License: GNU General Public License v3.0
SOFIA SPectral EXplorer (GUI to explore spectral cubes obtained with FIFI-LS, PACS, and GREAT)
License: GNU General Public License v3.0
Currently a mask tool doesn't work for uncorrected flux (unflux) cube.
After downloading an image from science archives, the program emits a series of
errors when displaying it. This is the traceback:
Traceback (most recent call last):
File "/Users/dfadda/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 155, in __draw_idle_agg
self.draw()
File "/Users/dfadda/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_qt5agg.py", line 127, in draw
super(FigureCanvasQTAggBase, self).draw()
File "/Users/dfadda/anaconda3/lib/python3.6/site-packages/matplotlib/backends/backend_agg.py", line 430, in draw
self.figure.draw(self.renderer)
File "/Users/dfadda/anaconda3/lib/python3.6/site-packages/matplotlib/artist.py", line 55, in draw_wrapper
return draw(artist, renderer, *args, **kwargs)
File "/Users/dfadda/anaconda3/lib/python3.6/site-packages/matplotlib/figure.py", line 1299, in draw
renderer, self, artists, self.suppressComposite)
File "/Users/dfadda/anaconda3/lib/python3.6/site-packages/matplotlib/image.py", line 138, in _draw_list_compositing_images
a.draw(renderer)
File "/Users/dfadda/anaconda3/lib/python3.6/site-packages/astropy/visualization/wcsaxes/core.py", line 322, in draw
self.apply_aspect()
File "/Users/dfadda/anaconda3/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 1430, in apply_aspect
pb1 = pb.shrunk_to_aspect(box_aspect, pb, fig_aspect)
File "/Users/dfadda/anaconda3/lib/python3.6/site-packages/matplotlib/transforms.py", line 604, in shrunk_to_aspect
raise ValueError("'box_aspect' and 'fig_aspect' must be positive")
ValueError: 'box_aspect' and 'fig_aspect' must be positive
The issue does not exist in Ubuntu Linux.
Would be nice to have a spatial scale bar on the image (left) panel -- or spatial axes. Either way, something that gives the user a visual gauge for the FOV.
Otherwise everything goes slow and flickers if you catch a label when marking the region
Currently necessary to move around the cube putting fingers on the screen to mark where the edges of the spectrum get to! Possibly default to using region between the two continuum regions as the line region where the moment should be calculated?
Here I put the requests which can be implemented when you have a chance.
Change unit to seconds.
After defining an aperture, it is useful to save the aperture to use it on another cube
and eventually make comparisons or ratios.
The y axis on the spectral plot should dynamically adjust to the min and max of
the data as you move the mouse across the image.
After switching the x axis to frequency, the automatic rescaling of the y-axis does not work anymore.
It seems you’ve removed one of the most useful features of SOSPEX: I want to be
able to step through a cube, one wavelength at a time. I used to be
able to do that, but now I can’t see how. Please restore that feature!
Aligning with the centre would be more intuitive
Add an option to mask parts out of a polygon
The markers for a line seem to disappear if you re-size the spectral plot. Like
the y axis, those marker lines should re-size automatically so you can see them
as you move the mouse across the image.
Add possibility through menu to add more than one contour and clear all the contours
At the moment, for users with the most up-to-date version of python (3.9), the conda installation throws the following error:
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- sospex -> python[version='2.7.*|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0']
Your python: python=3.9
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
Also for the pip install using python 3.9, I get the following error after running sospex
:
Traceback (most recent call last):
File "/Users/srgoldma/opt/anaconda3/bin/sospex", line 4, in <module>
from sospex import start
File "/Users/srgoldma/opt/anaconda3/lib/python3.9/site-packages/sospex/start.py", line 2, in <module>
from sospex import mainwindow
File "/Users/srgoldma/opt/anaconda3/lib/python3.9/site-packages/sospex/mainwindow.py", line 23, in <module>
from sospex.apertures import photoAperture,PolygonInteractor, EllipseInteractor, RectangleInteractor, PixelInteractor
File "/Users/srgoldma/opt/anaconda3/lib/python3.9/site-packages/sospex/apertures.py", line 4, in <module>
from matplotlib.mlab import dist_point_to_segment
ImportError: cannot import name 'dist_point_to_segment' from 'matplotlib.mlab' (/Users/srgoldma/opt/anaconda3/lib/python3.9/site-packages/matplotlib/mlab.py)
It would be great to have a choice of colormaps for the image.
Also, the reverse versions of them.
Instruction to install SOSPEX
./Anaconda3-5.0.1-MacOSX-x86_64.sh (run the script)
This command will create /Users/username/anaconda3 directory
which python
/Users/jrho/anaconda3/bin/python
Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 6 2017, 12:04:38)
sospex
libpng warning: iCCP: known incorrect sRGB profile
QBasicTimer::start: QBasicTimer can only be used with threads started with QThread
conda install -c darioflute sospex
sofiasospexscript.txt
sofiasospexscript.txt
A lot of improvements. It is very nice.
I also note you delete issues. I think it is better to leave them. You can close the issue when you are done. That way you can see the history of sospex, which people can look at in future.
I will add more later..
Your demonstration with the updated sospec showed an option to choose the central wavelength which calculated the velocity scale. But I don't see that from the current version (Jan. 3, 2013). Please add an option of the central wavelength. I see only the redshift "cz" option.
There's a half-pixel offset visible in the spectra of the M82 cube.
Clicking quickly on one tab and then on a second tab (if the first was clicked accidentally, for example) closes the second tab rather than switching to it
Can you estimate the errors and make them appear on the spectra?
Add the possibility to fit with a Gaussian the distribution of flux selected on the image panel with
a circular aperture. On the left, the distribution of flux, the fitted Gaussian, and the expected Gaussian for an unresolved source should be shown.
The green spectrum in the right panel should be F_U to be consistent with the usage on the left panel.
Add a tool to measure distances in arcsec on the image.
I put here my comments for the AAS release (Jan 2018).
Might be nice to have a “restore” button that automatically reloads the last file that was opened. There were a few times when I decided I needed to “start over” and I had to go back and identify the file using File -> etc...; a restore button would make that a little easier for the user.
Too many very-close shades of blue: the marked region for moments, the line labels, and the model Gaussian. These become virtually invisible.
It would be good if the velocity scale on the velocity map produced by the moment analysis updated when the redshift and/or reference wavelength were changed
It would be nice to include somewhere on the display additional info about the cube after its loaded:
The position of [CII] line in the displayed spectra (right panel of SOSPEX setup) does not match with the lambda0 value at bottom-left. An artificial spike comes up on the channel supposedly [CII] line is located. (see the figure below.)
It would be also nice if SOSPEX has some capabilities I list below.
Gives the traceback:
Traceback (most recent call last):
File "/opt/anaconda3/envs/sospex/lib/python3.7/site-packages/sospex/mainwindow.py", line 1962, in fitApLines
if sc.emslines+sc.abslines == 0:
AttributeError: 'SpectrumCanvas' object has no attribute 'emslines'
After updating all python libraries, I could not run sospex with an error message - TypeError: register_cmap() got an unexpected keyword argument 'data'.
As of Dr. Fadda's recommendation, this has been resolved once regressing matplotlib to older version.
When cutting/cropping a cube, you have to save the result and then load the saved cube to start using it. This was a little confusing as most applications (and even the masking feature in SOSPEX) dont work that way: the data are altered first and then user is given option to save. If this can't be changed, then I would suggest emphasizing this sequence in the tutorials.
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.