stiminterp 0.2__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {stiminterp-0.2 → stiminterp-0.2.2}/PKG-INFO +1 -1
  2. {stiminterp-0.2 → stiminterp-0.2.2}/stiminterp/pipeline.py +1 -3
  3. {stiminterp-0.2 → stiminterp-0.2.2}/stiminterp/stim_interpolate.py +4 -2
  4. {stiminterp-0.2 → stiminterp-0.2.2}/stiminterp.egg-info/PKG-INFO +1 -1
  5. {stiminterp-0.2 → stiminterp-0.2.2}/.github/workflows/docs_build_and_deploy.yml +0 -0
  6. {stiminterp-0.2 → stiminterp-0.2.2}/.github/workflows/test_and_deploy.yml +0 -0
  7. {stiminterp-0.2 → stiminterp-0.2.2}/.gitignore +0 -0
  8. {stiminterp-0.2 → stiminterp-0.2.2}/.pre-commit-config.yaml +0 -0
  9. {stiminterp-0.2 → stiminterp-0.2.2}/LICENSE +0 -0
  10. {stiminterp-0.2 → stiminterp-0.2.2}/MANIFEST.in +0 -0
  11. {stiminterp-0.2 → stiminterp-0.2.2}/README.md +0 -0
  12. {stiminterp-0.2 → stiminterp-0.2.2}/pyproject.toml +0 -0
  13. {stiminterp-0.2 → stiminterp-0.2.2}/setup.cfg +0 -0
  14. {stiminterp-0.2 → stiminterp-0.2.2}/stiminterp/__init__.py +0 -0
  15. {stiminterp-0.2 → stiminterp-0.2.2}/stiminterp/load_data/custom_data_loader.py +0 -0
  16. {stiminterp-0.2 → stiminterp-0.2.2}/stiminterp/load_data/scanimage_metadata.py +0 -0
  17. {stiminterp-0.2 → stiminterp-0.2.2}/stiminterp/plotting_hooks/sanity_check.py +0 -0
  18. {stiminterp-0.2 → stiminterp-0.2.2}/stiminterp.egg-info/SOURCES.txt +0 -0
  19. {stiminterp-0.2 → stiminterp-0.2.2}/stiminterp.egg-info/dependency_links.txt +0 -0
  20. {stiminterp-0.2 → stiminterp-0.2.2}/stiminterp.egg-info/requires.txt +0 -0
  21. {stiminterp-0.2 → stiminterp-0.2.2}/stiminterp.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stiminterp
3
- Version: 0.2
3
+ Version: 0.2.2
4
4
  Summary: Photostimulation artifact removal via interpolation
5
5
  Author-email: Sumiya Kuroda <s.kuroda@ucl.ac.uk>
6
6
  License: BSD-3-Clause
@@ -51,9 +51,7 @@ def run_stiminterp(
51
51
 
52
52
  # Save csv
53
53
  if save_stim_df:
54
- csv_path = out_path.with_name(
55
- out_path.name.replace("_corrected.tif", "_stim.csv")
56
- )
54
+ csv_path = out_path.with_name(f"{tif_path.stem}_stim.csv")
57
55
  df_split.to_csv(csv_path, index=False)
58
56
 
59
57
  return None
@@ -152,7 +152,10 @@ def remove_photostim_artefacts(
152
152
  # Steps 4 + 5: patch each bad TTL frame
153
153
  skipped = []
154
154
  try:
155
- for bad_ttl in sorted(bad_ttl_all):
155
+ for i, bad_ttl in enumerate(sorted(bad_ttl_all)):
156
+ print(
157
+ f"Interpolating data loss by photostim {i}/{len(bad_ttl_all)}"
158
+ )
156
159
  for c in range(nchan):
157
160
  bad_movie = bad_ttl * nchan + c
158
161
 
@@ -197,7 +200,6 @@ def remove_photostim_artefacts(
197
200
  dinfo = np.iinfo(out.dtype)
198
201
  corrected = np.clip(flat[bad_idx], dinfo.min, dinfo.max)
199
202
  out[bad_movie] = corrected.reshape(Y, X).astype(out.dtype)
200
-
201
203
  except Exception:
202
204
  _flush_close(out)
203
205
  tmp_tif.unlink(missing_ok=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stiminterp
3
- Version: 0.2
3
+ Version: 0.2.2
4
4
  Summary: Photostimulation artifact removal via interpolation
5
5
  Author-email: Sumiya Kuroda <s.kuroda@ucl.ac.uk>
6
6
  License: BSD-3-Clause
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes