ctdclient.model.dshipcaller module

class ctdclient.model.dshipcaller.DshipCaller(config)[source]

Bases: object

Fetches DSHIP information via API or UDP telegram and generates Seabird-specific XML from that.

Parameters:

config (ConfigurationFile)

generate_random_numbers()[source]

A dummy number generator for GUI testing purposes.

call_api(url=None, dict_of_samples=None)[source]

A collection of API calls according to the values in the dict_of_samples, which holds the names of the individual columns in the metadata header and their respective names in the API.

Parameters:
  • url (str | None) – The base url of DSHIP

  • dict_of_samples (dict | None) – The DSHIP values to get

ctdclient.model.dshipcaller.get_station_log(cruise_id)[source]

Retrieve a rudimentary ship station log via the manida DSHIP extension.

Manida is an API-like endpoint to retrieve different ship logs from.

Parameters:

cruise_id (str) – The id of the current cruise

Return type:

None | str

ctdclient.model.dshipcaller.get_ctd_last_event(station_log_json)[source]

Retrieve the last CTD station from a manida export (see get_station_log).

Parameters:

station_log_json (str) – A path to a manida export json file

Return type:

dict

ctdclient.model.dshipcaller.get_station_id(event_json)[source]

Retrieve the station id from a manida export event (see get_station_log).

Parameters:

event_json (dict) – A single station entry from a manida export

Return type:

str

ctdclient.model.dshipcaller.retrieve_station_and_event_info()[source]

Retrieves mandia station log and extracts the last CTD station number.

Return type:

str | None