pipeline.infrastructure.utils.conversion

The conversion module contains utility functions.

The conversion module contains utility functions that convert between data types and assist in formatting objects as strings for presentation to the user.

Functions

ant_arg_to_id(ms_path, ant_arg, all_antennas)

Convert a string to the corresponding antenna IDs.

commafy(l[, quotes, multi_prefix, …])

Convert the string list into the textual description.

dequote(s)

Remove any kind of quotes from a string to facilitate comparisons.

field_arg_to_id(ms_path, field_arg, all_fields)

Convert a string to the corresponding field IDs.

flatten(l)

Flatten a list of lists into a single list without pipelineaq.QAScore.

format_datetime(dt[, dp])

Convert a datetime to a formatted string representation.

format_timedelta(td[, dp])

Convert a timedelta to a formatted string representation.

get_epoch_as_datetime(epoch)

Convert a CASA epoch measure into a Python datetime.

mjd_seconds_to_datetime(mjd_secs)

Convert list of MJD seconds to a list of equivalent datetime objects.

range_to_list(arg)

Expand a numeric range expressed in CASA syntax to the list of integer.

safe_split(fields)

Split a string containing field names into a list.

spw_arg_to_id(ms_path, spw_arg, all_spws)

Convert a string to spectral window IDs and channels.

to_CASA_intent(ms, intents)

Convert pipeline intents back to the equivalent intents recorded in the measurement set.

to_pipeline_intent(ms, intents)

Convert CASA intents to pipeline intents.

unix_seconds_to_datetime(unix_secs)

Convert list of UNIX epoch times to a list of equivalent datetime objects.

Classes

LoggingLRUCache(name, *args, **kwargs)

‘Least recently used’ cache that logs when cache entries are evicted.