Features.fetch_habds_and_wilds

Features.fetch_habds_and_wilds(update=False, pickle_it=False, data_dir=None, verbose=False)[source]

Fetch codes of HABDs and WILDs from local backup.

Parameters
  • update (bool) – whether to check on update and proceed to update the package data, defaults to False

  • pickle_it (bool) – whether to replace the current package data with newly collected data, defaults to False

  • data_dir (str or None) – name of package data folder, defaults to None

  • verbose (bool) – whether to print relevant information in console as the function runs, defaults to False

Returns

data of hot axle box detectors (HABDs) and wheel impact load detectors (WILDs), and date of when the data was last updated

Return type

dict

Example:

>>> from pyrcs.other_assets import Features

>>> features = Features()

>>> habds_and_wilds_codes_dat = features.fetch_habds_and_wilds()

>>> habds_and_wilds_codes = habds_and_wilds_codes_dat['HABD and WILD']
>>> type(habds_and_wilds_codes)
<class 'dict'>
>>> print(list(habds_and_wilds_codes.keys()))
['HABD', 'WILD']

>>> habd = habds_and_wilds_codes['HABD']
>>> print(habd.head())
    ELR  ...                                              Notes
0  BAG2  ...
1  BAG2  ...  installed 29 September 1997, later adjusted to...
2  BAG2  ...                             previously at 74m 51ch
3  BAG2  ...                          removed 29 September 1997
4  BAG2  ...            present in 1969, later moved to 89m 0ch

[5 rows x 5 columns]