|
| 1 | +# ---------------------------------------------------------------------------- |
| 2 | +# helpers.py |
| 3 | +# |
| 4 | +# The MIT License (MIT) |
| 5 | +# (c) Copyright 23 Thomas Euler, Jonathan Oesterle |
| 6 | +# |
| 7 | +# 2023-08-29, first implementation |
| 8 | +# ---------------------------------------------------------------------------- |
| 9 | + |
| 10 | +def gen_scmf_dict(): |
| 11 | + """Generate a dictionary of the ScanM file format.""" |
| 12 | + import numpy |
| 13 | + return {'ComputerName': [numpy.character, 1, 'n/a'], |
| 14 | + 'UserName': [numpy.character, 1, 'n/a'], |
| 15 | + 'OriginalPixelDataFileName': [numpy.character, 1, ''], |
| 16 | + 'DateStamp': [numpy.character, 1, '2023-01-01'], |
| 17 | + 'TimeStamp': [numpy.character, 1, '00-00-1-000'], |
| 18 | + # 'ScanMproductVersionAndTargetOS': [numpy.character, 1, 'n/a'], |
| 19 | + # 'CallingProcessPath': [numpy.character, 1, ''], |
| 20 | + # 'CallingProcessVersion': [numpy.character, 1, 'n/a'], |
| 21 | + 'PixelSizeInBytes': [numpy.uint32, 1, 2], |
| 22 | + 'StimulusChannelMask': [numpy.uint32, 1, 7], |
| 23 | + # 'MinVoltsAO': [numpy.float64, 1, -4.0], |
| 24 | + # 'MaxVoltsAO': [numpy.float64, 1, 4.0], |
| 25 | + # 'MaxStimulusBufferMapLength': [numpy.uint32, 1, 1], |
| 26 | + # 'NumberOfStimulusBuffers': [numpy.uint32, 1, 3], |
| 27 | + 'InputChannelMask': [numpy.uint32, 1, 7], |
| 28 | + 'TargetedPixelDuration_µs': [numpy.float64, 1, 0.], |
| 29 | + 'RealPixelDuration_µs': [numpy.float64, 1, 0.], |
| 30 | + # 'Oversampling_Factor': [numpy.uint32, 1, 1], |
| 31 | + # 'MinVoltsAI': [numpy.float64, 1, -1.0], |
| 32 | + # 'MaxVoltsAI': [numpy.float64, 1, 5.0], |
| 33 | + 'NumberOfFrames': [numpy.uint32, 1, 1], |
| 34 | + 'ScanMode': [numpy.uint32, 1, 0], |
| 35 | + 'FrameWidth': [numpy.uint32, 1, 0], |
| 36 | + 'FrameHeight': [numpy.uint32, 1, 4], |
| 37 | + # 'ScanPathFunc': [numpy.character, 0, []], |
| 38 | + 'PixRetraceLen': [numpy.uint32, 1, 0], |
| 39 | + 'XPixLineOffs': [numpy.uint32, 1, 0], |
| 40 | + 'ChunksPerFrame': [numpy.uint32, 1, 1], |
| 41 | + 'ScanType': [numpy.uint32, 1, -1], |
| 42 | + # 'NSubPixOversamp': [numpy.uint32, 1, 1], |
| 43 | + 'Zoom': [numpy.float64, 1, 1.0], |
| 44 | + 'Angle_deg': [numpy.float64, 1, 0.0], |
| 45 | + # 'IgorGUIVer': [numpy.character, 1, 'n/a'], |
| 46 | + # 'XCoord_um': [numpy.float64, 1, 0.0], |
| 47 | + # 'YCoord_um': [numpy.float64, 1, 0.0], |
| 48 | + # 'ZCoord_um': [numpy.float64, 1, 0.0], |
| 49 | + # 'ZStep_um': [numpy.float64, 1, 1.0], |
| 50 | + # 'NFrPerStep': [numpy.uint32, 1, 1], |
| 51 | + # 'XOffset_V': [numpy.float64, 1, 0.0], |
| 52 | + # 'YOffset_V': [numpy.float64, 1, 0.0], |
| 53 | + # 'dZPixels': [numpy.uint32, 1, 0], |
| 54 | + # 'ZPixRetraceLen': [numpy.uint32, 1, 0], |
| 55 | + # 'ZPixLineOffs': [numpy.uint32, 1, 0], |
| 56 | + # 'UsesZForFastScan': [numpy.uint32, 1, 0], |
| 57 | + 'Comment': [numpy.character, 1, 'n/a'], |
| 58 | + # 'SetupID': [numpy.uint32, 1, 1], |
| 59 | + # 'LaserWavelength_nm': [numpy.uint32, 1, 0], |
| 60 | + # 'Objective': [numpy.character, 1, 'n/a'], |
| 61 | + # 'ZLensScaler': [numpy.uint32, 1, 1], |
| 62 | + # 'ZLensShifty': [numpy.float64, 1, None], |
| 63 | + 'AspectRatioFrame': [numpy.float64, 1, 1], |
| 64 | + # 'StimBufPerFr': [numpy.uint32, 1, 1], |
| 65 | + 'FrameCounter': [numpy.uint32, 1, 1], |
| 66 | + # 'UnusedValue': [numpy.uint32, 1, 6428160], |
| 67 | + # 'HeaderLengthInValuePairs': [numpy.uint64, 1, 71], |
| 68 | + # 'Header_length_in_bytes': [numpy.uint64, 1, 5362], |
| 69 | + # 'StimBufLenList': [numpy.uint32, 3, array([5120, 5120, 5120])], |
| 70 | + # 'TargetedStimDurList': [numpy.float64, 3, array([128000., 128000., 128000.])], |
| 71 | + # 'RealStimDurList': [numpy.float64, 3, array([128000., 128000., 128000.])], |
| 72 | + # 'StimBufMapEntries': [numpy.uint64, (32, 128), []], |
| 73 | + 'NumberOfInputChans': [numpy.uint32, 1, 1], |
| 74 | + # 'InChan_PixBufLenList': [numpy.uint32, 3, array([2560, 2560, 2560])], |
| 75 | + 'nImgPerFr': [numpy.uint32, 1, 1], |
| 76 | + 'dxFrDecoded': [numpy.uint32, 1, 80], |
| 77 | + 'dyFrDecoded': [numpy.uint32, 1, 64], |
| 78 | + 'dzFrDecoded': [numpy.uint32, 1, 0], |
| 79 | + # 'NumberOfPixBufsSet': [numpy.uint32, 1, 1500], |
| 80 | + # 'PixBufCounter': [numpy.uint32, 1, 388] |
| 81 | + } |
| 82 | + |
| 83 | +# ---------------------------------------------------------------------------- |
0 commit comments