Skip to content

Add method get_time_array to the File class#186

Merged
rocco8773 merged 28 commits intoBaPSF:masterfrom
rocco8773:add_File_meth__get_time_array
Apr 1, 2026
Merged

Add method get_time_array to the File class#186
rocco8773 merged 28 commits intoBaPSF:masterfrom
rocco8773:add_File_meth__get_time_array

Conversation

@rocco8773
Copy link
Copy Markdown
Member

@rocco8773 rocco8773 commented Mar 23, 2026

The PR adds the get_time_array() method to the bapsflib File class. This method will take either an HDFReadData object generated by File.read_data() or a digitizer information dictionary generated by File.get_digitizer_specs() to build the time array or retrieve the time array from the appropriate dataset.

The time array will be constructing if the digitizer meta-data contains the digitizing "clock rate". If the time series is stored in a dataset indicated by the "time_dset_path" meta-data, then that dataset will be directly retrieved.


  • Created method get_time_array() on the File class.
  • Updated get_digitizer_specs() to retrieve the information dictionary from construct_dataset_name() instead of get_adc_info(). This maintains consistency with the info dict generated by HDFReadData.
  • Fixed bug in the returned info dictionary generated by construct_dataset_name, where the mapping configs dictionary would be modified if that returned dictionary was modified.
  • Updated all tests to maintain required coverage.

@rocco8773 rocco8773 added enhancement HDF5 Utility issue related to interfacing with HDF5 files labels Mar 23, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.86%. Comparing base (e173bf2) to head (191319b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #186      +/-   ##
==========================================
+ Coverage   98.71%   98.86%   +0.14%     
==========================================
  Files          54       54              
  Lines        3729     3772      +43     
  Branches      717      727      +10     
==========================================
+ Hits         3681     3729      +48     
+ Misses         43       39       -4     
+ Partials        5        4       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…so we do NOT modify the entry in the configs dict
@rocco8773 rocco8773 merged commit f951589 into BaPSF:master Apr 1, 2026
24 checks passed
@rocco8773 rocco8773 deleted the add_File_meth__get_time_array branch April 1, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement HDF5 Utility issue related to interfacing with HDF5 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant