update main script for pylsp
This commit is contained in:
@@ -10,7 +10,6 @@ from copy import deepcopy
|
||||
import lib.fits as proj_fits # Functions to handle fits files
|
||||
import lib.reduction as proj_red # Functions used in reduction pipeline
|
||||
import lib.plots as proj_plots # Functions for plotting data
|
||||
from lib.deconvolve import from_file_psf
|
||||
from lib.query import retrieve_products, path_exists, system
|
||||
from matplotlib.colors import LogNorm
|
||||
|
||||
@@ -20,6 +19,7 @@ def main(target=None, proposal_id=None, infiles=None, output_dir="./data", crop=
|
||||
# Deconvolution
|
||||
deconvolve = False
|
||||
if deconvolve:
|
||||
# from lib.deconvolve import from_file_psf
|
||||
psf = 'gaussian' # Can be user-defined as well
|
||||
# psf = from_file_psf(data_folder+psf_file)
|
||||
psf_FWHM = 0.15
|
||||
@@ -66,8 +66,7 @@ def main(target=None, proposal_id=None, infiles=None, output_dir="./data", crop=
|
||||
SNRi_cut = 30. # I measurments with SNR>30, which implies an uncertainty in P of 4.7%.
|
||||
flux_lim = None # lowest and highest flux displayed on plot, defaults to bkg and maximum in cut if None
|
||||
vec_scale = 3
|
||||
step_vec = 1 #plot all vectors in the array. if step_vec = 2, then every other vector will be plotted
|
||||
# if step_vec = 0 then all vectors are displayed at full length
|
||||
step_vec = 1 # plot all vectors in the array. if step_vec = 2, then every other vector will be plotted if step_vec = 0 then all vectors are displayed at full length
|
||||
|
||||
##### Pipeline start
|
||||
## Step 1:
|
||||
@@ -87,7 +86,7 @@ def main(target=None, proposal_id=None, infiles=None, output_dir="./data", crop=
|
||||
data_folder = prod[0][0]
|
||||
try:
|
||||
plots_folder = data_folder.replace("data", "plots")
|
||||
except:
|
||||
except ValueError:
|
||||
plots_folder = "."
|
||||
if not path_exists(plots_folder):
|
||||
system("mkdir -p {0:s} ".format(plots_folder))
|
||||
@@ -96,11 +95,11 @@ def main(target=None, proposal_id=None, infiles=None, output_dir="./data", crop=
|
||||
|
||||
figname = "_".join([target, "FOC"])
|
||||
if rebin:
|
||||
if not px_scale in ['full']:
|
||||
if px_scale not in ['full']:
|
||||
figtype = "".join(["b", "{0:.2f}".format(pxsize), px_scale]) # additionnal informations
|
||||
else:
|
||||
figtype = "full"
|
||||
if not smoothing_FWHM is None:
|
||||
if smoothing_FWHM is not None:
|
||||
figtype += "_"+"".join(["".join([s[0] for s in smoothing_function.split("_")]), "{0:.2f}".format(smoothing_FWHM), smoothing_scale]) # additionnal informations
|
||||
if align_center is None:
|
||||
figtype += "_not_aligned"
|
||||
|
||||
Reference in New Issue
Block a user