You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not recalculate drift, just load output of drift_check for post-stimulus drift into ephys_data (read csv)
If p-val is less than threshold (default = 0.05), then mark unit as unstable. Store vector of stable/unstable units as attribute in ephys_data
The text was updated successfully, but these errors were encountered:
The issue involves adding the ability to get "stable" units from ephys_data without recalculating drift. The following suggestions and changes were made by the agents:
Description: Contains the main implementation of the ephys_data class or module. Modifications here involve adding functionality to load the output of drift checks and mark units as stable or unstable based on the p-value threshold.
Description: Handles drift checking utilities. It may need to be referenced or modified to ensure that the drift check results can be loaded into ephys_data.
Suggested Changes:
Modify ephys_data.py:
Add a method to load drift check results from a CSV file and mark units as stable or unstable based on a p-value threshold.
Add an attribute to store the stability status of each unit.
Implement logic to mark units as stable or unstable using the p-value threshold.
Code Implementation:
# Add this method to the ephys_data classdefload_drift_check_results(self, csv_path, p_val_threshold=0.05):
""" Load drift check results from a CSV file and mark units as stable or unstable. Parameters: - csv_path: Path to the CSV file containing drift check results. - p_val_threshold: Threshold for p-value to determine stability (default=0.05). """# Load the CSV filedrift_results=pd.read_csv(csv_path)
# Assume the CSV has columns 'unit' and 'p_value'self.stable_units=drift_results['p_value'] >=p_val_threshold# Store the stability vector as an attributeself.unit_stability=self.stable_units.to_numpy()
print("Loaded drift check results and marked units as stable/unstable.")
Integration and Testing:
Integrate the new method in the appropriate place in the workflow.
Update the documentation for the ephys_data class to reflect the new functionality.
Test the implementation with a sample CSV file to ensure correct functionality.
By following these steps, the ability to get "stable" units from ephys_data can be added as specified in the issue.
This response was automatically generated by blech_bot
Do not recalculate drift, just load output of drift_check for post-stimulus drift into ephys_data (read csv)
If p-val is less than threshold (default = 0.05), then mark unit as unstable. Store vector of stable/unstable units as attribute in ephys_data
The text was updated successfully, but these errors were encountered: