Skip to content

Commit

Permalink
updated tests and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
krokicki committed Apr 11, 2022
1 parent 0d49f93 commit b2fe545
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 602 deletions.
637 changes: 38 additions & 599 deletions notebooks/python_api_examples.ipynb

Large diffs are not rendered by default.

48 changes: 45 additions & 3 deletions tests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
}
""")




def test_EMImageLookup():
lookup = EMImageLookup(**by_body)
assert len(lookup.results) == 1
Expand All @@ -35,3 +32,48 @@ def test_EMImageLookup():
assert img.neuronInstance == "KCa'b'-ap1_R"
assert img.gender == Gender.female

ppp_results = json.loads(
"""
{
"maskId": "2941779053884998178",
"maskPublishedName": "636798093",
"maskLibraryName": "FlyEM_Hemibrain_v1.2.1",
"neuronType": "LHPV5c1_a",
"neuronInstance": "LHPV5c1_a_R",
"results": [
{
"id": "2422546586627211362",
"publishedName": "VT043138",
"libraryName": "FlyLight_Gen1_MCFO",
"pppRank": 0.0,
"pppScore": 118,
"slideCode": "20170616_61_E3",
"objective": "40x",
"gender": "m",
"alignmentSpace": "JRC2018_Unisex_20x_HR",
"mountingProtocol": "DPX PBS Mounting",
"coverageScore": -118.74299431298442,
"aggregateCoverage": 96.55475533690863,
"mirrored": true,
"files": {
"ColorDepthMip": "63/636798093/636798093-VT043138-20170616_61_E3-40x-JRC2018_Unisex_20x_HR-ch.png",
"SignalMipMaskedSkel": "63/636798093/636798093-VT043138-20170616_61_E3-40x-JRC2018_Unisex_20x_HR-skel.png",
"ColorDepthMipSkel": "63/636798093/636798093-VT043138-20170616_61_E3-40x-JRC2018_Unisex_20x_HR-ch_skel.png",
"SignalMip": "63/636798093/636798093-VT043138-20170616_61_E3-40x-JRC2018_Unisex_20x_HR-raw.png",
"SignalMipMasked": "63/636798093/636798093-VT043138-20170616_61_E3-40x-JRC2018_Unisex_20x_HR-masked_raw.png"
},
"imageStack": "https://s3.amazonaws.com/janelia-flylight-imagery/Gen1+MCFO/VT043138/VT043138-20170616_61_E3-m-40x-central-GAL4-JRC2018_Unisex_20x_HR-aligned_stack.h5j"
}
]}
"""
)

def test_PPPMatches():
ppp = PPPMatches(**ppp_results)
assert ppp.maskId == "2941779053884998178"
assert len(ppp.results) == 1
img = ppp.results[0]
assert img.id == "2422546586627211362"
assert img.mirrored == True
assert img.gender == Gender.male
assert img.files.ColorDepthMip == "63/636798093/636798093-VT043138-20170616_61_E3-40x-JRC2018_Unisex_20x_HR-ch.png"

0 comments on commit b2fe545

Please sign in to comment.