I am encountering an issue in the latest release (via mercurial update today) of the DRP. I am not sure if it is user error or not yet, but when I run mospy on the example data I get the following back:
sudo mospy MOSFIRE_DRP_MASK_H.py
['m120910_0410.fits', 'm120910_0411.fits', 'm120910_0412.fits', 'm120910_0413.fits', 'm120910_0414.fits', 'm120910_0415.fits']
Traceback (most recent call last):
File "MOSFIRE_DRP_MASK_H.py", line 30, in <module>
Flats.handle_flats(flatnames, maskname, band, flatops)
File "/Users/jasonchu/MOSFIRE/drp_code/mosfire/MOSFIRE/Flats.py", line 64, in handle_flats
hdr, dat, bs = IO.readmosfits(fname, options, extension=extension)
File "/Users/jasonchu/MOSFIRE/drp_code/mosfire/MOSFIRE/IO.py", line 353, in readmosfits
else: path = os.path.join(fname_to_path(fname, options), fname)
File "/Users/jasonchu/MOSFIRE/drp_code/mosfire/MOSFIRE/IO.py", line 283, in fname_to_path
path = os.path.join(options["indir"], yr + month + "%2.2i" % dy)
KeyError: 'indir'
The problem seems to be with the indir which I've tried including in both Options.py and MOSFIRE_DRP_MASK_H.py with no avail. In my Options.py file I have the following 3 lines defining indir, outdir, and path_bpm:
indir = "/Users/jasonchu/MOSFIRE/raw_data"
outdir = "/Users/jasonchu/MOSFIRE/reduced_data/".format(getpass.getuser())
path_bpm = "/Users/jasonchu/MOSFIRE/badpixel/badpix_10sep2012.fits"
Note that I commented out the following line in Options.py:
#setenv MOSPATH $HOME/mosfire/DRP
And in my .cshrc I define MOSPATH to be:
setenv MOSPATH /Users/jasonchu/MOSFIRE/drp_code/mosfire
Do you have any suggestions?? Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "MOSFIRE Data Reduction PIpeline" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mosfire-drp...@googlegroups.com.
To post to this group, send email to mosfi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mosfire-drp/356f2abb-97c6-442c-bdf3-ac63009ba05b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/mosfire-drp/a4d08d16-7440-41cd-b934-570fac363560%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
In my driver file I am running the following task:
Rectify.handle_rectification(maskname, ['eps_Offset_1.5.txt.fits', 'eps_Offset_-1.5.txt.fits'],
'merged_lambda_solution_wave_stack_K_m140209_0367-0393_and_wave_stack_K_m140209_0186-0188.fits',
band,
'm140209_0367.fits',
waveops)
As suggested I include the merged wavelength solution fits, and the first file in my Offset_1.5.txt file. The pipeline returns the following errors:
Traceback (most recent call last):
File "COSMOS_3_K.py", line 55, in <module>
waveops)
File "/Users/jasonchu/MOSFIRE/mosdrp/MOSFIRE/Rectify.py", line 146, in handle_rectification
x, x, bs = IO.readmosfits(barset_file, options)
File "/Users/jasonchu/MOSFIRE/mosdrp/MOSFIRE/IO.py", line 344, in readmosfits
else: path = os.path.join(fname_to_path(fname, options), fname)
File "/Users/jasonchu/MOSFIRE/mosdrp/MOSFIRE/IO.py", line 274, in fname_to_path
path = os.path.join(options["indir"], yr + month + "%2.2i" % dy)
KeyError: 'indir'
=============================================================================
A second, unrelated problem has to do with the first step of the driver file for another mask. The DRP doesn't seem to like the flat files, and I've tried all 7 flat images to no avail. Note that I've been able to successfully run the pipeline on another mask with no problems.
I've included one of the flat fields here if you want to take a look:
http://ifa.hawaii.edu/~jasonchu/m140209_0132.fits
Loading: Flat.txt
['/Users/jasonchu/MOSFIRE/raw_data/2014feb09/m140209_0132.fits', '/Users/jasonchu/MOSFIRE/raw_data/2014feb09/m140209_0133.fits', '/Users/jasonchu/MOSFIRE/raw_data/2014feb09/m140209_0134.fits', '/Users/jasonchu/MOSFIRE/raw_data/2014feb09/m140209_0135.fits', '/Users/jasonchu/MOSFIRE/raw_data/2014feb09/m140209_0136.fits', '/Users/jasonchu/MOSFIRE/raw_data/2014feb09/m140209_0137.fits', '/Users/jasonchu/MOSFIRE/raw_data/2014feb09/m140209_0138.fits']
Traceback (most recent call last):
File "COSMOS_1_K.py", line 20, in <module>
Flats.handle_flats('Flat.txt', maskname, band, flatops)
File "/Users/jasonchu/MOSFIRE/mosdrp/MOSFIRE/Flats.py", line 64, in handle_flats
hdr, dat, bs = IO.readmosfits(fname, options, extension=extension)
File "/Users/jasonchu/MOSFIRE/mosdrp/MOSFIRE/IO.py", line 363, in readmosfits
raise Exception("Improper MOSFIRE FITS File: %s" % path)
Exception: Improper MOSFIRE FITS File: /Users/jasonchu/MOSFIRE/raw_data/2014feb09/m140209_0132.fits
Thanks in advance!
The second question still has not been solved and I posted it as a separate issue on the forum:
https://groups.google.com/forum/#!topic/mosfire-drp/DydKrbmNmf0