In [1]:
# imports
from desispec.qa import qa_exposure as qa_exp
from desispec.io import qa as desio_qa
In [3]:
reload(qa_exp)
qaframe = qa_exp.QA_Frame(flavor='arc')
print(qaframe)
In [5]:
reload(qa_exp)
qaframe = qa_exp.QA_Frame(flavor='science')
qaframe.init_skysub()
print(qaframe.data)
In [6]:
from desispec.io import read_qa_frame
In [7]:
reload(desio_qa)
Out[7]:
In [8]:
desio_qa.write_qa_frame('tmp.yaml', qaframe)
Out[8]:
In [9]:
qaframe = desio_qa.read_qa_frame('tmp.yaml')
In [10]:
qaframe
Out[10]:
desi_compute_fiberflat.py \
--infile /Users/xavier/DESI/TST/dogwood/exposures/20150211/00000001/frame-b0-00000001.fits \
--outfile /Users/xavier/DESI/TST/dogwood/calib2d/20150211/jxp-fflat-b0-00000001.fits \
--fibermap /Users/xavier/DESI/TST/data/20150211/fibermap-00000002.fits \
--qafile /Users/xavier/DESI/TST/dogwood/exposures/20150211/00000001/qa-b0-00000001.yaml \
--qafig /Users/xavier/DESI/TST/dogwood/exposures/20150211/00000001/qa-fflat-b0-00000001.pdf
In [ ]:
desi_compute_sky.py \
--infile /Users/xavier/DESI/TST/dogwood/exposures/20150211/00000002/frame-b0-00000002.fits \
--fibermap /Users/xavier/DESI/TST/data/20150211/fibermap-00000002.fits \
--fiberflat /Users/xavier/DESI/TST/dogwood/calib2d/20150211/fiberflat-b0-00000001.fits \
--outfile /Users/xavier/DESI/TST/dogwood/exposures/20150211/00000002/sky2-b0-00000002.fits \
--qafile /Users/xavier/DESI/TST/dogwood/exposures/20150211/00000002/qa-b0-00000002.yaml \
--qafig /Users/xavier/DESI/TST/dogwood/exposures/20150211/00000002/qa-b0-00000002.pdf \
> tmp.log
In [11]:
# Read and print
qaframe = desio_qa.read_qa_frame('/Users/xavier/DESI/TST/dogwood/exposures/20150211/00000002/qa-b0-00000002.yaml')
qaframe.data
Out[11]:
[edison ~] source env.sh
[edison ~] cd Python/desispec
[edison ~] git pull
[edison ~] cd
[edison ~] module use ~xavier/modules
[edison ~] module switch desispec/qa_exposure
[edison ~] cd qa_test
desi_compute_sky.py \
--infile /project/projectdirs/desi/spectro/redux/sjb/dogwood/exposures/20150211/00000002/frame-b0-00000002.fits \
--fibermap /project/projectdirs/desi/spectro/sim/alpha-5/20150211/fibermap-00000002.fits \
--fiberflat /project/projectdirs/desi/spectro/redux/sjb/dogwood/calib2d/20150211/fiberflat-b0-00000001.fits \
--outfile sky-b0-00000002.fits \
--qafile qa-b0-00000002.yaml \
--qafig qa-b0-00000002.pdf \
> qa_tst.log
In [ ]: