Skip to content

Commit

Permalink
correct wrong value for expected_metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandratrapani committed Jan 24, 2024
1 parent 4012c1c commit 0e27e4d
Showing 1 changed file with 77 additions and 77 deletions.
154 changes: 77 additions & 77 deletions tests/test_scanimage_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,83 @@ 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": "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},
},
},
},
),
(
"scanimage_20220923_roi.tif",
{
"sampling_frequency": 29.1248,
"num_channels": 2,
"num_planes": 2,
"frames_per_slice": 2,
"channel_names": ["Channel 1", "Channel 4"],
"roi_metadata": {
"imagingRoiGroup": {
"ver": 1,
Expand Down Expand Up @@ -165,83 +242,6 @@ def test_parse_matlab_vector_invalid():
},
},
),
(
"scanimage_20220923_roi.tif",
{
"sampling_frequency": 29.1248,
"num_channels": 2,
"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},
},
},
},
),
],
)
def test_parse_metadata(filename, expected_metadata):
Expand Down

0 comments on commit 0e27e4d

Please sign in to comment.