Re: [sima-users] OSError while applying motion correction

8 views
Skip to first unread message

Jeff Zaremba

unread,
Feb 26, 2018, 10:29:49 AM2/26/18
to sahar pirmoradian, sima-users
Hi Sahar,

Sequence.create should not actually create the sequence.pkl file. That happens when you initialize the full dataset, either explicitly (sima.ImagingDataset(sequences, dataset_path)) or as the output of motion correction. So, if you skip the line `dataset = ...`  above, it should work fine.

The relevant section of our example workflow script is here:
https://github.com/losonczylab/sima/blob/24694b94c22f95b16659236ce311d698e4251e98/examples/workflow.py#L43-L71.


Hope this helps.

Best,
Jeff

On Fri, Feb 23, 2018 at 2:36 PM, sahar pirmoradian <sahar.pi...@gmail.com> wrote:
Hello,

I am constantly getting the error "OSError: [Errno 17] File exists" because it seems whatever changes I want to do to a dataset, e.g. motion correction, the system tries to rewrite the same file and it gives errors because it already exists. For instance (plz read my comments next to each line):

dataset_path = 'example_TIFF.sima' 

sequences = [sima.Sequence.create('TIFF', 'example_Ch1.tif')]  # it creates dataset_path/sequences.pkl

dataset = sima.ImagingDataset(sequences, dataset_path)  # it creates dataset_path/dataset.pkl

correction_approach = sima.motion.HiddenMarkov2D() 

dataset = correction_approach.correct(sequences, dataset_path) # it again wants to create dataset_path/dataset.pkl but it fails, as the file already exists

OSError: [Errno 17] File exists: '/User/ImageAnalysis/sim_tutorial/example_TIFF.sima'

Thank you,
Sahar

--
You received this message because you are subscribed to the Google Groups "sima-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sima-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sima-users/d3d61536-9745-43c1-bacd-a3072f8a651f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages