mlreco.iotools.parsers.misc module

mlreco.iotools.parsers.misc.parse_meta2d(sparse_event, projection_id=0)[source]

Get the meta information to translate into real world coordinates (2D).

Each entry in a dataset is a cube, where pixel coordinates typically go from 0 to some integer N in each dimension. If you wish to translate these voxel coordinates back into real world coordinates, you can use the output of this parser to compute it.

schema:
  meta:
    parser: parse_meta2d
    args:
      sparse_event: sparse2d_pcluster
      projection_id: 0
Configuration
  • sparse2d_event (larcv::EventSparseTensor2D or larcv::EventClusterVoxel2D)

  • projection_id (int)

Returns

Contains in order:

  • min_x, min_y (real world coordinates)

  • max_x, max_y (real world coordinates)

  • size_voxel_x, size_voxel_y the size of each voxel

in real world units

Return type

np.ndarray

Note

TODO document how to specify projection id.

mlreco.iotools.parsers.misc.parse_meta3d(sparse_event)[source]

Get the meta information to translate into real world coordinates (3D).

Each entry in a dataset is a cube, where pixel coordinates typically go from 0 to some integer N in each dimension. If you wish to translate these voxel coordinates back into real world coordinates, you can use the output of this parser to compute it.

schema:
  meta:
    parser: parse_meta3d
    args:
      sparse_event: sparse3d_pcluster
Configuration

sparse_event (larcv::EventSparseTensor3D or larcv::EventClusterVoxel3D)

Returns

Contains in order:

  • min_x, min_y, min_z (real world coordinates)

  • max_x, max_y, max_z (real world coordinates)

  • size_voxel_x, size_voxel_y, size_voxel_z the size of each voxel

in real world units

Return type

np.ndarray

mlreco.iotools.parsers.misc.parse_run_info(sparse_event)[source]

Parse run info (run, subrun, event number)

schema:
  run_info:
    parser: parse_run_info
    args:
      sparse_event: sparse3d_pcluster
Configuration

sparse_event (larcv::EventSparseTensor3D or larcv::EventClusterVoxel3D) – data to get run info from

Returns

(run, subrun, event)

Return type

tuple

mlreco.iotools.parsers.misc.parse_opflash(opflash_event)[source]

Copy construct OpFlash and return an array of larcv::Flash.

Configuration

opflash_event (larcv::EventFlash or list of larcv::EventFlash)

Returns

Return type

list

mlreco.iotools.parsers.misc.parse_crthits(crthit_event)[source]

Copy construct CRTHit and return an array of larcv::CRTHit.

Configuration

crthit_event (larcv::CRTHit)

Returns

Return type

list