Esempio n. 1
0
def calibrate_nis019_pos1(fullpathoifdir):
    oi_abdor = "jw01093001001_01101_00005_nis.oifits"
    oi_37093 = "jw01093004001_01101_00005_nis.oifits"
    oi_36805 = "jw01093006001_01101_00005_nis.oifits"

    # Produce a single calibrated OIFITS file for each  pair
    print("************  Running calibrate ***************")

    oifdir = fullpathoifdir
    print(oifdir)
    cfnlist = [] # calibrated oifits file names list
    mnmlist = [] # calibrated oifits file mnemonics for candid output plot files

    cd, cfn = calibrate_oifits(os.path.join(oifdir,oi_abdor), os.path.join(oifdir,oi_37093), oifdir=oifdir, returnfilename=True)
    cfnlist.append(cfn)
    mnmlist.append('abdor_hd37093')

    cd, cfn = calibrate_oifits(os.path.join(oifdir,oi_abdor), os.path.join(oifdir,oi_36805), oifdir=oifdir, returnfilename=True)
    cfnlist.append(cfn)
    mnmlist.append('abdor_hd36805')

    cd, cfn = calibrate_oifits(os.path.join(oifdir,oi_37093), os.path.join(oifdir,oi_36805), oifdir=oifdir, returnfilename=True)
    cfnlist.append(cfn)
    mnmlist.append('hd37093_hd36805')

    cd, cfn = calibrate_oifits(os.path.join(oifdir,oi_36805), os.path.join(oifdir,oi_37093), oifdir=oifdir, returnfilename=True)
    cfnlist.append(cfn)
    mnmlist.append('hd36805_hd36805')

    print("\nAB Dor AC and two calibrators, POS1, pairwise calibration done")
    return cfnlist, mnmlist
Esempio n. 2
0
def calibrate_pair(fullpathoifdir):
    oi_tgt = "jw_tgt.oifits"
    oi_cal = "jw_cal.oifits"

    # Produce a single calibrated OIFITS file for each  pair
    print("************  Running calibrate ***************")

    oifdir = fullpathoifdir
    print(oifdir)
    cfnlist = [] # calibrated oifits file names list
    mnmlist = [] # calibrated oifits file mnemonics for candid output plot files

    cd, cfn = calibrate_oifits(os.path.join(oifdir,oi_tgt), os.path.join(oifdir,oi_cal), oifdir=oifdir, returnfilename=True)
    cfnlist.append(cfn)
    mnmlist.append('tgt_cal')

    print("\ntgt and cal calibration done")
    return cfnlist, mnmlist
Esempio n. 3
0
#! /usr/bin/env python
import sys
import os
import numpy as np
from astropy.io import fits
import string
import nrm_analysis
from nrm_analysis.misctools.implane2oifits import calibrate_oifits

np.set_printoptions(precision=4, linewidth=160)
np.set_printoptions(formatter={'float': lambda x: '{:+.2e}'.format(x)},
                    linewidth=80)

if __name__ == "__main__":

    oidir = "/Users/anand/data/nis_019/implaneiadev/Saveoif_ov5/"
    oi_abdor = "jw01093001001_01101_00005_nis.oifits"
    oi_37093 = "jw01093004001_01101_00005_nis.oifits"
    oi_36805 = "jw01093006001_01101_00005_nis.oifits"

    # Produce a single calibrated OIFITS file for each  pair
    print("************  Running calibrate ***************")
    calibrate_oifits(oidir + oi_abdor, oidir + oi_37093, oifdir=oidir)
    calibrate_oifits(oidir + oi_abdor, oidir + oi_36805, oifdir=oidir)
    calibrate_oifits(oidir + oi_37093, oidir + oi_36805, oifdir=oidir)
    calibrate_oifits(oidir + oi_36805, oidir + oi_37093, oifdir=oidir)
#! /usr/bin/env python

# cd .../ImplaneIA;  python setup.py develop

import sys
import os.path
import nrm_analysis
import nrm_analysis.misctools as misc
import nrm_analysis.misctools.implane2oifits as im2oi
print(nrm_analysis.__file__)
print(nrm_analysis.misctools.implane2oifits.__file__)
print(misc.__file__)
print(im2oi.__file__)


sys.exit("Arretez!")

toifn = os.path.expanduser('~') + '/data/implaneia/example_binary_newPsf/' + 'ov1_t_binary__NIRISS_g7s6_F380M_59112.oifits'
coifn = os.path.expanduser('~') + '/data/implaneia/example_binary_newPsf/' + 'ov1_c_binary__NIRISS_g7s6_F380M_59112.oifits'

tgt_cald = im2oi.calibrate_oifits(toifn, coifn, oifprefix="impc_")