def __init__(self): data = [ ["data_dir", None, "Base data directory", validator_is(str), str, str, 0], ["fits_extension", 0, "Extension index", validator_is(int), int, str, 0], ["stack_image_filename", "full_stack_image.fits", "Stack Image filename", nputils.validator_is(str), str, str, 2], ["ref_image_filename", "reference_image", "Reference image filename", validator_is(str), str, str, 0], ["mask_filename", "mask.fits", "Mask filename", validator_is(str), str, str, 0], ["bg_fct", None, "Background extraction fct", is_callable, None, None, 2], ["bg_coords", None, "Background region in coordinates [Xa,Ya,Xb,Yb]", validator_list(4, (int, float)), str2floatlist, jp.encode, 0], ["bg_use_ksigma_method", False, "Use ksigma method to estimate the background level", validator_is(bool), str2bool, str, 0], ["roi_coords", None, "Region of interest in coordinates [Xa,Ya,Xb,Yb]", validator_list(4, (int, float)), str2floatlist, jp.encode, 0], ["core_offset_filename", "core.dat", "Core offset filename", validator_is(str), str, str, 0], ["core_offset_fct", None, "Core offset generation fct", is_callable, None, None, 2], ["pre_bg_process_fct", None, "Initial processing before bg extraction", is_callable, None, None, 2], ["pre_process_fct", None, "Pre detection processing", is_callable, None, None, 2], ["post_process_fct", None, "Post detection processing", is_callable, None, None, 2], ["crval", None, "CRVAL", validator_is(list), jp.decode, jp.encode, 1], ["crpix", None, "CRPIX", validator_is(list), jp.decode, jp.encode, 1], ["projection_unit", u.mas, "Unit used for the projection", validator_is(u.Unit), u.Unit, str, 0], ["projection_relative", True, "Use relative projection", validator_is(bool), str2bool, str, 0], ["projection_center", "pix_ref", "Method used to get the center", validator_is(str), str, str, 0], ["object_distance", None, "Object distance", validator_is(u.Quantity), quantity_decode, str, 0], ["object_z", 0, "Object z", validator_in_range(0, 5), float, str, 0], ] # nputils.BaseConfiguration.__init__(self, data, title="Finder configuration") super(DataConfiguration, self).__init__(data, title="Data configuration")
def __init__(self): data = [ ["unit", u.mas / u.year, "Velocity unit", nputils.validator_is(u.Unit)], ["bounds", [1, 1, 1, 1], "Velocity bounds", nputils.validator_list(4, (int, float))], ["filter1", None, "Filter for the first image", nputils.validator_is((NoneType, nputils.AbstractFilter))], ["filter2", None, "Filter for the second image", nputils.validator_is((NoneType, nputils.AbstractFilter))], ["tol_pix_range", [4, 25], "Allowed range of pixel velocity resolution", nputils.validator_list(2, int)], ["ncc_threshold", 0.6, "Threshold for the NCC", nputils.validator_is(bool)], ["factor", 10, "Zoom factor of the resulting map", nputils.validator_in_range(1, 20)], ["method", 'ncc_peaks_direct', "Method used to compute the SCC", lambda v: v in ['ncc', 'ncc_peaks', 'ncc_peaks_direct']], ["vector_direction", None, "Project the result on this direction", lambda v: v == 'position_angle' or nputils.is_callable(v) or isinstance(v, (list, np.ndarray, NoneType))], ["velocity_trans", None, "Do any transform on the velocity vector, pre projection", lambda v: nputils.is_callable(v)], ["rnd_pos_shift", False, "Randomly shift the segments position", nputils.validator_is((bool, NoneType))], ["rnd_pos_factor", 1.5, "Factor of the standart deviation of the shift", nputils.validator_in_range(0.1, 5)], ["img_rnd_shift", 0, "Randomly shift the images (pixel std)", nputils.validator_in_range(0, 10)], ["shuffle", False, "Suffle the list of images", nputils.validator_is(bool)], ] nputils.BaseConfiguration.__init__(self, data, title="Stack cross correlation configuration")
def __init__(self): data = [ [ "unit", u.mas / u.year, "Velocity unit", nputils.validator_is(u.Unit) ], [ "bounds", [1, 1, 1, 1], "Velocity bounds", nputils.validator_list(4, (int, float)) ], [ "filter1", None, "Filter for the first image", nputils.validator_is((NoneType, nputils.AbstractFilter)) ], [ "filter2", None, "Filter for the second image", nputils.validator_is((NoneType, nputils.AbstractFilter)) ], [ "tol_pix_range", [4, 25], "Allowed range of pixel velocity resolution", nputils.validator_list(2, int) ], [ "ncc_threshold", 0.6, "Threshold for the NCC", nputils.validator_is(bool) ], [ "factor", 10, "Zoom factor of the resulting map", nputils.validator_in_range(1, 20) ], [ "method", 'ncc_peaks_direct', "Method used to compute the SCC", lambda v: v in ['ncc', 'ncc_peaks', 'ncc_peaks_direct'] ], [ "vector_direction", None, "Project the result on this direction", lambda v: v == 'position_angle' or nputils.is_callable( v) or isinstance(v, (list, np.ndarray, NoneType)) ], [ "velocity_trans", None, "Do any transform on the velocity vector, pre projection", lambda v: nputils.is_callable(v) ], [ "rnd_pos_shift", False, "Randomly shift the segments position", nputils.validator_is((bool, NoneType)) ], [ "rnd_pos_factor", 1.5, "Factor of the standart deviation of the shift", nputils.validator_in_range(0.1, 5) ], [ "img_rnd_shift", 0, "Randomly shift the images (pixel std)", nputils.validator_in_range(0, 10) ], [ "shuffle", False, "Suffle the list of images", nputils.validator_is(bool) ], ] nputils.BaseConfiguration.__init__( self, data, title="Stack cross correlation configuration")
def __init__(self): data = [ [ "data_dir", None, "Base data directory", validator_is(str), str, str, 0 ], [ "fits_extension", 0, "Extension index", validator_is(int), int, str, 0 ], [ "stack_image_filename", "full_stack_image.fits", "Stack Image filename", nputils.validator_is(str), str, str, 2 ], [ "ref_image_filename", "reference_image", "Reference image filename", validator_is(str), str, str, 0 ], [ "mask_filename", "mask.fits", "Mask filename", validator_is(str), str, str, 0 ], [ "bg_fct", None, "Background extraction fct", is_callable, None, None, 2 ], [ "bg_coords", None, "Background region in coordinates [Xa,Ya,Xb,Yb]", validator_list(4, (int, float)), str2floatlist, jp.encode, 0 ], [ "bg_use_ksigma_method", False, "Use ksigma method to estimate the background level", validator_is(bool), str2bool, str, 0 ], [ "roi_coords", None, "Region of interest in coordinates [Xa,Ya,Xb,Yb]", validator_list(4, (int, float)), str2floatlist, jp.encode, 0 ], [ "core_offset_filename", "core.dat", "Core offset filename", validator_is(str), str, str, 0 ], [ "core_offset_fct", None, "Core offset generation fct", is_callable, None, None, 2 ], [ "pre_bg_process_fct", None, "Initial processing before bg extraction", is_callable, None, None, 2 ], [ "pre_process_fct", None, "Pre detection processing", is_callable, None, None, 2 ], [ "post_process_fct", None, "Post detection processing", is_callable, None, None, 2 ], [ "crval", None, "CRVAL", validator_is(list), jp.decode, jp.encode, 1 ], [ "crpix", None, "CRPIX", validator_is(list), jp.decode, jp.encode, 1 ], [ "projection_unit", u.mas, "Unit used for the projection", validator_is(u.Unit), u.Unit, str, 0 ], [ "projection_relative", True, "Use relative projection", validator_is(bool), str2bool, str, 0 ], [ "projection_center", "pix_ref", "Method used to get the center", validator_is(str), str, str, 0 ], [ "object_distance", None, "Object distance", validator_is(u.Quantity), quantity_decode, str, 0 ], [ "object_z", 0, "Object z", validator_in_range(0, 5), float, str, 0 ], ] # nputils.BaseConfiguration.__init__(self, data, title="Finder configuration") super(DataConfiguration, self).__init__(data, title="Data configuration")