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

this function is not aware of "tiff squashing". #1026

Open
MehmetTopsakal opened this issue Jan 11, 2022 · 3 comments
Open

this function is not aware of "tiff squashing". #1026

MehmetTopsakal opened this issue Jan 11, 2022 · 3 comments

Comments

@MehmetTopsakal
Copy link

def make_data_key(self):

At XPD, we always use "tiff squashing" There is a key called "number_of_sets".

I do this change manually for py file here :/xx//site-packages/ophyd/areadetector/detectors.py

    #shape = (self.cam.num_images.get(),
             #self.cam.array_size.array_size_y.get(),
             #self.cam.array_size.array_size_x.get())
    #if proc plugin is being used
    shape = (self.number_of_sets.get(),
             self.cam.array_size.array_size_y.get(),
             self.cam.array_size.array_size_x.get())
@tacaswell
Copy link
Contributor

tacaswell commented Jan 11, 2022

The quick-fix is to over-ride this at XPD/PDF, the long-term fix is to push this method down into the plugins.

In addition to the squashing use-case, you could imagine there being two file writing plugins, one of them sitting behind a ROI plugin. There is no way for a detector level function to know what shape the final node in the processing chain is going to see.

I think @MehmetTopsakal has correctly identified the problem.

@MehmetTopsakal
Copy link
Author

@tacaswell on a local conda environment, I was manually editing /xx//site-packages/ophyd/areadetector/detectors.py as shown above. But this is not ideal. Because I cannot edit files such as "/nsls2/conda/envs/2022-2.3-py39-tiled/lib/python3.9/site-packages/ophyd/init.py". Is there a way to apply this fix without editing source code? Thanks

image

@tacaswell
Copy link
Contributor

via a local subclass.

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

No branches or pull requests

2 participants