spacetelescope / imexam

imexam is a python tool for simple image examination, and plotting, with similar functionality to IRAF's imexamine
http://imexam.readthedocs.io
BSD 3-Clause "New" or "Revised" License
74 stars 45 forks source link

Unsupported format string with a FITS file having extension ".evt" #250

Closed kchoX14 closed 1 year ago

kchoX14 commented 2 years ago

### Environment: I am working in a virtual environment on my Ubuntu 18.04 LTS system. I manually set the XPA_METHOD to "local" inside python with os module, which solved my initial issue with XPA detection error. Adding the ds9 absolute path to the global ~/.bashrc script helped imexam detect it. I have DS9 v8.3 installed. I also installed pyds9 using pip, in case there needs to be be some help to imexam later.

### Issue: I am trying to load X-ray cleaned event files (which normally arrive with the .evt extension instead of .fits) from the NuSTAR mission. They all adhere to the FITS standards, which is why they can be viewed, manipulated and stored using any FITS file tool (like fv from Heasoft or TOPCAT from Bristol). But whenever I try to load_fits() my cleaned event file file.evt (with absolute path or from the working directory where the file is), I run into a string.format() error. Please look at the following for the code from start until the error exit: >>> import os >>> os.environ['XPA_METHOD'] = "local" >>> import imexam Ginga not installed, use other viewer, or no viewer >>> viewer = imexam.connect('ds9') >>> viewer.load_fits('/path/to/my/file.evt') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/kishalay/E/threeML-env/lib/python3.9/site-packages/imexam/connect.py", line 393, in load_fits self.window.load_fits(*args, **kwargs) File "/home/kishalay/E/threeML-env/lib/python3.9/site-packages/imexam/ds9_viewer.py", line 1179, in load_fits cstring = ('fits {0:s}[{1:d}]'.format(shortname, extver)) TypeError: unsupported format string passed to NoneType.__format__

I checked the script ds9_viewer.py, but could not make sense of why a file extension that adheres to FITS standards and is supplied by HEASARC from NASA is not recognized. Is it currently coded to accept only files with the .fits extension? If yes, I'd like to locally change that (or add another line that also accepts .evt FITS files). Kindly provide assistance.

kchoX14 commented 2 years ago

Anyone? Developers?

kchoX14 commented 2 years ago

### Environment: I am working in a virtual environment on my Ubuntu 18.04 LTS system. I manually set the XPA_METHOD to "local" inside python with os module, which solved my initial issue with XPA detection error. Adding the ds9 absolute path to the global ~/.bashrc script helped imexam detect it. I have DS9 v8.3 installed. I also installed pyds9 using pip, in case there needs to be be some help to imexam later.

### Issue: I am trying to load X-ray cleaned event files (which normally arrive with the .evt extension instead of .fits) from the NuSTAR mission. They all adhere to the FITS standards, which is why they can be viewed, manipulated and stored using any FITS file tool (like fv from Heasoft or TOPCAT from Bristol). But whenever I try to load_fits() my cleaned event file file.evt (with absolute path or from the working directory where the file is), I run into a string.format() error. Please look at the following for the code from start until the error exit: >>> import os >>> os.environ['XPA_METHOD'] = "local" >>> import imexam Ginga not installed, use other viewer, or no viewer >>> viewer = imexam.connect('ds9') >>> viewer.load_fits('/path/to/my/file.evt') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/kishalay/E/threeML-env/lib/python3.9/site-packages/imexam/connect.py", line 393, in load_fits self.window.load_fits(*args, **kwargs) File "/home/kishalay/E/threeML-env/lib/python3.9/site-packages/imexam/ds9_viewer.py", line 1179, in load_fits cstring = ('fits {0:s}[{1:d}]'.format(shortname, extver)) TypeError: unsupported format string passed to NoneType.__format__

I checked the script ds9_viewer.py, but could not make sense of why a file extension that adheres to FITS standards and is supplied by HEASARC from NASA is not recognized. Is it currently coded to accept only files with the .fits extension? If yes, I'd like to locally change that (or add another line that also accepts .evt FITS files). Kindly provide assistance.

Has the support for this repository been left unattended???

sosey commented 2 years ago

I'm here, but have been away - I will take a look at this soon (hopefully by this weekend and get back with you!)

kchoX14 commented 2 years ago

I'm here, but have been away - I will take a look at this soon (hopefully by this weekend and get back with you!)

That's great!

kchoX14 commented 1 year ago

I'm here, but have been away - I will take a look at this soon (hopefully by this weekend and get back with you!)

Hello. Did you get the time then last weekend?

kchoX14 commented 1 year ago

@sosey I suppose I should just close this issue, right? It's been too long.

kchoX14 commented 1 year ago

Incredibly poor support from the developers. No interest. Very disappointing indeed!