ctdcal.process_ctd.cast_details

ctdcal.process_ctd.cast_details(df, ssscc, log_file=None)[source]

We determine the cast details using pandas magic. First find alternating periods of pumps on and pumps off, then select the pumps on period with the highest pressure. Get values from the row with the highest pressure, and return all values to be sent to log.

Parameters
  • df (DataFrame) – Filtered CTD data

  • ssscc (integer) – The station and cast, as SSSCC format

  • log_file (file handle or string) – File destination for cast details

Returns

df_downcast – CTD data with the soak period and upcast trimmed off

Return type

DataFrame

Notes

The following (float) variables are output to log_file: time_start : Time at start of cast (in unix epoch time) time_end : Time at end of cast (in unix epoch time) time_bottom : Time at bottom of cast (in unix epoch time) p_start : Pressure at which cast started p_max : Bottom of the cast pressure b_lat : Latitude at bottom of cast b_lon : Longitude at bottom of cast b_alt : Altimeter reading at bottom of cast