Пример #1
0
def autoproc_cli():
    autoproc_kwargs = {
        'datadir': selected_dir,
        'imdir': reduced_dir,
        'caldir': cal_dir,
        'start': args.start,
        'stop': args.stop,
        'only': None,
        'step': args.step,
        'mastersky': not args.nomastersky,
        'skyflattarg': not args.noskyflattarg,
        'redo': args.redo,
        'quiet': args.quiet,
        'rmifiles': args.rmifiles,
        'customcat': args.customcat,
        'customcatfilt': str_list_to_list(args.customcatfilt),
    }
    autoproc(**autoproc_kwargs)

    for f in glob.glob(os.path.join(reduced_dir, 'coadd*.fits')):
        filename = os.path.basename(f)
        f_reduced_dir = os.path.join(reduced_dir, filename)
        f_coadd_dir = os.path.join(coadd_dir, filename)
        if not args.quiet:
            print('moving {0} to {1}'.format(f_reduced_dir, f_coadd_dir))
        shutil.move(f_reduced_dir, f_coadd_dir)
Пример #2
0
from photopipe.reduction.auto.autoproc import autoproc

autoproc(datadir='/mnt/data/science/selected/',
         imdir='/mnt/data/science/selected/reduced/',
         nomastersky=True,
         redo=1)
Пример #3
0
master.mkmaster('lmi', bias_calib, 'bias')
print('start mkmaster flat')
master.mkmaster('lmi', flat_calib, 'flat')

print('start move files master biases to selected folder')
for f in glob.glob(os.path.join(base_path, 'bias*.fits')):
    filename = os.path.basename(f)
    print('selected_path', selected_path)
    f_base_path = os.path.join(base_path, filename)
    print('f_base_path', f_base_path)
    f_selected_path = os.path.join(selected_path, filename)
    print('f_selected_path', f_selected_path)
    print('moving {0} to {1}'.format(f_base_path, f_selected_path))
    move(f_base_path, f_selected_path)

print('start move files master flats to selected folder')
for f in glob.glob(os.path.join(base_path, 'flat*.fits')):
    filename = os.path.basename(f)
    print('selected_path', selected_path)
    f_base_path = os.path.join(base_path, filename)
    print('f_base_path', f_base_path)
    f_selected_path = os.path.join(selected_path, filename)
    print('f_selected_path', f_selected_path)
    print('moving {0} to {1}'.format(f_base_path, f_selected_path))
    move(f_base_path, f_selected_path)

autoproc(datadir=selected_path + os.path.sep,
         imdir=reduced_path + os.path.sep,
         redo=1,
         nomastersky=True)
Пример #4
0
    amax=0.8,
    reject_sat=False,
    save_select=True,
    noplot=False)

science_dict = preproc.choose_science(
    'lmi',
    workdir='/mnt/data/GW_TOO_18Aug2019/DG19yjnjc/',
    targetdir='/work/data/GW_TOO_18Aug2019/DG19yjnjc/selected/',
    cams=[0],
    auto=True,
    save_select=True,
    calibrate=False,
    noplot=False)

preproc.mkmaster('lmi', bias_calib, 'bias')
preproc.mkmaster('lmi', flat_calib, 'flat')

copyfile('flat_SDSS-Z.fits',
         '/work/data/GW_TOO_18Aug2019/DG19yjnjc/selected/flat_SDSS-Z.fits')
copyfile('bias_C0.fits',
         '/work/data/GW_TOO_18Aug2019/DG19yjnjc/selected/bias_C0.fits')

autoproc(datadir='/work/data/GW_TOO_18Aug2019/DG19yjnjc/selected/',
         imdir='/work/data/GW_TOO_18Aug2019/DG19yjnjc/reduced/',
         redo=1,
         nomastersky=True)

copytree('/work/july/GRB161004A/r/reduced/',
         '/mnt/data/output/july/GRB161004A/r/july/GRB161004A/r/reduced/')
Пример #5
0
#     print('selected_path', selected_path)
#     f_base_path = os.path.join(base_path, filename)
#     print('f_base_path', f_base_path)
#     f_selected_path = os.path.join(selected_path, filename)
#     print('f_selected_path', f_selected_path)
#     print('moving {0} to {1}'.format(f_base_path, f_selected_path))
#     move(f_base_path, f_selected_path)
#
# print('start move files master flats to selected folder')
# for f in glob.glob(os.path.join(base_path, 'flat*.fits')):
#     filename = os.path.basename(f)
#     print('selected_path', selected_path)
#     f_base_path = os.path.join(base_path, filename)
#     print('f_base_path', f_base_path)
#     f_selected_path = os.path.join(selected_path, filename)
#     print('f_selected_path', f_selected_path)
#     print('moving {0} to {1}'.format(f_base_path, f_selected_path))
#     move(f_base_path, f_selected_path)

# autoproc(datadir=selected_path+os.path.sep,
#          imdir=reduced_path+os.path.sep,
#          redo=1, start='makesky', nomastersky=False)
autoproc(datadir=selected_path + os.path.sep,
         imdir=reduced_path + os.path.sep,
         redo=1,
         start='stack',
         debug=True,
         nocrclean=False,
         mastersky=True,
         skyflattarg=True)
Пример #6
0
                                  amin=0.2,
                                  amax=0.8,
                                  reject_sat=False,
                                  save_select=True,
                                  noplot=False)

science_dict = preproc.choose_science(
    'lmi',
    workdir='/mnt/data/july/GRB161004A/r/',
    targetdir='/mnt/data/july/GRB161004A/r/selected/',
    cams=[0],
    auto=True,
    save_select=True,
    calibrate=False,
    noplot=False)

preproc.mkmaster('lmi', bias_calib, 'bias')
preproc.mkmaster('lmi', flat_calib, 'flat')

copyfile('flat_SDSS-R.fits',
         '/mnt/data/july/GRB161004A/r/selected/flat_SDSS-R.fits')
copyfile('bias_C0.fits', '/mnt/data/july/GRB161004A/r/selected/bias_C0.fits')

autoproc(datadir='/mnt/data/july/GRB161004A/r/selected/',
         imdir='/work/july/GRB161004A/r/reduced/',
         redo=1,
         nomastersky=True)

copytree('/work/july/GRB161004A/r/reduced/',
         '/mnt/data/output/july/GRB161004A/r/july/GRB161004A/r/reduced/')