Skip to content
Snippets Groups Projects

Feat/epix dark characterization common mode

Merged Nuno Duarte requested to merge feat/epix_DarkCharacterization_CommonMode into master
All threads resolved!

[EPIX][DARK] add common mode correction.

Description

  • Adds common mode correction to dark characterization notebook, improving the sensitivity to bad pixels.
  • Noise and bad pixels maps are calculated independently for each ASIC.

How Has This Been Tested?

  • Running the notebook
  • Command line "xfel-calibrate EPIX100 DARK"

Relevant Documents (optional)

Types of changes

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

Reviewers

Merge request reports

Checking pipeline status.

Merged by Nuno DuarteNuno Duarte 2 years ago (Oct 12, 2022 11:19am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Karim Ahmed
  • Karim Ahmed
  • Karim Ahmed
  • Karim Ahmed
  • Karim Ahmed
  • Karim Ahmed
  • Karim Ahmed
  • Karim Ahmed
  • Karim Ahmed
  • Karim Ahmed
  • Karim Ahmed
  • I wrote the main comments regarding this MR. So I will give a last look at your response and your updates later.

  • Nuno Duarte
  • Nuno Duarte added 1 commit

    added 1 commit

    • 96cd5476 - delete some plots and other minor revisions

    Compare with previous version

  • Nuno Duarte added 1 commit

    added 1 commit

    Compare with previous version

  • Nuno Duarte
    • Author Maintainer
      Resolved by Nuno Duarte

      Summary of changes of the new commit (30c6516e...):

      • All the points mentioned in the discussions above
      • Removed get_random_db_interface import from cal_tools.tools (was not used)
      • Removed import pasha as psh (was not used)
      • Added step_timer.done_step() on the read data cell (I had the step_timer.start() on the beginning, but forgot the .done_step())
      • Added print(f"Reading from:<file_location.h5>, to print the location and name of the .h5 file as is done in the correction NB, for uniformity. This required doing from pathlib import Path on the second NB cell.
      • Changed plot title to CM Corrected Noise Map (added the CM)on histograms and heatmaps for clarity.
      • Moved the per ASIC noise histogram plot that was in the last cells of the notebook to the cell where the initial noise map was plotted. This will thus be the only place in the report where the noise map is plotted.
      • Reorganised ASIC numbers on based on some ePix documentation. It should be from 0 to 3 starting at the bottom right, and going counter clock wise. This was done on the noise map histogram plot and on the eval_bpidx function
      • Changed plot titles from Initial Noise Map to just Noise Map, since this is the only map that will be exported (more on this on the next paragarph). Because the CM corrected noise map is now treated as an auxiliary map to find bad pixels with more precision, there is no need to mention distinguish different noise maps.

      An additional important change: The noise map that is injected/saved in this new commit is the initial noise map, and not the CM corrected one. This is because this is the type of map that the Correction NB is expecting, which influences both the CM correction and the charge sharing correction in this notebook. I will investigate if it is advantageous to use the CM corrected noise map and adapting the Correction NB for that, but I will need more time for that. In the meantime is better to keep the type of exported noise map as it is.

  • Nuno Duarte added 4 commits

    added 4 commits

    Compare with previous version

  • Karim Ahmed
  • Karim Ahmed
  • Karim Ahmed
  • Karim Ahmed
  • Karim Ahmed
  • I think these are my last comments.

  • Nuno Duarte added 1 commit

    added 1 commit

    Compare with previous version

  • Nuno Duarte added 1 commit

    added 1 commit

    Compare with previous version

  • Nuno Duarte resolved all threads

    resolved all threads

  • Author Maintainer

    Here is potentially the last commit. I forgot to do nbstripout on the first commit (b0b2160b), so please ignore that one. Besides the above suggsted changes, I also implemented these:

    • Added a comment regarding the vmin/vmax 250 value discussed above
    • Passed the offset subtraction to a CM_N_iterations > 0 block, as there is no point in doing offset subtraction without common mode correction.
  • Thank you @duarten.

    LGTM!

  • Karim Ahmed changed milestone to %3.8.0

    changed milestone to %3.8.0

  • Karim Ahmed approved this merge request

    approved this merge request

  • Hi @duarten,

    Please feel free to Merge this MR.

  • closed

  • reopened

  • merged

  • Nuno Duarte mentioned in commit 7ebeece7

    mentioned in commit 7ebeece7

  • Philipp Schmidt changed milestone to %3.7.1

    changed milestone to %3.7.1

  • Please register or sign in to reply
    Loading