Skip to content
Snippets Groups Projects

[PNCCD] [DARK]+[CORRECT] Read voltage, gain and temperature

Merged Karim Ahmed requested to merge feat/extract_ctrl_data into master
1 unresolved thread

@karnem reading voltage, gain, and temperature from control data in PNCCD

WIP till it gets tested in the hutch

Edited by Karim Ahmed

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
  • 195 {
    196 "cell_type": "code",
    197 "execution_count": null,
    198 "metadata": {},
    199 "outputs": [],
    200 "source": [
    201 "# extract slow data 'RAW-R{:04d}-{}-S{{:05d}}.h5'\n",
    202 "ctrl_fname = os.path.join(ped_dir, path_template.format(run, karabo_da_control)).format(sequence)\n",
    203 "ctrl_path = h5path_ctrl.format(karabo_id)\n",
    204 "mdl_ctrl_path = \"/CONTROL/{}/MDL/\".format(karabo_id)\n",
    205 "\n",
    206 "with h5py.File(ctrl_fname, \"r\") as f:\n",
    207 " bias_voltage = abs(f[os.path.join(mdl_ctrl_path, \"DAQ_MPOD/u0voltage/value\")][0])\n",
    208 " gain = f[os.path.join(mdl_ctrl_path, \"DAQ_GAIN/pNCCDGain/value\")][0]\n",
    209 " fix_temperature = f[os.path.join(ctrl_path, \"inputA/krdg/value\")][0]"
    210 ]
    • I would also add try/except block. This will help in case if file does not exist or no control information inside.

    • This is put in a single cell, wouldn't the whole notebook execute any way like the try/except?

      I tried to try/except and it hides will hide the error details and one has to use traceback to see what is already shown without the try/except or you mean over each value?

      with except Exception as e: the error message shown is Error : 'Unable to open object (component not found)' without though it shows the line that it stopped at in the cell

      Edited by Karim Ahmed
    • Please register or sign in to reply
  • Apart a few comments LGTM.

  • Karim Ahmed added 1 commit

    added 1 commit

    Compare with previous version

  • Karim Ahmed added 1 commit

    added 1 commit

    • 75c8c186 - change in correction notebook

    Compare with previous version

  • Karim Ahmed added 1 commit

    added 1 commit

    • fb2a10d7 - change in correction notebook

    Compare with previous version

  • Karim Ahmed added 1 commit

    added 1 commit

    • c98c7c58 - add try/except + test corr nb

    Compare with previous version

  • Karim Ahmed unmarked as a Work In Progress

    unmarked as a Work In Progress

  • Karim Ahmed changed title from WIP: [PNCCD] [DARK] Read voltage, gain and temperature to [PNCCD] [DARK]+[CORRECT] Read voltage, gain and temperature

    changed title from WIP: [PNCCD] [DARK] Read voltage, gain and temperature to [PNCCD] [DARK]+[CORRECT] Read voltage, gain and temperature

  • Karim Ahmed added 1 commit

    added 1 commit

    • df93edad - add try/except + test corr nb

    Compare with previous version

  • merged

  • Hugo Santos mentioned in commit 4f171628

    mentioned in commit 4f171628

  • Please register or sign in to reply
    Loading