Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ophys frames : time of the frame onset? #578

Open
farznaj opened this issue Jun 17, 2019 · 2 comments
Open

ophys frames : time of the frame onset? #578

farznaj opened this issue Jun 17, 2019 · 2 comments
Assignees

Comments

@farznaj
Copy link
Contributor

farznaj commented Jun 17, 2019

@matchings @jeromelecoq

I'd like to know if the values in ophys_frame indicate the time at the onset of a frame? the time at the middle of a frame? or the time at the offset of a frame?

Another way to put this question:
Lets say, dataset.timestamps['ophys_frames'] = [ 7.85277, 7.94601, 8.03926, 8.1325 ...]
does it mean that the first frame is from 7.85277 to 7.94601 sec?

I saw the following in the "convert" code, which makes me think the values indicate the onset of the frames, but I'd like to make sure. Thanks.

vs2p_r = sync_dataset.get_rising_edges('2p_vsync')
vs2p_f = sync_dataset.get_falling_edges(
    '2p_vsync', )  # new sync may be able to do units = 'sec', so conversion can be skipped
vs2p_rsec = vs2p_r / sample_freq
vs2p_fsec = vs2p_f / sample_freq
if use_acq_trigger:  # if 2P6, filter out solenoid artifacts
    vs2p_r_filtered, vs2p_f_filtered = filter_digital(vs2p_rsec, vs2p_fsec, threshold=0.01)
    frames_2p = vs2p_r_filtered
else:  # dont need to filter out artifacts in pipeline data
    frames_2p = vs2p_rsec
# use rising edge for Scientifica, falling edge for Nikon http://confluence.corp.alleninstitute.org/display/IT/Ophys+Time+Sync
# Convert to seconds - skip if using units in get_falling_edges, otherwise convert before doing filter digital
@jeromelecoq
Copy link
Contributor

I think this is will depend on how scan image store this value. Perhaps @nataliaorlova can answer this directly. I am not sure I remember how scan image usually time each frame.

@nickponvert
Copy link
Contributor

@jeromelecoq @nataliaorlova @farznaj Did we figure out the answer to this question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants