Ejemplo n.º 1
0
definition.add_optional("max_pixelscale", "quantity",
                        "maximum pixelscale for rebinning")

# Add input section
#definition.add_section("input", "the names of the input files")
#definition.sections["input"].add_required("image", "image_path", "name of the input image")
#definition.sections["input"].add_optional("galaxy_region", "file_path", "file with galaxy regions", "galaxies.reg")
#definition.sections["input"].add_optional("star_region", "file_path", "file with star regions", "stars.reg")
#definition.sections["input"].add_optional("saturation_region", "file_path", "file with regions for saturated stars", "saturation.reg")
#definition.sections["input"].add_optional("other_region", "file_path", "file with regions for other contaminating sources", "other_sources.reg")
#definition.sections["input"].add_optional("segments", "file_path", "image with segmentation maps (as planes 'galaxies', 'stars' and 'other_sources')", "segments.fits")

# Number of parallel processes
definition.add_optional("nprocesses", "integer",
                        "number of parallel processes for the preparation",
                        max(8, ncores()))

definition.add_optional(
    "error_frame_names", "string_list",
    "the names of error planes to be included in the final error map")

definition.add_flag("write_steps", "write the results of intermediate steps")

# Sky subtraction
definition.add_flag("write_sky_apertures",
                    "write sky apertures and sky annulus")
definition.add_optional(
    "sky_apertures_path", "directory_path",
    "the path to the directory where the aperture frames and annulus region should be written to"
)
Ejemplo n.º 2
0
Archivo: model.py Proyecto: rag9704/PTS
definition.add_flag("make_poisson", "make the poisson error mosaic maps", True)
definition.add_flag(
    "perform_photometry",
    "perform photometry (as opposed to just using the DustPedia photometry",
    True)
definition.add_flag("sources_weak", "weak source finding", False)

definition.add_flag(
    "sources_manual",
    "don't find sources, but mark them from the catalog, and let the selection be done manually",
    False)

# Parallelization
definition.add_optional(
    "nprocesses", "positive_integer",
    "number of processes to use for parallel computations", max(8, ncores()))

definition.add_optional("fitting_method",
                        "string",
                        "fitting method",
                        default_fitting_method,
                        choices=fitting_methods)

definition.add_optional("rerun_preparation_step",
                        "string",
                        "rerun a certain preparation step for all images",
                        choices=steps)

if cache_host_id is not None:
    definition.add_flag("cache",
                        "cache unimportant data to the remote host storage",
Ejemplo n.º 3
0
from pts.core.basics.configuration import ConfigurationDefinition
from pts.dustpedia.core.sdss import sdss_bands
from pts.core.tools.parallelization import ncores

# -----------------------------------------------------------------

# Configuration
definition = ConfigurationDefinition()

# Galaxy name
definition.add_required("galaxy_name", "string", "the name of the galaxy")
definition.add_optional("bands", "string_list", "the bands (u/g/r/i/z)", choices=sdss_bands, default=sdss_bands)

# Output
definition.add_optional("output", "string", "the name of the output directory", default="out")

# Advanced options
definition.add_optional("max_nobservations_u", "positive_integer", "maximum number of u band observations")
definition.add_optional("max_nobservations_g", "positive_integer", "maximum number of g band observations")
definition.add_optional("max_nobservations_r", "positive_integer", "maximum number of r band observations")
definition.add_optional("max_nobservations_i", "positive_integer", "maximum number of i band observations")
definition.add_optional("max_nobservations_z", "positive_integer", "maximum number of z band observations")

# Parallelization
definition.add_optional("nprocesses", "positive_integer", "number of processes for parallel execution", max(8, ncores()))

# Advanced
definition.add_optional("fields_directories", "string_string_dictionary", "dictionary of fields directories where the keys are the bands")

# -----------------------------------------------------------------
Ejemplo n.º 4
0
definition = definition.copy()

# Add required arguments
definition.add_positional_optional("image", "string", "name of the image for which to run the preparation")

# Add optional arguments
definition.add_optional("exclude_filters", "string_list", "exclude the data for these filters from the procedure that brings all data to the same resolution and pixelscale")
definition.add_flag("steps", "write the results of intermediate steps")
definition.add_flag("visualise", "make visualisations")

# Remote preparation
definition.add_optional("remote", "string", "remote host on which to run the preparation", choices=find_host_ids())
definition.add_flag("attached", "run remotely in attached mode")

# Parallelization
definition.add_optional("nprocesses", "positive_integer", "number of parallel processes for parallel computations", max(8, ncores()))

# Advanced
definition.add_flag("dustpedia_aperture", "use the DustPedia aperture instead of the galaxy region for the sky subtraction", True)
definition.add_optional("aperture_galaxy_region_factor", "real", "if the galaxy region is used for the aperture, use this scaling factor on the region", 1.5)

# Sky subtraction
definition.add_optional("sky_estimation_method", "string", "sky estimation method", "photutils")
definition.add_optional("sky_interpolation_method", "string", "interpolation method for photutils sky frame", "polynomial")
definition.add_optional("noise_interpolation_method", "string", "interpolation method for photutils noise frame", "idw")
definition.add_optional("sky_photutils_polynomial_order", "positive_integer", "blabla", 3)
definition.add_optional("sky_photutils_polynomial_fitter", "string", "fitter", "levenberg-marquardt")
definition.add_optional("annulus_inner_factor", "real", "annulus_inner_factor", 1.2)
definition.add_optional("annulus_outer_factor", "real", "annulus_outer_factor", 4.0)
definition.add_flag("interactive_sky", "run the sky subtractor in interactive mode")
Ejemplo n.º 5
0
from pts.magic.config.find_extended import definition as extended_definition
from pts.magic.config.find_other import definition as other_definition
from pts.core.tools.parallelization import ncores

# -----------------------------------------------------------------

# Create the configuration definition
definition = ConfigurationDefinition()

# The dataset or image
definition.add_positional_optional("dataset", "file_path",
                                   "name of the dataset file or image file")

# Number of parallel processes
definition.add_optional("nprocesses", "integer",
                        "number of parallel processes", max(8, ncores()))

# Flags to turn features on and off
definition.add_flag("find_galaxies", "find galaxies in the images", True)
definition.add_flag("find_stars", "find stars in the images", True)
definition.add_flag("find_other_sources", "find other contaminating sources",
                    True)

# Optional settings
definition.add_optional("extended_sources_catalog", "file_path",
                        "catalog file for extended sources")
definition.add_optional("point_sources_catalog", "file_path",
                        "catalog file for point sources")

# Regions
definition.add_optional(