read_inputs.py Functions
Functions to read and validate input arguments.
- obsfind.read_inputs.check_type(name: str, val: str, req_type: type)
Check the arguments type.
- Inputs
name : Name of the argument to be checked. val : Value of the argument to be checked. req_type : Required type for the argument.
- Output
Value of the argument if the type is correct, otherwise raises an error.
- obsfind.read_inputs.create_date_list(start_date: Time, end_date: Time) list[astropy.time.core.Time]
Creates a list of dates from start_date to end_date, inclusive.
- Inputs
start_date : astropy Time() object for the start date. end_date : astropy Time() object for the end date.
- Output
List of astropy Time() objects for each day in the range.
- obsfind.read_inputs.parse_args() Namespace
Parse command line arguments for the observability finder script.
- Returns
Parsed command line arguments.
- obsfind.read_inputs.read_target_list(fname: Path) list[str]
Reads the target list from a file.
- Inputs
fname : Path to the target list file.
- Output
List of target names (strings) read from the file.
- obsfind.read_inputs.validate_args(args: Namespace) Namespace
Validates the arguments passed to the script.
- Inputs
args : Parsed command line arguments.
- Output
Validated command line arguments.