Giter VIP home page Giter VIP logo

sfx_utils's People

Contributors

apeck12 avatar fredericpoitevin avatar sbotha89 avatar

Watchers

 avatar

sfx_utils's Issues

Intensity distribution trajectory

In addition to information about intensity statistics during a run, it would be helpful to get a visual display of how intensity is distributed in range and in time. This would allow to quickly identify calibration issues, and to identify regime changes during collection that would help for example pinpoint events where the detector could have been at risk of being damaged.

An idea could be to populate an array for each run intensity_distribution(n_events, n_intensity_bins) that could be displayed in the form of a colored table as sketched below.

Considerations on binning:

  • The data array could have a finer binning with coarser binning being possible upon plotting (e.g. using plt.hexbin()).
  • Several binning strategies could also be explored: linear or symlog.

image

Random extra thought: a similar plot for the whole experiment (with runs on the X-axis) might also be very useful for experiment summaries.

Unit of detector pixel values?

I believe they are in keV in the assembled image, would be nice to check what they are otherwise - and document it somewhere.

If indeed in keV, it would be nice to document how to convert into "photons" and vice-versa.

MemoryError when making a powder over too many images

self.powder = np.amax(self.psi.get_images(n_images), axis=0)

geom_opt.opt_distance(plot=True, n_images=40000)
---------------------------------------------------------------------------
MemoryError                               Traceback (most recent call last)
/tmp/ipykernel_25483/1338048410.py in <module>
----> 1 geom_opt.opt_distance(plot=True, n_images=40000)

~/sfx_utils/sfx_utils/geom_opt.py in opt_distance(self, sample, n_images, center, plot)
     61         """
     62         if self.powder is None:
---> 63             self.powder = self.compute_powder(n_images)
     64 
     65         if sample == 'AgBehenate':

~/sfx_utils/sfx_utils/geom_opt.py in compute_powder(self, n_images, ptype)
     31         """
     32         if ptype == 'max':
---> 33             self.powder = np.amax(self.psi.get_images(n_images), axis=0)
     34         elif ptype == 'mean':
     35             self.powder = np.mean(self.psi.get_images(n_images), axis=0)

~/sfx_utils/sfx_utils/psana_interface.py in get_images(self, num_images, assemble)
     65             images = np.zeros((num_images, 
     66                                self.det.image_xaxis(self.run).shape[0],
---> 67                                self.det.image_yaxis(self.run).shape[0]))
     68         else:
     69             images = np.zeros((num_images,) + self.det.shape())

MemoryError: Unable to allocate 826. GiB for an array with shape (40000, 1666, 1664) and data type float64

Diagnostic statistics per-run

We'd like to pull out the following statistics per event and plot their trajectory over the course of a given run:

  • total intensity
  • minimum intensity
  • maximum intensity
  • median intensity
    By default, we assume that we're examining the calibrated images.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.