You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
870 B

  1. from nd2reader import Nd2
  2. from pprint import pprint
  3. import six
  4. n = Nd2("/home/jim/nd2s/FYLM-141111-001.nd2")
  5. # for k, v in n._parser.raw_metadata.image_metadata_sequence[b'SLxPictureMetadata'][b'sPicturePlanes'][b'sSampleSetting'][b'a1'].items():
  6. for camera in n._parser._raw_metadata.image_metadata_sequence[b'SLxPictureMetadata'][b'sPicturePlanes'][b'sSampleSetting'].values():
  7. name = camera[six.b('pCameraSetting')][six.b('CameraUserName')]
  8. id = camera[six.b('pCameraSetting')][six.b('CameraUniqueName')]
  9. channel_name = camera[six.b('sOpticalConfigs')][six.b('')][six.b('sOpticalConfigName')]
  10. x_binning = camera[six.b('pCameraSetting')][six.b('FormatFast')][six.b('fmtDesc')][six.b('dBinningX')]
  11. y_binning = camera[six.b('pCameraSetting')][six.b('FormatFast')][six.b('fmtDesc')][six.b('dBinningY')]
  12. exposure = camera[six.b('dExposureTime')]