Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing SPEX-PRISM fits files #175

Open
JosephKarpinski opened this issue Aug 10, 2023 · 2 comments
Open

Missing SPEX-PRISM fits files #175

JosephKarpinski opened this issue Aug 10, 2023 · 2 comments

Comments

@JosephKarpinski
Copy link

Hi,

Where can I find these missing SPEX-PRISM fits files?

See attached below:

Thanks!

Screenshot 2023-08-10 at 9 51 11 AM Screenshot 2023-08-10 at 9 52 41 AM Screenshot 2023-08-10 at 9 53 24 AM Screenshot 2023-08-10 at 9 54 26 AM Screenshot 2023-08-10 at 9 54 50 AM
@Tianxing-Sky-Zhou
Copy link

Tianxing-Sky-Zhou commented Aug 10, 2023

Same error occurs to me after the recent update. A significant amount of SPEX-PRISM fits files went missing. This was not an issue when I was using July 5th's version.

ValueError                                Traceback (most recent call last)
Cell In[9], line 51
     49 for name in splat.searchLibrary()['NAME']:
     50     try:
---> 51         spectra = splat.getSpectrum(name=name)
     52         if not spectra:
     53             print(f"No spectra found for {name}.")

File ~\Desktop\splat\splat\core.py:4322, in getSpectrum(output, limit, verbose, key_name, *args, **kwargs)
   4320     for i,k in enumerate(search[key_name]):
   4321         skwargs = search.iloc[i].to_dict()
-> 4322         result.append(Spectrum(k))
   4323 #         if len(files) == 1:
   4324 #             if kwargs.get('lucky',False) == True:
   4325 #                 print('\nRetrieving 1 lucky file\n')
   (...)
   4348     #     else:
   4349     #         sys.stderr.write('\nNo files match search criteria\n\n')
   4351     return result

File ~\Desktop\splat\splat\core.py:396, in Spectrum.__init__(self, *args, **kwargs)
    388                 sdb = searchLibrary(file=self.filename)
    390 # return prior spectrum - THIS IS NOT WORKING SO COMMENTED OUT
    391 #            if self.filename in list(SPECTRA_READIN.keys()) and self.runfast == True:
    392 #                self = SPECTRA_READIN[self.filename]
    393 #                return
    394 
    395 # read in spectrum, being careful not to overwrite specifically assigned quantities
--> 396             rs = readSpectrum(self.filename,**mkwargs)
    397             if 'wave' in rs.keys():
    398                 for k in list(rs.keys()): 

File ~\Desktop\splat\splat\core.py:5503, in readSpectrum(file, folder, file_type, wave_unit, flux_unit, dimensionless, comment, delimiter, crval1, cdelt1, catch_sn, remove_nans, no_zero_noise, use_instrument_reader, instrument, instrument_param, verbose)
   5501         if os.path.exists(os.path.normpath(file)) == False: file = folder+os.path.basename(file)
   5502         if os.path.exists(os.path.normpath(file)) == False:
-> 5503             raise ValueError('Cannot find {} locally or in folder {}\n\n'.format(file,folder))
   5505 # instrument specific read shortcut - not working?
   5506     readin = False

ValueError: Cannot find C:\Users\20130\Desktop\splat\splat/..//resources/Spectra/SPEX-PRISM/11735_10002.fits locally or in folder C:\Users\20130\Desktop\splat\splat/..//resources/Spectra/SPEX-PRISM/

I checked my local resources/Spectra/SPEX-PRISM folder and the GitHub SPEX-PRISM folder. A lot of fits files were missing

@aburgasser
Copy link
Owner

Issues noted; we're in a bit of a busy time right now but I'll track this down as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants