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

What is FD? #51

Open
ambarb opened this issue Feb 3, 2021 · 4 comments
Open

What is FD? #51

ambarb opened this issue Feb 3, 2021 · 4 comments
Labels
_commonspeckle part of V2, but strictly related to a common repo (speckle + maybe scattering) _futurepyCHX part of V2, future pyCHX once XPCS/speckle analysis is fully separated make poll question V2 required to move towards share XPCS/speckle analysis for CHX/CSX

Comments

@ambarb
Copy link
Collaborator

ambarb commented Feb 3, 2021

I see this is a lot of functions, but I am unsure what it is. Seems to be related to detector data.

def pass_FD(FD, n):

https://github.com/ambarb/pyCHX/blob/2ecdacf0dd8496dd8e90bb4975273b59e1d08e26/pyCHX/v2/_commonspeckle/chx_compress.py#L62

@ambarb
Copy link
Collaborator Author

ambarb commented Feb 5, 2021

pyCHX/pyCHX/chx_speckle.py

Lines 1020 to 1021 in 2ecdacf

def get_max_countc(FD, labeled_array ):
"""Compute the max intensity of ROIs in the compressed file (FD)

Assuming that FD is the special formatted list and not a ccd image, we need to understand better what language to use. I've been calling ccd images "frames" which is technically correct per webster, but perhaps this is more accurate description of the compressed list. It is framed by the edges of the detector and points in time. The representation is a list versus an image

frame = a rigid structure that surrounds or encloses something such as a door or window.

frame = place (a picture or photograph) in a frame

SO it seems all data for XPCS consist of frames. Do we use FD to provide a generic description of both types:

  • images (or array)
  • list (compressed array)
  • arrays in memory versus reading a file?

@ambarb
Copy link
Collaborator Author

ambarb commented Feb 5, 2021

@ambarb ambarb added question V2 required to move towards share XPCS/speckle analysis for CHX/CSX make poll _futurepyCHX part of V2, future pyCHX once XPCS/speckle analysis is fully separated _commonspeckle part of V2, but strictly related to a common repo (speckle + maybe scattering) labels Feb 5, 2021
@ambarb
Copy link
Collaborator Author

ambarb commented Mar 31, 2021

Neither @xmchenGH or I can find where FD is returned or defined as a class. In discussion with @xmchenGH and @afluerasu : FD is to act as a pointer so in principle FD can be a different data formats - if I understand things correctly.

One instance of its use (as function argument)

image_iterable : FD, a compressed eiger file by Multifile class

It looks like it is roughly defined using the Mulitifile class to interpret it.

class Multifile:

class MultifileBNL:

See also for creation and handling
https://github.com/NSLS-II/pyCHX/blob/2ecdacf0dd8496dd8e90bb4975273b59e1d08e26/pyCHX/chx_compress.py\

NOTE read_compressed_eiger() is a very simple example to understand usage without complexity of XPCS/speckle functions

FD = Multifile( filename, beg, end)

@ambarb
Copy link
Collaborator Author

ambarb commented Apr 1, 2021

FD = file descriptor per @afluerasu .

FD could represent a hdf5 file (like CHX compressed detector images that are readable). or .imm (APS 8ID) or .edf

It was meant to be an object treated like an array from the outside. Concept is agreed upon, we just need to work a little more on the code.

@ambarb ambarb assigned ambarb and afluerasu and unassigned danielballan, ambarb and afluerasu Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
_commonspeckle part of V2, but strictly related to a common repo (speckle + maybe scattering) _futurepyCHX part of V2, future pyCHX once XPCS/speckle analysis is fully separated make poll question V2 required to move towards share XPCS/speckle analysis for CHX/CSX
Projects
None yet
Development

No branches or pull requests

5 participants