diff --git a/PyNutil/main.py b/PyNutil/main.py
index b4944882c1ecfe729f0b6680395aa5e3f3a0825e..d2e7a8a0cf0f0c80886284e8fe6ee2ac6275605d 100644
--- a/PyNutil/main.py
+++ b/PyNutil/main.py
@@ -272,7 +272,7 @@ class PyNutil:
             self.segmentation_filenames,
             self.per_section_df,
         ):
-            split_fn = fn.split("/")[-1].split(".")[0]
+            split_fn = fn.split(os.sep)[-1].split(".")[0]
             df.to_csv(
                 f"{output_folder}/per_section_reports/{split_fn}.csv",
                 sep=";",
diff --git a/test/test7_PyNutil.json b/test/test7_PyNutil.json
new file mode 100644
index 0000000000000000000000000000000000000000..c4a329362e46c58886777650b1d92c825d1561a2
--- /dev/null
+++ b/test/test7_PyNutil.json
@@ -0,0 +1,9 @@
+{   "volume_path": "allen2017",
+    "label_path": "annotation_volumes/allen2017_colours.csv",
+    "segmentation_folder": "test_data/PyTest_seg",
+    "alignment_json": "test_data/PyNutil_testdataset_Nonlin_SY.json",
+    "nonlinear": true,
+    "colour": [0, 0, 0],
+    "points_json_path": "outputs/test7_PyNutil.json",
+    "counts_per_label_name": "outputs/test7_counts_per_allen2017.csv"
+}
\ No newline at end of file
diff --git a/testOOP.py b/testOOP.py
index ce0c65d1cab9a28d37c5531d511f8b82f454ffad..7fe8ce38fda9f93ddb3bd79eff43be1a6fa3bcc0 100644
--- a/testOOP.py
+++ b/testOOP.py
@@ -1,11 +1,11 @@
 from PyNutil import PyNutil
 
-pnt = PyNutil(settings_file=r"test/PVMouse_81264_test.json")
-# pnt = PyNutil(settings_file=r"test/test3.json")
+pnt = PyNutil(settings_file=r"test/test7_PyNutil.json")
+# pnt = PyNutil(settings_file=r"test/test7_PyNutil.json")
 # pnt.build_quantifier()
 
 pnt.get_coordinates(object_cutoff=0)
 
 pnt.quantify_coordinates()
 
-pnt.save_analysis("outputs/test4_2017")
+pnt.save_analysis("outputs/test7_PyNutil")
diff --git a/test_data/PyNutil_testdataset_Nonlin_SY.json b/test_data/PyNutil_testdataset_Nonlin_SY.json
new file mode 100644
index 0000000000000000000000000000000000000000..2a572342f3f829aec0e4661800cc1b2885662e35
--- /dev/null
+++ b/test_data/PyNutil_testdataset_Nonlin_SY.json
@@ -0,0 +1,6 @@
+{"name":"PyNutil_testdataset","target":"ABA_Mouse_CCFv3_2017_25um.cutlas","target-resolution":[456.0, 528.0, 320.0],"slices":[
+{"filename":"test_s001.png","nr":1,"width":1500,"height":1000,"anchoring":[-5.145275115966797, 361.8014440433213, 331.1490739071843, 456.0, 0.0, 0.0, 0.0, 0.0, -320.0]}, 
+{"filename":"test_s002.png","nr":2,"width":1500,"height":1000,"anchoring":[-3.8589563369750977, 318.7157039711191, 340.24552914037605, 456.0, 0.0, 0.0, 0.0, 0.0, -320.0],"markers":[[636.8098159509204, 603.4958601655935, 672.6993865030674, 593.3762649494021], [902.9868982011025, 615.5567336628567, 843.8650306748466, 610.8555657773691], [561.2609204260139, 750.3661510917975, 558.5889570552147, 775.5289788408462]]}, 
+{"filename":"test_s003.png","nr":3,"width":1500,"height":1000,"anchoring":[-2.8942172527313232, 275.6299638989171, 350.0189942541106, 456.0, 0.0, 0.0, 0.0, 0.0, -320.0],"markers":[[761.0429447852762, 629.2548298068077, 761.0429447852761, 629.2548298068077], [204.29447852760745, 613.6154553817848, 365.3374233128834, 612.695492180313], [482.6376861494953, 714.9876920193675, 623.0061349693251, 747.0101195952162], [434.00208292806684, 606.7676930120547, 578.8343558282207, 601.6559337626494], [959.8159509202455, 636.6145354185834, 980.0613496932516, 628.3348666053357], [957.8161415293836, 523.3987679117937, 953.3742331288344, 547.3781048758049]]}, 
+{"filename":"test_s004.png","nr":4,"width":1500,"height":1000,"anchoring":[-3.0282087922096252, 232.54422382671487, 364.1366059225139, 456.0, 0.0, 0.0, 0.0, 0.0, -320.0],"markers":[[522.6993865030674, 712.9714811407543, 519.9386503067485, 715.7313707451704], [630.6438500513034, 523.1833943062713, 550.3067484662577, 519.7792088316469], [916.4047791164191, 534.1886045162021, 962.5766871165645, 523.4590616375344], [950.8076359295408, 705.46368100121, 949.6932515337423, 701.0119595216191], [1096.1208774051677, 649.3153717520049, 1099.6932515337426, 656.8537258509658], [1030.2378410339393, 594.2011916220456, 1065.644171779141, 604.4158233670653]]}, 
+{"filename":"test_s005.png","nr":5,"width":1500,"height":1000,"anchoring":[-0.6163610816001892, 189.45848375451277, 374.2485759765199, 456.0, 0.0, 0.0, 0.0, 0.0, -320.0],"markers":[[6.441717791411037, 588.7764489420423, 186.80981595092024, 425.0229990800368], [766.3836793259812, 987.3315412211099, 834.6625766871166, 946.6421343146276], [447.4522362685242, 740.6361518118404, 565.9509202453987, 643.0542778288868], [392.2943778764543, 594.4761834437141, 542.9447852760735, 478.3808647654094], [1117.436664514756, 564.5422630203066, 788.6503067484659, 422.2631094756209], [1045.7025247722827, 975.3508578153971, 893.5582822085888, 873.045078196872]]}]}
\ No newline at end of file
diff --git a/test_data/PyTest_NL_atlasmaps/report.tsv b/test_data/PyTest_NL_atlasmaps/report.tsv
new file mode 100644
index 0000000000000000000000000000000000000000..fae6476ed328084c6ec5ad8b4434934b82a9af85
--- /dev/null
+++ b/test_data/PyTest_NL_atlasmaps/report.tsv
@@ -0,0 +1,6 @@
+snr	name	segmented	changed	stable%
+1	test_s001.png	64578	2991	95%
+2	test_s002.png	83702	34124	59%
+3	test_s003.png	93593	67152	28%
+4	test_s004.png	97023	42643	56%
+5	test_s005.png	92810	90411	2%
diff --git a/test_data/PyTest_NL_atlasmaps/test_s001_nl.flat b/test_data/PyTest_NL_atlasmaps/test_s001_nl.flat
new file mode 100644
index 0000000000000000000000000000000000000000..e82b1e4b1019ffa83475844787dc639b2bbaa83f
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s001_nl.flat differ
diff --git a/test_data/PyTest_NL_atlasmaps/test_s001_nl.png b/test_data/PyTest_NL_atlasmaps/test_s001_nl.png
new file mode 100644
index 0000000000000000000000000000000000000000..b29e104e0c9760e86cddf9236e4ad4f0746d21dd
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s001_nl.png differ
diff --git a/test_data/PyTest_NL_atlasmaps/test_s001_nl_rbw.png b/test_data/PyTest_NL_atlasmaps/test_s001_nl_rbw.png
new file mode 100644
index 0000000000000000000000000000000000000000..93bd1fe5f886877e0527cab8cc67e700f4b4dc19
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s001_nl_rbw.png differ
diff --git a/test_data/PyTest_NL_atlasmaps/test_s002_nl.flat b/test_data/PyTest_NL_atlasmaps/test_s002_nl.flat
new file mode 100644
index 0000000000000000000000000000000000000000..d4355f6e835a0b278c9e7e69b736e4214b7987e9
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s002_nl.flat differ
diff --git a/test_data/PyTest_NL_atlasmaps/test_s002_nl.png b/test_data/PyTest_NL_atlasmaps/test_s002_nl.png
new file mode 100644
index 0000000000000000000000000000000000000000..fe36b91a874fd8f4ac9e9b704b9de3a5e0e9ce6d
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s002_nl.png differ
diff --git a/test_data/PyTest_NL_atlasmaps/test_s002_nl_rbw.png b/test_data/PyTest_NL_atlasmaps/test_s002_nl_rbw.png
new file mode 100644
index 0000000000000000000000000000000000000000..54a9f73cb218991cce447cf2e4251e529b8a27f4
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s002_nl_rbw.png differ
diff --git a/test_data/PyTest_NL_atlasmaps/test_s003_nl.flat b/test_data/PyTest_NL_atlasmaps/test_s003_nl.flat
new file mode 100644
index 0000000000000000000000000000000000000000..e8f61cf8bbefbbaffe390a0ae8b8d004f7f53c89
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s003_nl.flat differ
diff --git a/test_data/PyTest_NL_atlasmaps/test_s003_nl.png b/test_data/PyTest_NL_atlasmaps/test_s003_nl.png
new file mode 100644
index 0000000000000000000000000000000000000000..632377cabe0d35595e116cf0c075d6aacbb393c7
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s003_nl.png differ
diff --git a/test_data/PyTest_NL_atlasmaps/test_s003_nl_rbw.png b/test_data/PyTest_NL_atlasmaps/test_s003_nl_rbw.png
new file mode 100644
index 0000000000000000000000000000000000000000..36e86826554f173137cf0d04f790592abdc00c92
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s003_nl_rbw.png differ
diff --git a/test_data/PyTest_NL_atlasmaps/test_s004_nl.flat b/test_data/PyTest_NL_atlasmaps/test_s004_nl.flat
new file mode 100644
index 0000000000000000000000000000000000000000..2a28007e62e83a96147dda5c4c042bf1f51af878
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s004_nl.flat differ
diff --git a/test_data/PyTest_NL_atlasmaps/test_s004_nl.png b/test_data/PyTest_NL_atlasmaps/test_s004_nl.png
new file mode 100644
index 0000000000000000000000000000000000000000..137166691bab7e5f4e0f8d5a02371cbef04dad7a
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s004_nl.png differ
diff --git a/test_data/PyTest_NL_atlasmaps/test_s004_nl_rbw.png b/test_data/PyTest_NL_atlasmaps/test_s004_nl_rbw.png
new file mode 100644
index 0000000000000000000000000000000000000000..a2e7fc527af3acfe2705ce77c7726846ee178272
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s004_nl_rbw.png differ
diff --git a/test_data/PyTest_NL_atlasmaps/test_s005_nl.flat b/test_data/PyTest_NL_atlasmaps/test_s005_nl.flat
new file mode 100644
index 0000000000000000000000000000000000000000..3959fdfc31b0823a77ed9a19f5422e439645e0e5
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s005_nl.flat differ
diff --git a/test_data/PyTest_NL_atlasmaps/test_s005_nl.png b/test_data/PyTest_NL_atlasmaps/test_s005_nl.png
new file mode 100644
index 0000000000000000000000000000000000000000..150169f860a5ba7d17a4121fd6a8cb6c99bab27e
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s005_nl.png differ
diff --git a/test_data/PyTest_NL_atlasmaps/test_s005_nl_rbw.png b/test_data/PyTest_NL_atlasmaps/test_s005_nl_rbw.png
new file mode 100644
index 0000000000000000000000000000000000000000..52258819518296ed26a457b9a95ffd23cdaf0dbd
Binary files /dev/null and b/test_data/PyTest_NL_atlasmaps/test_s005_nl_rbw.png differ
diff --git a/test_data/PyTest/test_s001.png b/test_data/PyTest_seg/test_s001.png
similarity index 100%
rename from test_data/PyTest/test_s001.png
rename to test_data/PyTest_seg/test_s001.png
diff --git a/test_data/PyTest/test_s002.png b/test_data/PyTest_seg/test_s002.png
similarity index 100%
rename from test_data/PyTest/test_s002.png
rename to test_data/PyTest_seg/test_s002.png
diff --git a/test_data/PyTest/test_s003.png b/test_data/PyTest_seg/test_s003.png
similarity index 100%
rename from test_data/PyTest/test_s003.png
rename to test_data/PyTest_seg/test_s003.png
diff --git a/test_data/PyTest/test_s004.png b/test_data/PyTest_seg/test_s004.png
similarity index 100%
rename from test_data/PyTest/test_s004.png
rename to test_data/PyTest_seg/test_s004.png
diff --git a/test_data/PyTest/test_s005.png b/test_data/PyTest_seg/test_s005.png
similarity index 100%
rename from test_data/PyTest/test_s005.png
rename to test_data/PyTest_seg/test_s005.png