srclists¶
-
class
srclists.Component_Info[source]¶ Class to contain an RTS source information
Variables: - comp_type (str) – The component type: either POINT, GAUSSIAN, or SHAPELET
- pa (float) – Position Angle of the component
- major (float) – Major angle of the component
- minor (float) – Minor angle of the component
- shapelet_coeffs (list) – List to contain lists of shapelet coeffs if the source is a SHAPELET
-
class
srclists.RTS_source[source]¶ Class to contain an RTS source information
Variables: - name (str) – Source name
- ras (list) – List of all RA for all components in this source
- decs (list) – List of all Dec for all components in this source
- flux_lines (list) – List to contain list of flux lines for all components in this source
- component_infos (list) – List to contain
Component_Infoclasses for all components in this source
-
srclists.check_rts_or_woden_get_lines(filename)[source]¶ Opens the file at path filename, and splits into lines by return carriage. Ignores all lines commented with #. Uses the first line of the file to determine if this is an RTS or WODEN style srclist
Parameters: filename (string) – Path to a text file Returns: - type (string) – The type of srclist, either “woden” or “rts”
- lines (list) – The lines of the file as string, split by return carriage, in a list
-
srclists.get_RTS_sources(srclist, all_RTS_sources)[source]¶ Takes a path to an RTS srclist, breaks it up into SOURCES, populates this information into RTS_source classes and appends them to all_RTS_sources list
Parameters: - srclist (string) – Path to a texfile of an RTS srclist
- all_RTS_sources (list) – All sources found in srclist are used to populate an
RTS_sourceclass, and appended to all_RTS_sources
Returns: all_RTS_sources – The original all_RTS_sources list, with any new
RTS_sources appendedReturn type: list of
RTS_source
-
srclists.write_singleRTS_from_RTS_sources(RTS_sources, outname, name='combined_name')[source]¶ Takes a list RTS_sources containg RTS_source classes, and writes them out into a single SOURCE RTS srclist of name outname
-
srclists.write_woden_component_as_RTS(lines, outfile, name=False)[source]¶ Take in a number of text lines in the WODEN format and writes them out to outfile in the RTS format
Parameters: - lines (list) – A list of strings, each a line from a WODEN style srclist
- outfile (open(filename) instance) – An opened textfile to write outputs to
- name (string) – If a name is supplied, this is the first component of a SOURCE, which requires extra formatting in an RTS srclist
-
srclists.write_woden_from_RTS_sources(RTS_sources, outname)[source]¶ Takes a list of
RTS_sourceclasses and uses the to write a WODEN style srclist called outnameParameters: - RTS_sources (list) – A list of
RTS_sources to write out to a WODEN style srclist - outname (string) – Path to save the output WODEN srclist text file to
- RTS_sources (list) – A list of