Skip to content

Commit

Permalink
Minor fixes for added Physio properties
Browse files Browse the repository at this point in the history
  • Loading branch information
maestroque committed Jun 24, 2024
1 parent 64cc90f commit 68df7a3
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion physutils/physio.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,14 @@ def check_physio(data, ensure_fs=True, copy=False):
raise ValueError("Provided data does not have valid sampling rate.")
if copy is True:
return new_physio_like(
data, data.data, copy_history=True, copy_metadata=True, copy_suppdata=True
data,
data.data,
copy_history=True,
copy_metadata=True,
copy_suppdata=True,
copy_label=True,
copy_physio_type=True,
copy_computed_metrics=True,
)
return data

Expand All @@ -162,6 +169,9 @@ def new_physio_like(
copy_history=True,
copy_metadata=True,
copy_suppdata=True,
copy_label=True,
copy_physio_type=True,
copy_computed_metrics=True,
):
"""
Makes `data` into physio object like `ref_data`
Expand All @@ -185,6 +195,12 @@ def new_physio_like(
Copy metadata from `ref_physio` to new physio object. Default: True
copy_suppdata : bool, optional
Copy suppdata from `ref_physio` to new physio object. Default: True
copy_label : bool, optional
Copy label from `ref_physio` to new physio object. Default: True
copy_physio_type : bool, optional
Copy physio_type from `ref_physio` to new physio object. Default: True
copy_computed_metrics : bool, optional
Copy computeed_metrics from `ref_physio` to new physio object. Default: True
Returns
-------
Expand Down

0 comments on commit 68df7a3

Please sign in to comment.