read_object_list¶
-
msumastro.header_processing.patchers.
read_object_list
(directory=None, input_list=None, skip_consistency_check=False, check_radius=20.0, skip_lookup_from_object_name=False)[source]¶ Read a list of objects from a text file.
Parameters: directory : str
Directory containing the file. Default is the current directory,
.
input_list : str, optional
Name of the file or URL of file. Default value is
obsinfo.txt
. If the name is a URL the directory argument is ignored.skip_consistency_check : bool optional
If
True
, skip checking whether objects on the list have unique coordinates given check_radius.check_radius : float, optional
Match radius, in arcminutes. Objects on the list must be separated by an angular distance greater than this for the list to be self-consistent.
skip_lookup_from_object_name : bool, optional
Set to
True
to skip lookup of coordinates from Simbad if RA/Dec are not in the object file.Notes
There are two file formats; one contains just a list of objects, the other has an RA and Dec for each object.
In both types any lines that start with
#
are ignored and treated as comments.- File with list of objects only:
Object coordinates are determined by lookup with Simbad. You should make sure the object names you use are known to simbad.
The first non-comment line MUST be the word
object
and only the wordobject
. It is case sensitive;Object
orOBJECT
will not work.Remaining line(s) are name(s) of object(s), one per line. Case does not matter for object name.
Example:
# my list is below object m101 sz lyn # the next object is after this comment RR LYR
- File with object name and position:
RA and Dec must be J2000.
RA must be given in hours, though it can be either sexagesimal (e.g.
19:25:27.9
) or decimal (e.g.19.423861
).Dec must be given in degrees, though it can be either sexagesimal (e.g.
42:47:3.69
) or decimal (e.g.42.7843583
)The first non-comment line MUST be these words:
object,RA,Dec
. These are column headings for your file. It is not case sensitive; for example, usingDEC
instead ofDec
will work.Each remaining line should be an object name, object RA and Dec. Case does not matter for object name.
Example:
# my list with RA and Dec # RA and Dec are assumed to be J2000 # RA MUST BE IN HOURS # DEC MUST BE IN DEGREES object,RA,Dec m101,14:03:12.583, +54:20:55.50 # note that the leading sign for the Dec is optional if Dec is # positive sz lyn,08:09:35.748, 44:28:17.61 # You can mix sexagesimal and decimal RA/Dec. RR Lyr, 19.423861,42.7843583