Source Exporter API

These classes provide source exporting (ds9, ascii, …) functionalities Defined in src/imgproc/SourceExporter.h

class Caesar::SourceExporter : public TObject

Public Functions

SourceExporter()

Class constructor: initialize structures.

virtual ~SourceExporter()

Class destructor: free allocated memory.

Public Static Functions

static int WriteToAscii(std::string filename, const std::vector<Source*> &sources, bool dumpNestedSourceInfo = true, int wcsType = eJ2000, WCS *wcs = 0, bool writeAdditionalSourceInfo = false, bool convertBrightnessToFlux = true, char delimiter = '\t')

Write source collection to ascii file.

static const std::vector<std::string> SourceToAscii(Source *source, bool dumpNestedSourceInfo = true, int wcsType = eJ2000, WCS *wcs = 0, bool writeAdditionalSourceInfo = false, bool convertBrightnessToFlux = true, char delimiter = '\t')

Get source ascii string.

static int WriteComponentsToAscii(std::string filename, const std::vector<Source*> &sources, bool dumpNestedSourceInfo = true, int wcsType = eJ2000, WCS *wcs = 0, bool writeAdditionalSourceInfo = false, bool convertBrightnessToFlux = true, char delimiter = '\t')

Write ascii file from source component collection.

static const std::vector<std::string> SourceComponentsToAscii(Source *source, bool dumpNestedSourceInfo = true, int wcsType = eJ2000, WCS *wcs = 0, bool writeAdditionalSourceInfo = false, bool convertBrightnessToFlux = true, char delimiter = '\t')

Get source component ascii string.

static int WriteToFullJson(std::string filename, const std::vector<Source*> &sources, bool dumpNestedSourceInfo = true, int wcsType = eJ2000, WCS *wcs = 0, bool convertBrightnessToFlux = true)

Write json file from source collection.

static int FillJsonMetadata(Json::Value &json, ImgMetaData *metadata)

Fill json metadata fields.

static int FillJsonSource(Json::Value &json, Source *source, bool dumpNestedSourceInfo = true, WCS *wcs = 0, int index = -1, int parent_index = -1, int parent_island_index = -1, bool convertBrightnessToFlux = true)

Fill json source island fields.

static int FillJsonSourceIsland(Json::Value &json, Source *source, WCS *wcs = 0, int parent_index = -1, int parent_island_index = -1, bool convertBrightnessToFlux = true)

Fill json source island fields.

static int FillJsonSourceComponents(Json::Value &json, Source *source, WCS *wcs = 0, bool convertBrightnessToFlux = true)

Fill json source components fields.

static int WriteToJson(std::string filename, const std::vector<Source*> &sources, bool dumpNestedSourceInfo = true, int wcsType = eJ2000, WCS *wcs = 0)

Write json file from source collection.

static int SourceToJson(std::vector<Json::Value> &jsonValues, Source *source, bool dumpNestedSourceInfo = true, int wcsType = eJ2000, WCS *wcs = 0)

Get source json object.

static int WriteComponentsToJson(std::string filename, const std::vector<Source*> &sources, bool dumpNestedSourceInfo = true, int wcsType = eJ2000, WCS *wcs = 0)

Write json file from source component collection.

static int SourceComponentsToJson(std::vector<Json::Value> &jsonValues, Source *source, bool dumpNestedSourceInfo = true, int wcsType = eJ2000, WCS *wcs = 0)

Get source component json object.

static int WriteToROOT(std::string filename, const std::vector<Source*> &sources, bool dumpNestedSourceInfo = true, int wcsType = eJ2000, WCS *wcs = 0, bool writeAdditionalSourceInfo = false)

Write ROOT file with TTree from source collection.

static int WriteComponentsToROOT(std::string filename, const std::vector<Source*> &sources, bool dumpNestedSourceInfo = true, int wcsType = eJ2000, WCS *wcs = 0, bool writeAdditionalSourceInfo = false)

Write ROOT file with TTree from source fit component collection.

static int WriteToDS9(std::string filename, const std::vector<Source*> &sources, bool convertDS9RegionsToWCS = false, int ds9WCSType = eJ2000, int ds9RegionFormat = ePolygonRegion, WCS *wcs = 0, std::string ds9RegionColor = "red")

Write DS9 regions from source collection.

static int WriteComponentsToDS9(std::string filename, const std::vector<Source*> &sources, bool convertDS9RegionsToWCS = false, int ds9WCSType = eJ2000, WCS *wcs = 0, std::string ds9RegionColor = "red")

Write DS9 regions for source fitted components.

static const std::string SourceToDS9Region(Source *source, bool dumpNestedSourceInfo = false, bool convertToWCS = false, WCS *wcs = 0, int coordSystem = -1)

Get DS9 region info.

static const std::string SourceToDS9EllipseRegion(Source *source, bool dumpNestedSourceInfo = false)

Get DS9 ellipse info.

static const std::string SourceToDS9FittedEllipseRegion(Source *source, bool useFWHM = true, bool dumpNestedSourceInfo = false, bool convertToWCS = false, WCS *wcs = 0, int coordSystem = -1)

Get DS9 fitted ellipse info.