In [4]:
# imports
import json
from astropy.table import Table
import arclines
In [3]:
test_arc_path = arclines.__path__[0]+'/data/sources/'
src_file = 'lrisb_600_4000_PYPIT.json'
with open(test_arc_path+src_file,'r') as f:
pypit_fit = json.load(f)
In [6]:
spec = pypit_fit['spec']
tbl = Table()
tbl['spec'] = spec
tbl.write(arclines.__path__[0]+'/tests/files/LRISb_600_spec.ascii',format='ascii')
In [7]:
test_arc_path = '/Users/xavier/local/Python/PYPIT-development-suite/REDUX_OUT/Kast_red/600_7500_d55/MF_kast_red/'
src_file = 'MasterWaveCalib_A_01_aa.json'
with open(test_arc_path+src_file,'r') as f:
pypit_fit = json.load(f)
In [8]:
spec = pypit_fit['spec']
tbl = Table()
tbl['spec'] = spec
tbl.write(arclines.__path__[0]+'/tests/files/Kastr_600_7500_spec.ascii',format='ascii')
In [10]:
pix = np.array(pypit_fit['xfit'])*(len(spec)-1.)
wave = np.array(pypit_fit['yfit'])
disp = (wave-np.roll(wave,1))/(pix-np.roll(pix,1))
disp
Out[10]:
In [11]:
test_arc_path = arclines.__path__[0]+'/data/sources/'
src_file = 'lrisr_600_7500_PYPIT.json'
with open(test_arc_path+src_file,'r') as f:
pypit_fit = json.load(f)
In [12]:
spec = pypit_fit['spec']
tbl = Table()
tbl['spec'] = spec
tbl.write(arclines.__path__[0]+'/tests/files/LRISr_600_7500_spec.ascii',format='ascii')
In [14]:
range(5,-1,-1)
Out[14]:
In [ ]: