Skip to content

Commit

Permalink
update test_parse_metadata accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandratrapani committed Jan 24, 2024
1 parent 5f973f5 commit 4012c1c
Showing 1 changed file with 167 additions and 0 deletions.
167 changes: 167 additions & 0 deletions tests/test_scanimage_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,106 @@ def test_parse_matlab_vector_invalid():
"num_planes": 20,
"frames_per_slice": 24,
"channel_names": ["Channel 1"],
"roi_metadata": {
"imagingRoiGroup": {
"ver": 1,
"classname": "scanimage.mroi.RoiGroup",
"name": "MROI Imaging ROI Group",
"UserData": None,
"roiUuid": "4118A30BD7393EFF",
"roiUuiduint64": 4.690678283e18,
"rois": [
{
"ver": 1,
"classname": "scanimage.mroi.Roi",
"name": "ROI 1",
"UserData": None,
"roiUuid": "8C08C657736FBC6C",
"roiUuiduint64": 1.009053304e19,
"zs": -11178.45,
"scanfields": {
"ver": 1,
"classname": "scanimage.mroi.scanfield.fields.RotatedRectangle",
"name": "",
"UserData": None,
"roiUuid": "2B42EE3A0B039B9E",
"roiUuiduint64": 3.117315825e18,
"centerXY": [0.2141430948, -6.019800333],
"sizeXY": [3.616638935, 3.521464226],
"rotationDegrees": 0,
"enable": 1,
"pixelResolutionXY": [256, 256],
"pixelToRefTransform": [
[0.01412749584, 0, -1.601240121],
[0, 0.01375571963, -7.787410306],
[0, 0, 1],
],
"affine": [
[3.616638935, 0, -1.594176373],
[0, 3.521464226, -7.780532446],
[0, 0, 1],
],
},
"discretePlaneMode": 0,
"powers": None,
"pzAdjust": [],
"Lzs": None,
"interlaceDecimation": None,
"interlaceOffset": None,
"enable": 1,
},
{
"ver": 1,
"classname": "scanimage.mroi.Roi",
"name": "ROI 2",
"UserData": None,
"roiUuid": "7C9E605DC6951B29",
"roiUuiduint64": 8.979720663e18,
"zs": -11178.45,
"scanfields": {
"ver": 1,
"classname": "scanimage.mroi.scanfield.fields.RotatedRectangle",
"name": "",
"UserData": None,
"roiUuid": "A02889BA5E5501AB",
"roiUuiduint64": 1.154062548e19,
"centerXY": [2.664891847, 6.376705491],
"sizeXY": [3.616638935, 3.759400998],
"rotationDegrees": 0,
"enable": 1,
"pixelResolutionXY": [256, 256],
"pixelToRefTransform": [
[0.01412749584, 0, 0.8495086314],
[0, 0.01468516015, 4.489662412],
[0, 0, 1],
],
"affine": [
[3.616638935, 0, 0.8565723794],
[0, 3.759400998, 4.497004992],
[0, 0, 1],
],
},
"discretePlaneMode": 0,
"powers": None,
"pzAdjust": [],
"Lzs": None,
"interlaceDecimation": None,
"interlaceOffset": None,
"enable": 1,
},
],
},
"photostimRoiGroups": None,
"integrationRoiGroup": {
"ver": 1,
"classname": "scanimage.mroi.RoiGroup",
"name": "",
"UserData": None,
"roiUuid": "1B4D989071535CF3",
"roiUuiduint64": 1.967396358e18,
"rois": {"_ArrayType_": "double", "_ArraySize_": [1, 0], "_ArrayData_": None},
},
},
},
),
(
Expand All @@ -73,6 +173,73 @@ def test_parse_matlab_vector_invalid():
"num_planes": 2,
"frames_per_slice": 2,
"channel_names": ["Channel 1", "Channel 4"],
"roi_metadata": {
"imagingRoiGroup": {
"ver": 1,
"classname": "scanimage.mroi.RoiGroup",
"name": "Default Imaging ROI Group",
"UserData": None,
"roiUuid": "E9CD2A60E29A5EDE",
"roiUuiduint64": 1.684716838e19,
"rois": {
"ver": 1,
"classname": "scanimage.mroi.Roi",
"name": "Default Imaging Roi",
"UserData": {
"imagingSystem": "Imaging_RGG",
"fillFractionSpatial": 0.9,
"forceSquarePixelation": 1,
"forceSquarePixels": 1,
"scanZoomFactor": 1,
"scanAngleShiftFast": 0,
"scanAngleMultiplierSlow": 1,
"scanAngleShiftSlow": 0,
"scanRotation": 0,
"pixelsPerLine": 1024,
"linesPerFrame": 1024,
},
"roiUuid": "1B54BED0B8A25D87",
"roiUuiduint64": 1.969408741e18,
"zs": 0,
"scanfields": {
"ver": 1,
"classname": "scanimage.mroi.scanfield.fields.RotatedRectangle",
"name": "Default Imaging Scanfield",
"UserData": None,
"roiUuid": "4309FD6B19453539",
"roiUuiduint64": 4.830670712e18,
"centerXY": [0, 0],
"sizeXY": [18, 18],
"rotationDegrees": 0,
"enable": 1,
"pixelResolutionXY": [1024, 1024],
"pixelToRefTransform": [
[0.017578125, 0, -9.008789063],
[0, 0.017578125, -9.008789063],
[0, 0, 1],
],
"affine": [[18, 0, -9], [0, 18, -9], [0, 0, 1]],
},
"discretePlaneMode": 0,
"powers": None,
"pzAdjust": [],
"Lzs": None,
"interlaceDecimation": None,
"interlaceOffset": None,
"enable": 1,
},
},
"photostimRoiGroups": None,
"integrationRoiGroup": {
"ver": 1,
"classname": "scanimage.mroi.RoiGroup",
"name": "",
"UserData": None,
"roiUuid": "9FC266E57D28670D",
"roiUuiduint64": 1.151187673e19,
"rois": {"_ArrayType_": "double", "_ArraySize_": [1, 0], "_ArrayData_": None},
},
},
},
),
],
Expand Down

0 comments on commit 4012c1c

Please sign in to comment.