imexam icon indicating copy to clipboard operation
imexam copied to clipboard

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

Open kchoX14 opened this issue 2 years ago • 5 comments

### 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 avatar Aug 03 '22 17:08 kchoX14

Anyone? Developers?

kchoX14 avatar Aug 12 '22 20:08 kchoX14

### 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???

kchoX14 avatar Aug 18 '22 13:08 kchoX14

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

sosey avatar Aug 22 '22 22:08 sosey

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 avatar Aug 23 '22 08:08 kchoX14

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 avatar Aug 30 '22 06:08 kchoX14

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

kchoX14 avatar Sep 14 '22 19:09 kchoX14

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

kchoX14 avatar Sep 18 '22 08:09 kchoX14