slac-lcls / smalldata_tools

code to facilitate production of LCLS small data files and the analysis thereof
12 stars 11 forks source link

ENH: mfx Beamline summaries, producer template additions, changes to run parameters #182

Closed gadorlhiac closed 10 months ago

gadorlhiac commented 11 months ago

Change Log

NOTE

The current implementation is redundant/duplicates code. In particular, the functions required for producing the automated "missing data" posts in the eLog are replicated in BeamlineSummaries_mfx.py after originally being written in PedestalPlot.py. To address this, I think there are two options:

  1. Refactor these elog functions into a new module, e.g. elog_utils.py or something along those lines. The functions can then be imported into both the summaries and pedestal plot scripts.
  2. Alternatively, the functions can live where they are now in PedestalPlot.py and be imported from there. However, that script must be altered to only run the pedestal functionality when the script is run directly. Something like:
    if __name__ == "__main__":
      tabs = plotPedestals(expname,run, make_ped_imgs=True, make_ped_data_imgs=False, nosave_elog=nosave_elog)

I find the first option more appealing, but it requires slightly more work/modification. I'll leave the decision up to everyone whether we implement one of those options, or leave the redundant code.

Testing