Commit 18b00610 authored by bepinat's avatar bepinat

NII + precises wavelengths

parent 97f4dc2a
......@@ -115,7 +115,7 @@ def readconfig(filename, config):
# XXX or give an error message but in that case, must test that the keywords have correct values
## XXX more keywords? add default values?
needed_keys = ['FITSFILE', 'OUTPUT', 'SKYFILE', 'HALPHA', 'NII6545', 'NII6584', 'SII6717', 'SII6731', 'OIII4959', 'OIII5007', 'HBETA', 'OII3729', 'OII3726', 'COMMW', 'REDSHIFT', 'REDMIN', 'REDMAX', 'INITW', 'WMIN', 'WMAX', 'DFIT', 'DGCTNUM', 'MFIT', 'SCLIP', 'XYCLIP', 'NCLIP', 'SPSF', 'WSMOOTH', 'SSMOOTH', 'THRES', 'MEDIAN', 'FITSPSF', 'XMIN', 'YMIN', 'ZMIN', 'XMAX', 'YMAX', 'ZMAX']
needed_keys = ['FITSFILE', 'OUTPUT', 'SKYFILE', 'HALPHA', 'NII6548', 'NII6584', 'SII6716', 'SII6731', 'OIII4959', 'OIII5007', 'HBETA', 'OII3729', 'OII3726', 'COMMW', 'REDSHIFT', 'REDMIN', 'REDMAX', 'INITW', 'WMIN', 'WMAX', 'DFIT', 'DGCTNUM', 'MFIT', 'SCLIP', 'XYCLIP', 'NCLIP', 'SPSF', 'WSMOOTH', 'SSMOOTH', 'THRES', 'MEDIAN', 'FITSPSF', 'XMIN', 'YMIN', 'ZMIN', 'XMAX', 'YMAX', 'ZMAX']
keys = conf.keys()
for key in needed_keys:
#if keys.isdisjoint([key]): # c'est du python3
......@@ -153,9 +153,9 @@ def readcubes(conf, multi_ext=False):
var = hdul[0].data
varhdr = hdul[0].header
else:
hdul=pf.open(conf['FITSFILE'])
cube=hdul[0].data
hdr=hdul[0].header
hdul = pf.open(conf['FITSFILE'])
cube = hdul[0].data
hdr = hdul[0].header
if (not conf['SKYFILE']):
var = 0
varhdr = ''
......@@ -354,21 +354,21 @@ class lines:
def __init__(self):
self.index = 0
self.lines = {}
self.append(line('HALPHA', 6562.8, ref='HBETA', low=2.75, th=2.85))
self.append(line('HBETA', 4861.))
self.append(line('HALPHA', 6562.801, ref='HBETA', low=2.75, th=2.85))
self.append(line('HBETA', 4861.363))
self.append(line('HGAMMA', 4340., ref='HBETA', low=0.44, up=0.5, th=0.468))
self.append(line('HDELTA', 4101., ref='HBETA', low=0.23, up=0.29, th=0.259))
self.append(line('HEPS', 3968., ref='HBETA', low=0.13, up=0.19, th=0.159))
self.append(line('NII6584', 6583., ref='NII6545', low=2.7, up=3.3, th=3.))
#self.append(line('NII6583', 6583., ref='NII6545', low=2.7, up=3.3, th=3.))
self.append(line('NII6545', 6545.))
self.append(line('SII6731', 6731.))
self.append(line('SII6717', 6717., ref='SII6731', low=0.45, up=1.45, th=1.))
self.append(line('OIII5007', 5007., ref='OIII4959', low=2.7, up=3.3, th=3.))
self.append(line('OIII4959', 4959.))
self.append(line('NII6584', 6583.45, ref='NII6548', low=2.7, up=3.3, th=3.))
#self.append(line('NII6583', 6583., ref='NII6548', low=2.7, up=3.3, th=3.))
self.append(line('NII6548', 6548.05))
self.append(line('SII6731', 6730.82))
self.append(line('SII6716', 6716.44, ref='SII6731', low=0.45, up=1.45, th=1.))
self.append(line('OIII5006', 5007.843, ref='OIII4959', low=2.7, up=3.3, th=3.))
self.append(line('OIII4958', 4958.911))
self.append(line('OIII4363', 4363., ref='OIII4959')) # XXX low=, up=, th=
self.append(line('OII3729', 3729., ref='OII3726', low=0.3, up=1.5, th=1.))
self.append(line('OII3726', 3726.))
self.append(line('OII3729', 3728.80, ref='OII3726', low=0.3, up=1.5, th=1.))
self.append(line('OII3726', 3726.04))
self.append(line('HEI4471', 4471.))
self.append(line('HEI5876', 5876., ref='HEI4471', low=2.5, th=2.5))
self.append(line('HEII4686', 4686.))
......@@ -376,13 +376,13 @@ class lines:
self.append(line('NEIII3868', 3868.))
#self['Ha'] =
#self.names = ['Ha', 'Hb', 'Hga', 'Hd', 'Heps', 'NII6583', 'NII6548', 'SII6731', 'SII6717', 'OIII5007', 'OIII4959', 'OIII4363', 'OII3729', 'OII3726', 'HeI4471', 'HeI5876', 'HeII4686', 'OI6300', 'NeIII3868']
#self.names = ['Ha', 'Hb', 'Hga', 'Hd', 'Heps', 'NII6583', 'NII6548', 'SII6731', 'SII6716', 'OIII5007', 'OIII4959', 'OIII4363', 'OII3729', 'OII3726', 'HeI4471', 'HeI5876', 'HeII4686', 'OI6300', 'NeIII3868']
#self.waves = [6562.8, 4861., 4340., 4101., 3968., 6583., 6548., 6731., 6717., 5007., 4959., 4363., 3729., 3726., 4471., 5876., 4686., 6300., 3868.]
#self.ref = ['Hb', 'Hb', 'Hb', 'Hb', 'Hb', 'NII6548', 'NII6548', 'SII6731', 'SII6731', 'OIII4959', 'OIII4959', 'OIII4959', 'OII3726', 'OII3726', 'HeI4471', 'HeI4471', 'HeII4686', 'OI6300', 'NeIII3868']
#lines={'Ha':6562.8,'Hb':4861.,'Hga':4340.,'Hd':4101.,'Heps':3968.,'NII6583':6583.,'NII6548':6548.,'SII6731':6731.,'SII6717':6717.,'OIII5007':5007.,'OIII4959':4959.,'OIII4363':4363.,'OII3729':3729.,'OII3726':3726.,'HeI4471':4471.,'HeI5876':5876.,'HeII4686':4686.,'OI6300':6300.,'NeIII3868':3868.}
#lines={'Ha':6562.8,'Hb':4861.,'Hga':4340.,'Hd':4101.,'Heps':3968.,'NII6583':6583.,'NII6548':6548.,'SII6731':6731.,'SII6716':6717.,'OIII5007':5007.,'OIII4959':4959.,'OIII4363':4363.,'OII3729':3729.,'OII3726':3726.,'HeI4471':4471.,'HeI5876':5876.,'HeII4686':4686.,'OI6300':6300.,'NeIII3868':3868.}
##Initialisation of groups of lines
#sgroup={'Ha':'Hb','Hb':'Hb','Hga':'Hb','Hd':'Hb','Heps':'Hb','NII6583':'NII6548','NII6548':'NII6548','SII6731':'SII6731','SII6717':'SII6731','OIII5007':'OIII4959','OIII4959':'OIII4959','OIII4363':'OIII4959','OII3729':'OII3726','OII3726':'OII3726','HeI4471':'HeI4471','HeI5876':'HeI4471','HeII4686':'HeII4686','OI6300':'OI6300','NeIII3868':'NeIII3868'}
#sgroup={'Ha':'Hb','Hb':'Hb','Hga':'Hb','Hd':'Hb','Heps':'Hb','NII6583':'NII6548','NII6548':'NII6548','SII6731':'SII6731','SII6716':'SII6731','OIII5007':'OIII4959','OIII4959':'OIII4959','OIII4363':'OIII4959','OII3729':'OII3726','OII3726':'OII3726','HeI4471':'HeI4471','HeI5876':'HeI4471','HeII4686':'HeII4686','OI6300':'OI6300','NeIII3868':'NeIII3868'}
def waveindgen(hdr):
'''
......@@ -966,9 +966,9 @@ def main(argv):
parser.add_argument('--HGAMMA', action="store_true", dest="HGAMMA", default=None, help="keyword to fit Hgamma line")
parser.add_argument('--HDELTA', action="store_true", dest="HDELTA", default=None, help="keyword to fit Hdelta line")
parser.add_argument('--HEPS', action="store_true", dest="HEPS", default=None, help="keyword to fit Hepsilon line")
parser.add_argument('--NII6545', action="store_true", dest="NII6545", default=None, help="keyword to fit NII@6545 line")
parser.add_argument('--NII6548', action="store_true", dest="NII6548", default=None, help="keyword to fit NII@6548 line")
parser.add_argument('--NII6584', action="store_true", dest="NII6584", default=None, help="keyword to fit NII@6584 line")
parser.add_argument('--SII6717', action="store_true", dest="SII6717", default=None, help="keyword to fit SII@6717 line")
parser.add_argument('--SII6716', action="store_true", dest="SII6716", default=None, help="keyword to fit SII@6716 line")
parser.add_argument('--SII6731', action="store_true", dest="SII6731", default=None, help="keyword to fit SII@6731 line")
parser.add_argument('--OIII4363', action="store_true", dest="OIII4363", default=None, help="keyword to fit OIII@4363 line")
parser.add_argument('--OIII4959', action="store_true", dest="OIII4959", default=None, help="keyword to fit OIII@4959 line")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment