Running PyBDSF¶
This module contains all the functionality to run a FITS image
through the LOFAR source finding software PyBDSF
(https://github.com/lofar-astron/PyBDSF). The class
BDSFImage() creates an object whose attributes can be any number
of PyBDSF parameters. Source finding is performed by calling the
object method find_sources(), which calls the PyBDSF function
process_image() and returns the output object.
-
class
sourcefinding.runbdsf.BDSFImage(image, **kwargs)[source]¶ Bases:
database.dbclasses.ImageObject to be manipulated and read into PyBDSF. Inherits all methods defined for Image class, but overrides initialization. The number of attributes and their values will change based on what the user specifies in the run configuration file.
-
find_sources(**kwargs)[source]¶ Run PyBDSF
process_image()task using object attributes as parameter inputs. ReturnsNoneif PyBDSF fails. Wrapped in a timeout function so processing is killed if taking longer than 5 minutes.
-
get_attr()[source]¶ Return all object attributes as a dictionary. This is fed into
bdsf.process_image()as parameter arguments.
-
minimize_islands()[source]¶ Incrementally increases and decreases the
bdsf.process_image()argumentrms_boxbox size until a minimum number of islands are found. This technique works best on images with significant artifacts where false detections are the biggest concern. This also takes a really long time since it is runningbdsf.process_imagenumerous times, so is probably only ever worth using when analyzing a small number of images.
-
set_rms_box()[source]¶ Sets the PyBDSF
rms_boxparameter to a box size 1/10th of the image size and a step size one third of the box size. This “VLITE default”rms_boxyields slightly better results with fewer artifacts than if left as a free parameter for PyBDSF to calculate. A customrms_boxcan be defined in the configuratrion file which will supersede the one defined here.
-