Skip to content

Commit

Permalink
Add filepath@store Part table to Processing
Browse files Browse the repository at this point in the history
  • Loading branch information
kushalbakshi committed Nov 18, 2024
1 parent a2492a8 commit bca5cfe
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions element_calcium_imaging/imaging_no_curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,14 @@ class Processing(dj.Computed):
package_version='' : varchar(16)
"""

class File(dj.Part):
definition = """
-> master
file_name: varchar(255)
---
file: filepath@imaging-processed
"""

# Run processing only on Scan with ScanInfo inserted
@property
def key_source(self):
Expand Down Expand Up @@ -704,6 +712,17 @@ def make(self, key):
raise ValueError(f"Unknown task mode: {task_mode}")

self.insert1(key)
self.File.insert(
[
{
**key,
"file_name": f.relative_to(output_dir).as_posix(),
"file": f,
}
for f in output_dir.rglob("*")
if f.is_file()
]
)


# -------------- Motion Correction --------------
Expand Down

0 comments on commit bca5cfe

Please sign in to comment.