imager_source_finding

Master Side of the recipe

class lofarpipe.recipes.master.imager_source_finding.imager_source_finding

Master side of imager_source_finder. Collects arguments from command line and pipeline inputs. (for the implementation details see node):

  1. load mapfiles with input images and collect some parameters from The input ingredients.
  2. Call the node recipe.
  3. Validate performance of the node recipe and construct output value.

CommandLine Arguments

A mapfile containing (node, image_path) pairs. The image to look for sources in.

Recipe inputs

Parameters:
  • bdsm_parset_file_run1(FileField) Path to bdsm parameter set for the first sourcefinding run (FileField)
  • bdsm_parset_file_run2x(FileField) Path to bdsm parameter set for the second and later sourcefinding runs (FileField)
  • catalog_output_path(StringField) Path to write the catalog created by bdsm) (StringField)
  • makesourcedb_path(ExecField) Path to makesourcedb executable. (ExecField)
  • mapfile(StringField) Full path of mapfile; containing the succesfull generatedsource list (StringField)
  • sourcedb_map_path(StringField) Full path of mapfile; containing the succesfull generatedsourcedbs (StringField)
  • sourcedb_target_path(StringField) Target path for the sourcedb created based on the found sources (StringField)
  • working_directory(StringField) Working directory used by the nodes: local data (StringField)

Recipe outputs (job.results[parameter])

Parameters:
  • mapfile(StringField) Full path of mapfile; containing the succesfull generated (StringField)
  • sourcedb_map_path(StringField) Full path of mapfile; containing the succesfull generatedsourcedbs (StringField)

Node Side of the recipe

class lofarpipe.recipes.nodes.imager_source_finding.imager_source_finding(job_id, host, port)

The imager_source_finding recipe. In this script a number of pyBDSM call is made. pyBDSM is a source finder which produces a list of sources and images with those sources removed. By using multiple iterations weak sources can be found and indexed.

For (max iter) or (no sources found):

  1. Select correct input image and parset based on the current iteration
  2. Convert the string values retrieved from the parset to python types
  3. Start pybdsm
  4. Export a sourcelist if sources found and save the image with source substracted

And then:

  1. Combine the source lists into a single large sourcelist
  2. Create sourcedb based on the sourcelist and return this
run(input_image, bdsm_parameter_run1_path, bdsm_parameter_run2x_path, catalog_output_path, image_output_path, sourcedb_target_path, environment, working_directory, create_sourcdb_exec)
Parameters:
  • input_image – image to look for sources in
  • bdsm_parameter_run1_path – parset with bdsm parameters for the first run
  • bdsm_parameter_run2x_path – second ron bdsm parameters
  • catalog_output_path – Path to full list of sources found
  • image_output_path – Path to fits image with all sources substracted
  • sourcedb_target_path – Path to store the sourcedb created from containing all the found sources
  • environment – environment for runwithlog4cplus
  • working_directory – Working dir
  • create_sourcdb_exec – Path to create sourcedb executable
Return type:

self.outputs[‘source_db’] sourcedb_target_path

_combine_source_lists(n_itter_sourcefind, catalog_output_path)

Parse and concate the produces sourcelists, files are numbered using the sourcefind iteration. For all sourcefind itterations with sources produced:

  1. Open the file for this itteration

  2. parse the files:

    1. get the format line
    2. skip whiteline
    3. collect all sources as strings
  3. Save the collected data:

    1. The format line (only a single formatter is need, same for each file)
    2. add the sources
    3. finish with an endl
_create_source_db(source_list, sourcedb_target_path, working_directory, create_sourcdb_exec, append=False)

Convert a sourcelist to a sourcedb:

  1. Remove existing sourcedb if not appending (sourcedb fails else)
  2. Call the sourcedb executable with the supplied parameters

Previous topic

imager_awimager

Next topic

imager_finalize

This Page