Skip to content
Snippets Groups Projects

Draft: [EPIX100][CORRECT] Use DataFile to write corrected data

Merged Karim Ahmed requested to merge fix/epix_write_aligned_corrected_data into master
2 unresolved threads

Same as Jungfrau. Use DataFile to write the corrected/needed datasets in the corrected files.

Description

Use DataFile to write corrected datasets in the CORR files.

  • Main datasets to write: pixels, patterns, pixels_classified
  • I have written the rest of the datasets expected for trainIds. --> ARE THESE DATASETS NEEDED??
  • Raise Warnings for missing trains or empty sequence files.

How Has This Been Tested?

  • To be tested.

Relevant Documents (optional)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

Reviewers

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
667 " with DataFile(out_file, 'w') as ofile:\n",
668 " dataset_chunk = ((chunk_size_idim,) + oshape[1:]) # e.g. (1, pixels_x, pixels_y) \n",
669 "\n",
670 " # Create INDEX datasets.\n",
671 " ofile.create_index(seq_dc.train_ids, from_file=seq_dc.files[0])\n",
672 " # Create Instrument section to later add corrected datasets.\n",
673 " outp_source = ofile.create_instrument_source(instrument_src)\n",
674 "\n",
675 " # Create count/first datasets at INDEX source.\n",
676 " outp_source.create_index(data=image_counts)\n",
677 "\n",
678 " # Store uncorrected RAW image datasets for the corrected trains.\n",
679 "\n",
680 " data_raw_fields = [ # /data/\n",
681 " 'ambTemp', 'analogCurr', 'analogInputVolt', 'backTemp',\n",
682 " 'digitalInputVolt', 'guardCurr', 'relHumidity',\n",
  • Karim Ahmed
  • 678 " # Store uncorrected RAW image datasets for the corrected trains.\n",
    679 "\n",
    680 " data_raw_fields = [ # /data/\n",
    681 " 'ambTemp', 'analogCurr', 'analogInputVolt', 'backTemp',\n",
    682 " 'digitalInputVolt', 'guardCurr', 'relHumidity',\n",
    683 " ]\n",
    684 " for field in data_raw_fields:\n",
    685 " field_arr = seq_dc[instrument_src, f\"data.{field}\"].ndarray()\n",
    686 "\n",
    687 " outp_source.create_key(\n",
    688 " f\"data.{field}\", data=field_arr,\n",
    689 " chunks=(chunk_size_idim, *field_arr.shape[1:]))\n",
    690 "\n",
    691 " image_raw_fields = [ # /data/image/\n",
    692 " 'binning', 'bitsPerPixel', 'dimTypes', 'dims',\n",
    693 " 'encoding', 'flipX', 'flipY', 'roiOffsets', 'rotation',\n",
  • Karim Ahmed changed title from Draft: use DataFile to write corrected data to Draft: [EPIX100][CORRECT] Use DataFile to write corrected data

    changed title from Draft: use DataFile to write corrected data to Draft: [EPIX100][CORRECT] Use DataFile to write corrected data

  • Karim Ahmed added 18 commits

    added 18 commits

    Compare with previous version

  • merged

  • Karim Ahmed mentioned in commit a15f48b1

    mentioned in commit a15f48b1

  • Karim Ahmed mentioned in merge request !784 (closed)

    mentioned in merge request !784 (closed)

  • Please register or sign in to reply
    Loading