Main

soccon.main.aggregate_acoustic(data_dir, out_dir, out_name, subject_ids)

Collects acoustic data in data_dir (processed externally in SPA) into a summary sheet in out_dir.

Parameters:
  • data_dir (str) – Path to directory in which data is stored.

  • out_dir (str) – Path to directory into which summary will be saved

  • out_name (str, optional) – Name of the summary file. Defaults to “ACOUSTIC_SUMMARY”.

  • subject_id (str, optional) – Subject whose data should be analyzed. Defaults to “”.

soccon.main.aggregate_gps(data_dir, out_dir, out_name)

Collects data from process_gps in data_dir into a summary sheet in out_dir.

Parameters:
  • data_dir (str) – Path to directory in which data exists

  • out_dir (str) – Path to directory into which summary will be saved

  • out_name (str, optional) – Name of the summary file. Defaults to “GPS_SUMMARY”.

soccon.main.aggregate_survey(data_dir, out_dir, key_path, out_name)
soccon.main.combine_summaries(out_dir, acoustic_path, gps_path, survey_path, out_name)

Combines summary sheets into single sheet

Parameters:
  • out_dir (str) – Directory into which document will be saved

  • acoustic_path (str, optional) – Path to acoustic summary file. Defaults to “”.

  • gps_path (str, optional) – Path to gps summary file. Defaults to “”.

  • survey_path (str, optional) – Path to survey summary file. Defaults to “”.

  • out_name (str, optional) – Name of output file. Defaults to “COMBINED_SUMMARY”.

soccon.main.process_gps(data_dir, out_dir, subject_ids, quality_thresh)

Runs Forest.Jasmine’s GPS analysis with some user interaction and additional helpful info printed

Parameters:
  • data_dir (str) – _description_

  • out_dir (str) – _description_

  • subject_ids (Union[list, None], optional) – List of subject ids to use. If None, all ids in data_dir are used. Defaults to None.

  • quality_thresh (float, optional) – Data quality threshold. Defaults to 0.05.

soccon.main.process_survey(data_dir, out_dir, key_path, subject_ids, survey_ids, skip_dirs, use_zips, only_redcap, only_beiwe)

Create a cleaned and scored copy of all survey CSVs in data_dir saved in out_dir by survey ID

Parameters:
  • data_dir (str) – Path to root directory where data is stored

  • out_dir (str) – Path to directory in which data will be saved

  • key_path (str) – Path to CSV key containing survey scoring rules

  • subject_ids (list, optional) – List of subject IDs to process. Defaults to None.

  • survey_ids (list, optional) – List of survey IDs to process. Defaults to None.

  • skip_dirs (list, optional) – List of directories names to skip when looking for data. Only use the dir name, not the full path. Defaults to None.

  • use_zips (bool, optional) – Flag to process CSVs in zip files within data_dir. Defaults to False.

  • only_redcap (bool, optional) – Only process redcap data. Mutually exclusive with “only_beiwe”. Defaults to False.

  • only_beiwe (bool, optional) – Only process beiwe data. Mutually exclusive with “only_redcap”. Defaults to False.