GithubHelp home page GithubHelp logo

darioflute / sospex Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 4.0 272.65 MB

SOFIA SPectral EXplorer (GUI to explore spectral cubes obtained with FIFI-LS, PACS, and GREAT)

License: GNU General Public License v3.0

Python 100.00%
python conda sofia-telescope spectral-cubes fifi-ls great pacs herschel alma

sospex's People

Contributors

darioflute avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sospex's Issues

Error when displaying downloaded images

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.

Feature request: scale bar

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.

Long-term implementaion request

Here I put the requests which can be implemented when you have a chance.

  1. Add zoom in and out option in the spectrum window. I note that the image window has an option to zoom in and out by touching the keyboard pad. I know you have zooming option with the logo by highlighting the boundary in the window.
  2. Add the cursor reading of pixel number (x,y) and/or coordinate (ra,dec) when you move around the cursor. I note sospex already has this option for the spectrum window. As I move the cursor, it gives x and y values. That is nice. This can apply to the image window.

stepping through the cube (B. Vacca)

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!

Line markers disappear when rescaling

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.

Implementation with python 3.9

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)

Add a choice of colormaps

It would be great to have a choice of colormaps for the image.
Also, the reverse versions of them.

instruction to install sospex

Instruction to install SOSPEX

  1. Download anaconda from https://www.anaconda.com/download/#macos
    The file is “Anaconda3-5.0.1-MacOSX-x86_64.sh” for mac
  2. ./Anaconda3-5.0.1-MacOSX-x86_64.sh (run the script)
    This command will create /Users/username/anaconda3 directory

  3. Add the path in .cshrc
    Here is an example of command in tshell (in the file of .cshrc)

    Added for anaconda 3

    setenv PATH "/Users/usernam/anaconda3/bin:$PATH"
  4. Verify that you have python3.

which python
/Users/jrho/anaconda3/bin/python
Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 6 2017, 12:04:38)

  1. Type “sospex” to start the program

sospex
libpng warning: iCCP: known incorrect sRGB profile
QBasicTimer::start: QBasicTimer can only be used with threads started with QThread

  1. Reinstall the program

conda install -c darioflute sospex
sofiasospexscript.txt
sofiasospexscript.txt

Comments on 0.16.beta version

A lot of improvements. It is very nice.

  1. When I downloaded the image (for example of WISE), it did not appear; you can implement this later.

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..

velocity scale: add an option of the central wavelength

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.

Add way to estimate FWHM of point source PSF

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.

Comments for the AAS release

I put here my comments for the AAS release (Jan 2018).

  1. Please add "(under construction)" after "Fit line and continuum".
    The final text is "Fit line and continuum (under construction)". This way, it is clear this option is not available yet. Or you can add the symbol of construction.

Feature Request: restore button

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.

Near-invisible colours

Too many very-close shades of blue: the marked region for moments, the line labels, and the model Gaussian. These become virtually invisible.

Feature request: additional cube info

It would be nice to include somewhere on the display additional info about the cube after its loaded:

  • size of cube in pixels;
  • the spatial/wavelength pixel scales .

Some bugs with GREAT data

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.)
SOSPEXbugGREAT

It would be also nice if SOSPEX has some capabilities I list below.

  1. Displaying position-velocity diagram (across specified lines and/or x/y direction)
  2. Showing flux values in T*a or Tmb (in K) setup (it is automatically recalculated to Jy now).
  3. Showing spectra as a function of Vlsr (in m/s or km/s), i.e. mandatory x-axis. This is currently shown as the secondary x-axis but it would be useful if this is the mandatory setup (especially when the spectra are extracted).

Issue with new matplotlib

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.

Issue: Cube cropping/cutting behavior

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.