imager_awimager
*Master Side of the recipe *
-
class lofarpipe.recipes.master.imager_awimager.imager_awimager
Master script for the awimager. Collects arguments from command line and
pipeline inputs.
- Load mapfiles and validate these
- Run the awimage node scripts
- Retrieve output. Construct output map file succesfull runs
Details regarding the implementation of the imaging step can be found in
the node recipe
CommandLine Arguments
A mapfile containing (node, datafile) pairs. The measurements set use as
input for awimager executable
Recipe inputs
Parameters: |
- executable – (ExecField) The full path to the awimager executable (ExecField)
- mapfile – (StringField) Full path for output mapfile. A list of thesuccessfully generated images will be written here (StringField)
- mask_patch_size – (FloatField) Scale factor for patches in the awimager mask (FloatField)
- output_image – (StringField) Path of the image to be create by the awimager (StringField)
- parset – (FileField) The full path to a awimager configuration parset. (FileField)
- sourcedb_path – (StringField) Full path of sourcedb used to create a mask for known sources (StringField)
- working_directory – (StringField) Working directory used on output nodes. Results location (StringField)
|
Recipe outputs (job.results[parameter])
Parameters: | mapfile – (StringField) (StringField) |
-
go()
This member contains all the functionality of the imager_awimager.
Functionality is all located at the node side of the script.
*Node Side of the recipe*
-
class lofarpipe.recipes.nodes.imager_awimager.imager_awimager(job_id, host, port)
-
run(executable, environment, parset, working_directory, output_image, concatenated_measurement_set, sourcedb_path, mask_patch_size)
Parameters: |
- executable – Path to awimager executable
- environment – environment for catch_segfaults (executable runner)
- parset – parameters for the awimager,
- working_directory – directory the place temporary files
- output_image – location and filesname to story the output images
the multiple images are appended with type extentions
- concatenated_measurement_set – Input measurement set
- sourcedb_path – Path the the sourcedb used to create the image
mask
- mask_patch_size – Scaling of the patch around the source in the
mask
|
Return type: | self.outputs[“image”] The path to the output image
|
-
_calc_par_from_measurement(measurement_set, parset)
(1) calculate and format some parameters that are determined runtime.
Based on values in the measurementset and input parameter (set):
- <string> The cellsize
- <int> The npixels in a each of the two dimension of the image
- <string> The largest baseline in the ms smaller then the maxbaseline
- <string> The number of projection planes
The calculation of these parameters is done in three steps:
- Calculate intermediate results based on the ms.
- The calculation of the actual target values using intermediate
result
- Scaling of cellsize and npix to allow for user input of the npix
-
_create_mask(npix, cell_size, output_image, concatenated_measurement_set, executable, working_directory, log4_cplus_name, sourcedb_path, mask_patch_size, image_path_directory)
(3) create a casa image containing an mask blocking out the
sources in the provided sourcedb.
It expects:
- the ms for which the mask will be created, it is used to de
termine some image details: (eg. pointing)
- parameters for running within the catchsegfault framework
- and the size of the mask_pach.
To create a mask, first a empty measurement set is created using
awimager: ready to be filled with mask data
This function is a wrapper around some functionality written by:
fdg@mpa-garching.mpg.de
steps:
1. Create a parset with image paramters used by:
2. awimager run. Creating an empty casa image.
3. Fill the casa image with mask data
-
_msss_mask(mask_file_path, sourcedb_path, mask_patch_size=1.0)
Fill casa image with a mask based on skymodel(sourcedb)
Bugs: fdg@mpa-garching.mpg.de
pipeline implementation klijn@astron.nl
version 0.32
- Edited by JDS, 2012-03-16:
- Properly convert maj/minor axes to half length
- Handle empty fields in sky model by setting them to 0
- Fix off-by-one error at mask boundary
- FIXED BUG
- if a source is outside the mask, the script ignores it
- if a source is on the border, the script draws only the inner part
- can handle skymodels with different headers
- KNOWN BUG
- not works with single line skymodels, workaround: add a fake
source outside the field
- mask patched display large amounts of aliasing. A possible
sollution would
be normalizing to pixel centre. ( int(normalize_x * npix) /
npix + (0.5 /npix))
ideally the patch would increment in pixel radiuses
- Version 0.3 (Wouter Klijn, klijn@astron.nl)
- Usage of sourcedb instead of txt document as ‘source’ of sources
This allows input from different source sources
- Version 0.31 (Wouter Klijn, klijn@astron.nl)
- Adaptable patch size (patch size needs specification)
- Patch size and geometry is broken: needs some astronomer magic to
fix it, problem with afine transformation prol.
- Version 0.32 (Wouter Klijn, klijn@astron.nl)
- Renaming of variable names to python convention