Skip to content
Snippets Groups Projects

Fix: 2.8.0 hp1

Merged Mikhail Karnevskiy requested to merge 2.8.0-hp1 into master

@ahmedk

  • Add validation of the data file using extra_data_validate
  • Fix summary section of the AGIPD correction notebook
  • Fix check gain_stats
  • Fix path to the pdf in the serve_overview

Fix of the AGIPD pulse is still missing.

Edited by Mikhail Karnevskiy

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
24 24 "source": [
25 25 "in_folder = \"/gpfs/exfel/exp/MID/201931/p900107/raw\" # the folder to read data from, required\n",
26 26 "run = 11 # runs to process, required\n",
27 "out_folder = \"/gpfs/exfel/data/scratch/ahmedk/test/AGIPD_Corr\" # the folder to output to, required\n",
27 "out_folder = \"/gpfs/exfel/data/scratch/karnem/test/AGIPD_Corr\" # the folder to output to, required\n",
28 28 "calfile = \"/gpfs/exfel/data/scratch/haufs/agipd_on_demand/agipd_store_mid.h5\" # path to calibration file. Leave empty if all data should come from DB\n",
29 "sequences = [-1] # sequences to correct, set to -1 for all, range allowed\n",
29 "sequences = [0] # sequences to correct, set to -1 for all, range allowed\n",
  • 86 "\n",
    87 " for i in range(1, counts.shape[0]):\n",
    87 " for i in range(0, counts.shape[0]):\n",
    88 88 " line = [ const_times[:,:,pos][idx==i][0] ]\n",
    89 89 " mods = ''\n",
    90 90 " for i_s, s in enumerate(seq):\n",
    91 91 " if( const_times[i_s,:,0][idx[i_s]==i].shape[0]>0 ):\n",
    92 " table[0][1] = 'Most of the modules'\n",
    93 92 " mods = mods+ 'S{}: {}, '.format(seq[i_s], const_times[i_s,:,0][idx[i_s]==i])\n",
    94 93 " line.append(mods)\n",
    95 94 " table.append(line)\n",
    96 95 "\n",
    96 " if counts.shape[0] == 1:\n",
    97 " table[0][1] = 'All modules'\n",
    98 " else:\n",
    99 " table[np.argmax(counts)][1] = 'Most of the modules'\n",
  • beside the small comments and separating the extra data validation into different Feat/MR, LGTM

  • Karim Ahmed added 2 commits

    added 2 commits

    • 492ced4b - modify corrbools msgs and CORR INDEX
    • fb040baa - Merge branch 'fix/corrbools_msgs_and_corrINDEX' into '2.8.0-hp1'

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Karim Ahmed added 3 commits

    added 3 commits

    • e7512931 - avoid appending 0 at the end of first indices
    • 227796b3 - lang. changes
    • ca398b61 - Merge branch 'fix/missing_trains_at_the_end' into '2.8.0-hp1'

    Compare with previous version

  • Karim Ahmed added 5 commits

    added 5 commits

    • 1d68c6b6 - taking dark for test single agipd module
    • d2eb9fbf - remove output
    • eff2b5e2 - correct prints
    • 6d2822df - move notebook to playgtound
    • 48cdab6d - Merge branch 'feat/test_single_module_dark' into '2.8.0-hp1'

    Compare with previous version

  • added 2 commits

    • 7717db29 - Add gain setting to calibration constants
    • db8b4e78 - Merge branch 'feat/agipd_gain_setting' into '2.8.0-hp1'

    Compare with previous version

  • added 2 commits

    • 7717db29 - Add gain setting to calibration constants
    • db8b4e78 - Merge branch 'feat/agipd_gain_setting' into '2.8.0-hp1'

    Compare with previous version

  • added 2 commits

    • 5ff06edd - update agion correction
    • 1025ff60 - Merge branch 'feat/update_AGIPD_corr' into '2.8.0-hp1'

    Compare with previous version

    • Add validation of the data file using extra_data_validate

      @karnem can you point me to where this is implemented, I could not find it

    • Author Contributor

      This was removed. We didn't decide if this should be implemented. See here: https://git.xfel.eu/gitlab/detectors/pycalibration/blob/20f77f30693177bf00df1c257aafecbd50c9141c/notebooks/AGIPD/AGIPD_Correct_and_Verify.ipynb

      function def validate_file(filename)

      Edited by Mikhail Karnevskiy
    • OK, thanks.

      I see that you spawn a new process to run the command line version. It is actually possible to use directly the python API, see as example:

      from extra_data import RunDirectory, FileAccess
      from extra_data.validation import FileValidator, RunValidator, ValidationError
      
      # on a single file
      try:
          FileValidator(FileAccess(filepath)).validate()
      except ValidationError as verr:
          # verr contains all validation errors for this file
      
      # on a run directory
      try:
          RunValidator(runpath).validate()
      except ValidationError as verr:
          # verr contains all validation errors for this run
      
      
      # Alternative
      validator = FileValidator(FileAccess(filepath))
      problems = validator.run_checks()
      # problems (list) contains all validation errors for this file
      validator = RunValidator(runpath)
      problems = validator.run_checks()
      # problems contains all validation errors for this run
      # run_check returns a list of dict containing problems associated files and additional infos
      # for nice print:
      print(str(ValidationError(problems)))
    • Author Contributor

      May be useful.

    • Please register or sign in to reply
  • added 2 commits

    • f370a7c6 - Derive AGIPD gain setting from file
    • 0056d6d7 - Merge branch 'feat/read_agipd_gain_setting' into '2.8.0-hp1'

    Compare with previous version

  • added 2 commits

    • 7cf2196b - Remove time zone
    • 8eef5d2d - Merge branch 'fix/time_zone_remove' into '2.8.0-hp1'

    Compare with previous version

  • added 2 commits

    • f2a59e66 - Update parameter names for agipd corr
    • 3760a241 - Merge branch 'fix/update_parameters_names' into '2.8.0-hp1'

    Compare with previous version

  • Karim Ahmed added 2 commits

    added 2 commits

    • 0d6b9c23 - add gain setting in dark agipd64k
    • 30c989af - Merge branch 'feat/add_gain_setting_agipd64k' into '2.8.0-hp1'

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading