diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml new file mode 100644 index 0000000..a7478f1 --- /dev/null +++ b/.github/workflows/pythonpackage.yml @@ -0,0 +1,40 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python package + +on: + push: + branches-ignore: + - main + pull_request: + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + pytest: + + runs-on: ubuntu-latest + if: always() + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + sudo apt-get update + sudo apt-get -y install libhdf5-dev + - name: Install package + run: | + pip install -e . --no-binary h5netcdf --no-binary h5py + pip install pytest + + - name: Test with pytest + run: | + pytest -vv \ No newline at end of file diff --git a/.gitignore b/.gitignore index deaca3c..d95d99b 100644 --- a/.gitignore +++ b/.gitignore @@ -174,4 +174,8 @@ cython_debug/ .pypirc # Archives -*.zip \ No newline at end of file +*.zip + +# Images generated from tests +/tests/**/*.png +/tests/*.png \ No newline at end of file diff --git a/tests/test_selectors.py b/tests/test_selectors.py deleted file mode 100644 index 05da82c..0000000 --- a/tests/test_selectors.py +++ /dev/null @@ -1,2029 +0,0 @@ -#!/usr/bin/env python3 - -import xhermes -import pytest -import numpy.testing as npt - -from urllib.request import urlretrieve -import zipfile - -Rcoords = {} - -Rcoords["core_boundary"] = {} -Rcoords["core_boundary"]["cdn"] = [ - 1.47631115174855, - 1.3574119557121556, - 1.3574119557121558, - 1.4763111517488048, - 1.5236888472784962, - 1.6425880442878467, - 1.6425880442878467, - 1.5236888472783248, -] -Rcoords["core_boundary"]["cdn_noguards"] = [ - 1.47631115174855, - 1.3574119557121556, - 1.3574119557121558, - 1.4763111517488048, - 1.5236888472784962, - 1.6425880442878467, - 1.6425880442878467, - 1.5236888472783248, -] -Rcoords["core_boundary"]["ldn"] = [ - 1.4762004799521282, - 1.3571057348174769, - 1.3583338938577543, - 1.4793452302396377, - 1.5206547695362183, - 1.641666106149631, - 1.6428942651841036, - 1.5237995194949054, -] -Rcoords["core_boundary"]["ldn_noguards"] = [ - 1.4762004799521282, - 1.3571057348174769, - 1.3583338938577543, - 1.4793452302396377, - 1.5206547695362183, - 1.641666106149631, - 1.6428942651841036, - 1.5237995194949054, -] -Rcoords["core_boundary"]["lsn"] = [ - 1.4833627485648482, - 1.4064969605621978, - 1.3357629952348513, - 1.4027963832660766, - 1.5972036167346986, - 1.6642370047651245, - 1.5935030394368748, - 1.5166372516696207, -] -Rcoords["core_boundary"]["lsn_noguards"] = [ - 1.4833627485648482, - 1.4064969605621978, - 1.3357629952348513, - 1.4027963832660766, - 1.5972036167346986, - 1.6642370047651245, - 1.5935030394368748, - 1.5166372516696207, -] -Rcoords["core_boundary"]["usn"] = [ - 1.5166372516695859, - 1.5935030394368754, - 1.664237004765125, - 1.5972036167346984, - 1.402796383266076, - 1.3357629952348515, - 1.4064969605621962, - 1.4833627485648742, -] -Rcoords["core_boundary"]["usn_noguards"] = [ - 1.5166372516695859, - 1.5935030394368754, - 1.664237004765125, - 1.5972036167346984, - 1.402796383266076, - 1.3357629952348515, - 1.4064969605621962, - 1.4833627485648742, -] -Rcoords["core_boundary"]["udn2"] = [ - 1.4860961593040758, - 1.3631713124586153, - 1.3553848205617494, - 1.4756073568444283, - 1.5243926453619918, - 1.6446151794396484, - 1.636828687515001, - 1.5139038528111441, -] -Rcoords["core_boundary"]["udn2_noguards"] = [ - 1.4860961593040758, - 1.3631713124586153, - 1.3553848205617494, - 1.4756073568444283, - 1.5243926453619918, - 1.6446151794396484, - 1.636828687515001, - 1.5139038528111441, -] - -Rcoords["pfr_boundary"] = {} -Rcoords["pfr_boundary"]["cdn"] = [ - 1.3570545312022744, - 1.3903428466877892, - 1.4407012457587614, - 1.4883585921023939, - 1.4883585921024305, - 1.4407012457583328, - 1.3903428466877508, - 1.3570545312024016, - 1.6429454688012248, - 1.60965715332716, - 1.5592987542232002, - 1.5116414079591611, - 1.5116414079592524, - 1.5592987542216736, - 1.6096571533271442, - 1.6429454688000986, -] -Rcoords["pfr_boundary"]["cdn_noguards"] = [ - 1.3570545312022941, - 1.3903428466877972, - 1.440701245758649, - 1.488358592103338, - 1.4883585921027487, - 1.440701245758685, - 1.3903428466877679, - 1.357054531202333, - 1.6429454687997518, - 1.6096571533271495, - 1.5592987542213523, - 1.5116414079595661, - 1.5116414079593343, - 1.559298754221913, - 1.6096571533271968, - 1.6429454688015508, -] -Rcoords["pfr_boundary"]["ldn"] = [ - 1.3570439233157323, - 1.3903327495886901, - 1.4406897105945056, - 1.4883477948784254, - 1.4901939451829107, - 1.4428429979868362, - 1.3916225089530783, - 1.3578284358965287, - 1.6421715644416834, - 1.6083774913895752, - 1.5571570025834462, - 1.509806054131236, - 1.5116522051651595, - 1.559310289385584, - 1.6096672504245926, - 1.6429560766871614, -] -Rcoords["pfr_boundary"]["ldn_noguards"] = [ - 1.357043923313362, - 1.3903327495887243, - 1.4406897105953078, - 1.4883477948782207, - 1.490193945183014, - 1.4428429979868362, - 1.3916225089530965, - 1.3578284358969717, - 1.6421715644415993, - 1.6083774913895752, - 1.557157002584246, - 1.5098060541307246, - 1.5116522051653145, - 1.5593102893871282, - 1.6096672504246137, - 1.6429560766871614, -] -Rcoords["pfr_boundary"]["lsn"] = [ - 1.3587475360673469, - 1.39304747297703, - 1.4404230676269965, - 1.4855281113579644, - 1.514471888637284, - 1.5595769323929152, - 1.6069525270104092, - 1.641252463906342, -] -Rcoords["pfr_boundary"]["lsn_noguards"] = [ - 1.3587475360674535, - 1.393047472977144, - 1.4404230676256027, - 1.4855281113585281, - 1.5144718886372204, - 1.5595769323936834, - 1.6069525270104672, - 1.641252463906545, -] -Rcoords["pfr_boundary"]["usn"] = [ - 1.6412524639052049, - 1.606952527010203, - 1.5595769323925075, - 1.5144718886373965, - 1.4855281113585053, - 1.4404230676260814, - 1.3930474729769577, - 1.358747536066733, -] -Rcoords["pfr_boundary"]["usn_noguards"] = [ - 1.6412524639059707, - 1.606952527010547, - 1.5595769323930377, - 1.5144718886373965, - 1.4855281113589693, - 1.4404230676272205, - 1.3930474729767126, - 1.3587475360672814, -] -Rcoords["pfr_boundary"]["udn2"] = [ - 1.3561302628068888, - 1.392195832091186, - 1.4453600400991193, - 1.4912708322402242, - 1.4882937958304845, - 1.4406327328607131, - 1.3902832577388466, - 1.3569920799695743, - 1.6430079200248795, - 1.609716742266855, - 1.5593672671291863, - 1.511706204123158, - 1.5087291683281547, - 1.5546399267133977, - 1.6078041673993468, - 1.643869736728313, -] -Rcoords["pfr_boundary"]["udn2_noguards"] = [ - 1.3561302628068888, - 1.3921958320912224, - 1.4453600400989661, - 1.4912708322402373, - 1.4882937958306277, - 1.4406327328618524, - 1.3902832577388267, - 1.3569920799693926, - 1.643007920024521, - 1.6097167422668996, - 1.5593672671291863, - 1.5117062041230973, - 1.5087291683281547, - 1.5546399267133368, - 1.6078041673994237, - 1.6438697367294128, -] - -Rcoords["sol_boundary"] = {} -Rcoords["sol_boundary"]["cdn"] = [ - 1.3490394516992192, - 1.3818659386101813, - 1.428353888371968, - 1.4574482810643554, - 1.4520931461708175, - 1.3481053347554741, - 1.3481053347554743, - 1.4520931461708333, - 1.4574482810644611, - 1.428353888371238, - 1.3818659386102181, - 1.349039451699835, - 1.6509605483052638, - 1.618134061407027, - 1.5716461118141594, - 1.5425517178018866, - 1.5479068535260037, - 1.651894665244537, - 1.6518946652445372, - 1.5479068535260416, - 1.542551717802016, - 1.5716461118144105, - 1.618134061407013, - 1.6509605483055274, -] -Rcoords["sol_boundary"]["cdn_noguards"] = [ - 1.3490394516992388, - 1.3818659386102365, - 1.428353888371621, - 1.4574482810644533, - 1.4520931461708175, - 1.3481053347554741, - 1.3481053347554743, - 1.4520931461708333, - 1.4574482810643667, - 1.428353888371639, - 1.3818659386102083, - 1.3490394516992779, - 1.6509605483044465, - 1.6181340614070792, - 1.5716461118141594, - 1.542551717801988, - 1.5479068535260037, - 1.651894665244537, - 1.6518946652445372, - 1.5479068535260416, - 1.5425517178019648, - 1.5716461118146459, - 1.6181340614071251, - 1.650960548306248, -] -Rcoords["sol_boundary"]["ldn"] = [ - 1.3469057419279638, - 1.3795826401161162, - 1.4248425697240743, - 1.4493425861068616, - 1.4456277866025542, - 1.3457036730652108, - 1.3469746944527232, - 1.4529647895413647, - 1.4587665844537858, - 1.4287404652409004, - 1.3818015137427555, - 1.348529811145046, - 1.6514701891964136, - 1.6181984865874854, - 1.5712595348927372, - 1.5412334152758203, - 1.5470352103938407, - 1.6530253055472879, - 1.6542963269360622, - 1.5543722134163844, - 1.5506574141628549, - 1.5751574312782117, - 1.6204173599053093, - 1.6530942580785417, -] -Rcoords["sol_boundary"]["ldn_noguards"] = [ - 1.346905741926446, - 1.3795826401160638, - 1.4248425697237586, - 1.4493425861067895, - 1.4456277866025542, - 1.3457036730652108, - 1.3469746944527232, - 1.4529647895413647, - 1.4587665844537858, - 1.4287404652412157, - 1.3818015137427528, - 1.3485298111451958, - 1.6514701891952301, - 1.6181984865874854, - 1.5712595348927372, - 1.541233415275751, - 1.5470352103938407, - 1.6530253055472879, - 1.6542963269360622, - 1.5543722134163844, - 1.5506574141628746, - 1.5751574312795686, - 1.6204173599053024, - 1.6530942580785417, -] -Rcoords["sol_boundary"]["lsn"] = [ - 1.3511774763393163, - 1.3849498693947118, - 1.4287587615545707, - 1.4578534240560619, - 1.4563671605122155, - 1.3964046400218628, - 1.3265139519402376, - 1.3971621223084876, - 1.6028378776915158, - 1.6734860480609606, - 1.6035953599720802, - 1.543632839468597, - 1.542146575969406, - 1.571241238520578, - 1.6150501305933247, -] -Rcoords["sol_boundary"]["lsn_noguards"] = [ - 1.3511774763394229, - 1.3849498693949345, - 1.4287587615532298, - 1.4578534240560619, - 1.4563671605122155, - 1.3964046400218628, - 1.3265139519402376, - 1.3971621223084876, - 1.6028378776915158, - 1.6734860480609606, - 1.6035953599720802, - 1.543632839468597, - 1.542146575969199, - 1.5712412385212524, - 1.6150501305932232, -] -Rcoords["sol_boundary"]["usn"] = [ - 1.648822523634532, - 1.6150501305929674, - 1.571241238521114, - 1.5421465759691217, - 1.5436328394684862, - 1.603595359972079, - 1.6734860480609606, - 1.6028378776915153, - 1.3971621223084865, - 1.3265139519402378, - 1.3964046400218644, - 1.45636716051213, - 1.4578534240561523, - 1.4287587615536228, - 1.3849498693948326, -] -Rcoords["sol_boundary"]["usn_noguards"] = [ - 1.6488225236341325, - 1.6150501305933003, - 1.5712412385207188, - 1.5421465759693145, - 1.5436328394684862, - 1.603595359972079, - 1.6734860480609606, - 1.6028378776915153, - 1.3971621223084865, - 1.3265139519402378, - 1.3964046400218644, - 1.45636716051213, - 1.4578534240561012, - 1.428758761554595, - 1.3849498693945175, -] -Rcoords["sol_boundary"]["udn2"] = [ - 1.3462987131704414, - 1.3818174571697357, - 1.43105427757666, - 1.4673844284955488, - 1.4579570787713942, - 1.3407419696750136, - 1.3323530335121607, - 1.4151908478223034, - 1.4162371728834124, - 1.4048026958073287, - 1.3667941866615747, - 1.335121619092267, - 1.6648783809028975, - 1.6332058133419998, - 1.595197304141992, - 1.5837628271111848, - 1.5848091520919811, - 1.667646966487697, - 1.6592580303249864, - 1.5420429211759044, - 1.5326155715075533, - 1.5689457222517895, - 1.6181825424122647, - 1.6537012863462115, -] -Rcoords["sol_boundary"]["udn2_noguards"] = [ - 1.3462987131704414, - 1.3818174571697885, - 1.431054277576564, - 1.4673844284955464, - 1.4579570787713942, - 1.3407419696750136, - 1.3323530335121607, - 1.4151908478223034, - 1.4162371728834258, - 1.404802695807675, - 1.366794186661529, - 1.3351216190918591, - 1.6648783809036014, - 1.6332058133420464, - 1.5951973041415042, - 1.583762827111222, - 1.5848091520919811, - 1.667646966487697, - 1.6592580303249864, - 1.5420429211759044, - 1.5326155715077026, - 1.5689457222513763, - 1.6181825424123135, - 1.6537012863462115, -] - -Rcoords["targets"] = {} -Rcoords["targets"]["cdn"] = [ - [1.3570545312022744, 1.3570545312024016, 1.6429454688012248, 1.6429454688000986], - [1.355485567887546, 1.3554855678876732, 1.6445144321160046, 1.6445144321148777], - [1.3542906704066842, 1.3542906704068114, 1.6457093295968315, 1.6457093295957044], - [1.3531800003096113, 1.353180000310227, 1.64681999969322, 1.6468199996934834], - [1.351660670073396, 1.3516606700740117, 1.6483393299297315, 1.648339329929995], - [1.3490394516992192, 1.349039451699835, 1.6509605483052638, 1.6509605483055274], -] -Rcoords["targets"]["cdn_noguards"] = [ - [1.3570545312022941, 1.357054531202333, 1.6429454687997518, 1.6429454688015508], - [1.3554855678875655, 1.3554855678876045, 1.6445144321145306, 1.6445144321163303], - [1.3542906704067037, 1.3542906704067428, 1.6457093295953573, 1.6457093295971574], - [1.353180000309631, 1.35318000030967, 1.6468199996924031, 1.6468199996942037], - [1.3516606700734157, 1.3516606700734548, 1.6483393299289144, 1.6483393299307156], - [1.3490394516992388, 1.3490394516992779, 1.6509605483044465, 1.650960548306248], -] -Rcoords["targets"]["ldn"] = [ - [1.3570439233157323, 1.3578284358965287, 1.6421715644416834, 1.6429560766871614], - [1.3554786883898455, 1.3559472224699491, 1.64405277786851, 1.6445213116130981], - [1.3542866239398454, 1.3545279700647697, 1.6454720302738397, 1.6457133760630633], - [1.352499727880275, 1.3533852263336466, 1.6466147740057044, 1.6475002721216587], - [1.350686153715944, 1.3522993168796495, 1.6477006834605108, 1.6493138462869905], - [1.3492549262580957, 1.3508723082758398, 1.6491276920646714, 1.6507450737456004], - [1.3469057419279638, 1.348529811145046, 1.6514701891964136, 1.6530942580785417], -] -Rcoords["targets"]["ldn_noguards"] = [ - [1.357043923313362, 1.3578284358969717, 1.6421715644415993, 1.6429560766871614], - [1.355478688387474, 1.3559472224703923, 1.6440527778684255, 1.6445213116130981], - [1.3542866239374733, 1.354527970065213, 1.6454720302737553, 1.6457133760630633], - [1.352499727878758, 1.3533852263345278, 1.6466147740045214, 1.6475002721217678], - [1.3506861537144268, 1.352299316879799, 1.6477006834593275, 1.6493138462869905], - [1.3492549262565783, 1.3508723082759895, 1.6491276920634879, 1.6507450737456004], - [1.346905741926446, 1.3485298111451958, 1.6514701891952301, 1.6530942580785417], -] -Rcoords["targets"]["lsn"] = [ - [1.3587475360673469, 1.641252463906342], - [1.3572664799771055, 1.6427335199963515], - [1.3561382537657352, 1.6438617462079452], - [1.3550893507724362, 1.6449106492011007], - [1.3536542109397698, 1.6463457890337134], - [1.3511774763393163, 1.6488225236343166], -] -Rcoords["targets"]["lsn_noguards"] = [ - [1.3587475360674535, 1.641252463906545], - [1.357266479977212, 1.6427335199965547], - [1.356138253765842, 1.6438617462081484], - [1.355089350772543, 1.6449106492014907], - [1.3536542109398766, 1.6463457890341036], - [1.3511774763394229, 1.6488225236347065], -] -Rcoords["targets"]["usn"] = [ - [1.358747536066733, 1.6412524639052049], - [1.3572664799764917, 1.6427335199952144], - [1.3561382537651212, 1.6438617462068084], - [1.3550893507724986, 1.6449106492013161], - [1.3536542109398322, 1.6463457890339288], - [1.3511774763393787, 1.648822523634532], -] -Rcoords["targets"]["usn_noguards"] = [ - [1.3587475360672814, 1.6412524639059707], - [1.35726647997704, 1.6427335199959805], - [1.3561382537656699, 1.6438617462075742], - [1.3550893507723707, 1.6449106492009165], - [1.3536542109397043, 1.6463457890335293], - [1.3511774763392508, 1.6488225236341325], -] -Rcoords["targets"]["udn2"] = [ - [1.3561302628068888, 1.3569920799695743, 1.6430079200248795, 1.643869736728313], - [1.352582387835582, 1.355445306352312, 1.6445546936421849, 1.647417611680096], - [1.3504131361301577, 1.3542672703413088, 1.6457327296531505, 1.6495868633853048], - [1.3490694487480315, 1.3455411044833283, 1.6544588955133932, 1.6509305507683367], - [1.3480530175101113, 1.3369131433055386, 1.663086856688684, 1.6519469820064647], - [1.347125255805916, 1.3359655340329082, 1.6640344659617994, 1.6528747437106905], - [1.3462987131704414, 1.335121619092267, 1.6648783809028975, 1.6537012863462115], -] -Rcoords["targets"]["udn2_noguards"] = [ - [1.3561302628068888, 1.3569920799693926, 1.643007920024521, 1.6438697367294128], - [1.352582387835582, 1.3554453063521303, 1.6445546936418263, 1.6474176116812047], - [1.3504131361301577, 1.3542672703411271, 1.645732729652792, 1.6495868633864137], - [1.3490694487479669, 1.3455411044831653, 1.6544588955130344, 1.6509305507686016], - [1.3480530175101113, 1.336913143305131, 1.6630868566893888, 1.6519469820064647], - [1.347125255805916, 1.3359655340324998, 1.6640344659625035, 1.6528747437106905], - [1.3462987131704414, 1.3351216190918591, 1.6648783809036014, 1.6537012863462115], -] - -Rcoords["xguards"] = {} -Rcoords["xguards"]["cdn"] = [ - [ - 1.351121910216036, - 1.35220228669768, - 1.3623278204474725, - 1.3958209148363467, - 1.4478038706291676, - 1.492692022636167, - 1.486561257755058, - 1.368953744057358, - 1.3689537440573578, - 1.486561257754997, - 1.4926920226360603, - 1.4478038706287428, - 1.3958209148363077, - 1.3623278204475995, - 1.3521643489748365, - 1.3510198921430865, - 1.6488780897873665, - 1.647797713304481, - 1.6376721795557359, - 1.604179085178969, - 1.5521961294206148, - 1.507307977495029, - 1.5134387418399728, - 1.6310462559394798, - 1.6310462559394805, - 1.5134387418399813, - 1.5073079774949893, - 1.5521961294190307, - 1.604179085178953, - 1.6376721795546123, - 1.6478356510273502, - 1.648980107860485, - ], - [ - 1.348004447590053, - 1.3490903714113258, - 1.359249374717467, - 1.3926330738967567, - 1.4437686773456233, - 1.490798206234755, - 1.4818147202790337, - 1.3618622374244644, - 1.3618622374244673, - 1.4818147202789902, - 1.4907982062346612, - 1.4437686773451792, - 1.392633073896718, - 1.359249374717594, - 1.3490522455377478, - 1.3479018849824416, - 1.6519955524132763, - 1.6509096285907707, - 1.6407506252857493, - 1.6073669261185304, - 1.556231322544167, - 1.5092017940079463, - 1.5181852827366413, - 1.6381377625794893, - 1.638137762579496, - 1.518185282736638, - 1.5092017940080735, - 1.5562313225425937, - 1.6073669261185144, - 1.6407506252846238, - 1.6509477544643745, - 1.6520981150210559, - ], - [ - 1.3332194053011495, - 1.3343271797538077, - 1.3445924972200762, - 1.3770930390820126, - 1.4209602629628049, - 1.4415884232298066, - 1.4389894011687003, - 1.3437243631115814, - 1.3437243631115798, - 1.4389894011685525, - 1.4415884232297913, - 1.4209602629621443, - 1.3770930390820473, - 1.3445924972206904, - 1.334288319900861, - 1.3331146754909773, - 1.6667805947007435, - 1.665672820238051, - 1.6554075027876656, - 1.622906960939002, - 1.5790397377537149, - 1.5584115771287654, - 1.561010598856936, - 1.656275636889839, - 1.6562756368898408, - 1.5610105988569951, - 1.5584115771287144, - 1.5790397377540204, - 1.6229069609389903, - 1.6554075027879276, - 1.665711680089024, - 1.6668853245103719, - ], - [ - 1.3262059970526672, - 1.327321769486699, - 1.3376094728777217, - 1.369511681408483, - 1.409039848620753, - 1.4221923127798834, - 1.420994164772615, - 1.336836141488741, - 1.3368361414887402, - 1.4209941647726125, - 1.4221923127798908, - 1.4090398486202638, - 1.369511681408502, - 1.3376094728783352, - 1.32728264689639, - 1.326100458743324, - 1.6737940029616882, - 1.6726782304712706, - 1.6623905271253656, - 1.6304883186024017, - 1.5909601513136729, - 1.5778076873683653, - 1.5790058352442302, - 1.663163858510779, - 1.663163858510778, - 1.5790058352442373, - 1.577807687368366, - 1.5909601513138583, - 1.6304883186024062, - 1.6623905271256272, - 1.6727173530738773, - 1.6738995412702466, - ], -] -Rcoords["xguards"]["cdn_noguards"] = [ - [ - 1.362327820447492, - 1.395820914836355, - 1.4478038706290874, - 1.492692022636787, - 1.486561257755058, - 1.368953744057358, - 1.3689537440573578, - 1.486561257754997, - 1.4926920226362956, - 1.4478038706290968, - 1.3958209148363254, - 1.362327820447531, - 1.6376721795542666, - 1.6041790851789584, - 1.5521961294187692, - 1.5073079774950215, - 1.5134387418399728, - 1.6310462559394798, - 1.6310462559394805, - 1.5134387418399813, - 1.5073079774951117, - 1.5521961294193054, - 1.6041790851790065, - 1.6376721795560605, - ], - [ - 1.3592493747174865, - 1.392633073896765, - 1.4437686773454856, - 1.490798206235344, - 1.4818147202790337, - 1.3618622374244644, - 1.3618622374244673, - 1.4818147202789902, - 1.4907982062349159, - 1.443768677345542, - 1.3926330738967356, - 1.3592493747175254, - 1.6407506252842776, - 1.6073669261185197, - 1.5562313225422537, - 1.5092017940081999, - 1.5181852827366413, - 1.6381377625794893, - 1.638137762579496, - 1.518185282736638, - 1.5092017940081095, - 1.55623132254283, - 1.6073669261185675, - 1.6407506252860744, - ], - [ - 1.3445924972200949, - 1.3770930390820664, - 1.4209602629625102, - 1.4415884232298977, - 1.4389894011687003, - 1.3437243631115814, - 1.3437243631115798, - 1.4389894011685525, - 1.441588423229877, - 1.4209602629625657, - 1.3770930390820382, - 1.3445924972201362, - 1.655407502786848, - 1.622906960939055, - 1.5790397377537149, - 1.55841157712874, - 1.561010598856936, - 1.656275636889839, - 1.6562756368898408, - 1.5610105988569951, - 1.5584115771287512, - 1.5790397377542538, - 1.622906960939097, - 1.655407502788648, - ], - [ - 1.3376094728777397, - 1.3695116814085149, - 1.4090398486205347, - 1.4221923127799057, - 1.420994164772615, - 1.336836141488741, - 1.3368361414887402, - 1.4209941647726125, - 1.4221923127798881, - 1.4090398486205629, - 1.3695116814084995, - 1.3376094728777794, - 1.6623905271245505, - 1.6304883186024464, - 1.5909601513136729, - 1.5778076873683804, - 1.5790058352442302, - 1.663163858510779, - 1.663163858510778, - 1.5790058352442373, - 1.5778076873683728, - 1.590960151313976, - 1.6304883186024979, - 1.6623905271263468, - ], -] -Rcoords["xguards"]["ldn"] = [ - [ - 1.351098589384265, - 1.3521788839426898, - 1.3623045970898828, - 1.395797959163961, - 1.4477780091741834, - 1.4926834291433386, - 1.4864806214332302, - 1.368631309427173, - 1.3698090067348359, - 1.4872681256761575, - 1.4934464062521289, - 1.4503887672683942, - 1.3977266918936748, - 1.363736709838577, - 1.3533257052197223, - 1.3521379085718201, - 1.6477562750728374, - 1.6466351292323067, - 1.6362632904985197, - 1.602273308453927, - 1.5496112317689643, - 1.5065535928113045, - 1.5127318754963148, - 1.6301909932626546, - 1.6313686905677403, - 1.5135193774611118, - 1.5073165709771084, - 1.5522219908705397, - 1.6042020408496631, - 1.637695402912722, - 1.6478590532245063, - 1.6490034229808332, - ], - [ - 1.347988628128352, - 1.3490744540594475, - 1.3592335330638599, - 1.392617591464978, - 1.443750648935448, - 1.4907882929636607, - 1.4817138307503468, - 1.361549363842047, - 1.3627589417724468, - 1.4834389270834842, - 1.4920036438260467, - 1.4462234948516197, - 1.3942520194705026, - 1.360360183158408, - 1.349908967677857, - 1.3487142657286941, - 1.651179282181987, - 1.650051647545224, - 1.6396398171790492, - 1.6057479808745077, - 1.5537765064711275, - 1.5079963558982965, - 1.5165610722234397, - 1.6372410582288035, - 1.6384506361622961, - 1.5182861719822283, - 1.5092117072797038, - 1.5562493509503477, - 1.6073824085486303, - 1.6407664669387616, - 1.6509636707261006, - 1.6521139272216052, - ], - [ - 1.331652219482794, - 1.3327617803544605, - 1.3430335145416086, - 1.3754102396757901, - 1.4183218642268585, - 1.436832049692153, - 1.434687273740982, - 1.341885366896081, - 1.3431692359344067, - 1.4413451555716321, - 1.444317711320687, - 1.4223122898158775, - 1.3776543916556372, - 1.3446679711015668, - 1.3340958310021072, - 1.332875116468144, - 1.6670160123899918, - 1.665863968360624, - 1.6553320292409293, - 1.6223456086712678, - 1.5776877116190804, - 1.555682288856037, - 1.5586548444483375, - 1.6568307640661877, - 1.6581146331045529, - 1.5653127262048465, - 1.563167950019121, - 1.581678135604835, - 1.6245897603406352, - 1.656966485463827, - 1.6672771409445588, - 1.6684526924348846, - ], - [ - 1.325637101434888, - 1.326753331113207, - 1.3370420504825662, - 1.3688925224537702, - 1.4080713070581263, - 1.4207999336326707, - 1.4196470516811073, - 1.3359716154556776, - 1.3372739467612569, - 1.425262881224959, - 1.4266873813657137, - 1.412061468991139, - 1.3711672168055946, - 1.3386910400836858, - 1.3280989936790553, - 1.3268707574960314, - 1.6730196598870926, - 1.6718605754443987, - 1.6613089602564404, - 1.628832783508034, - 1.5879385302875033, - 1.5733126184536028, - 1.5747371173136064, - 1.6627260532384367, - 1.6640283845438084, - 1.5803529490446113, - 1.5792000664468828, - 1.5919286928850416, - 1.6311074775557732, - 1.6629579495199183, - 1.6732858083217452, - 1.674468486575013, - ], -] -Rcoords["xguards"]["ldn_noguards"] = [ - [ - 1.362304597087519, - 1.395797959163996, - 1.4477780091749874, - 1.4926834291432176, - 1.4864806214332302, - 1.368631309427173, - 1.3698090067348359, - 1.4872681256761575, - 1.4934464062522053, - 1.4503887672683942, - 1.3977266918936937, - 1.3637367098390185, - 1.6362632904984356, - 1.602273308453927, - 1.549611231769838, - 1.50655359281094, - 1.5127318754963148, - 1.6301909932626546, - 1.6313686905677403, - 1.5135193774611118, - 1.5073165709774448, - 1.5522219908721602, - 1.6042020408496847, - 1.637695402912722, - ], - [ - 1.3592335330614917, - 1.3926175914650125, - 1.4437506489362724, - 1.4907882929634249, - 1.4817138307503468, - 1.361549363842047, - 1.3627589417724468, - 1.4834389270834842, - 1.4920036438261082, - 1.4462234948516197, - 1.3942520194705212, - 1.3603601831588505, - 1.6396398171789648, - 1.6057479808745077, - 1.5537765064720164, - 1.5079963558979006, - 1.5165610722234397, - 1.6372410582288035, - 1.6384506361622961, - 1.5182861719822283, - 1.5092117072798492, - 1.556249350951955, - 1.6073824085486514, - 1.6407664669387616, - ], - [ - 1.343033514540093, - 1.375410239675744, - 1.4183218642265392, - 1.4368320496920977, - 1.434687273740982, - 1.341885366896081, - 1.3431692359344067, - 1.4413451555716321, - 1.444317711320687, - 1.4223122898161236, - 1.3776543916556343, - 1.3446679711017155, - 1.655332029239746, - 1.6223456086712678, - 1.5776877116190804, - 1.555682288855979, - 1.5586548444483375, - 1.6568307640661877, - 1.6581146331045529, - 1.5653127262048465, - 1.5631679500191389, - 1.5816781356060858, - 1.6245897603406356, - 1.656966485463827, - ], - [ - 1.3370420504810534, - 1.3688925224536945, - 1.4080713070578408, - 1.4207999336325978, - 1.4196470516811073, - 1.3359716154556776, - 1.3372739467612569, - 1.425262881224959, - 1.4266873813657137, - 1.4120614689912843, - 1.3711672168055882, - 1.338691040083835, - 1.6613089602552595, - 1.628832783508034, - 1.5879385302875033, - 1.5733126184535997, - 1.5747371173136064, - 1.6627260532384367, - 1.6640283845438084, - 1.5803529490446113, - 1.5792000664469061, - 1.5919286928859184, - 1.631107477555789, - 1.6629579495199183, - ], -] -Rcoords["xguards"]["lsn"] = [ - [ - 1.3455252435239562, - 1.3493913431172626, - 1.3637220088424484, - 1.3982699537381769, - 1.4471857696439225, - 1.4906554702647472, - 1.4910962725663104, - 1.4183689061216884, - 1.347340277454199, - 1.4098520146298, - 1.5901479853836888, - 1.6526597225423467, - 1.581631093877856, - 1.5089037420746465, - 1.5093445300821495, - 1.552814230379457, - 1.6017300462490345, - 1.6362779911319922, - 1.6506702768032917, - 1.6547205511460767, - ], - [ - 1.3425532770504351, - 1.346443053635181, - 1.3608186662336084, - 1.3952319732756344, - 1.4433368662554624, - 1.488345547194421, - 1.48774330872351, - 1.411166995835766, - 1.340212483028225, - 1.405507741486143, - 1.5944922585193568, - 1.659787516968471, - 1.588833004162218, - 1.512256691532882, - 1.5116544534580802, - 1.556663133633662, - 1.6047680267117381, - 1.6391813337406693, - 1.6536188989082803, - 1.6576942096655574, - ], - [ - 1.3284609854072722, - 1.332450371230052, - 1.346973708708679, - 1.3803836986436298, - 1.421791277741284, - 1.4429193161182974, - 1.44224301735662, - 1.3915236629982315, - 1.3221852092423503, - 1.3945260228812124, - 1.6054739771203768, - 1.6778147907598482, - 1.608476336996642, - 1.557756982876659, - 1.557080683696084, - 1.5782087231523974, - 1.619616301352411, - 1.6530262912678624, - 1.6676129431407054, - 1.6717938547846003, - ], - [ - 1.321780904871205, - 1.3258106290864096, - 1.340368792899633, - 1.3731234588048673, - 1.4105407048777987, - 1.4242960514999263, - 1.4239928203707015, - 1.3837168983841686, - 1.3154102314765304, - 1.3904012676011617, - 1.6095987323948033, - 1.6845897685236457, - 1.6162831016236154, - 1.5760071793143173, - 1.5757039485781243, - 1.5894592950508604, - 1.6268765411960413, - 1.659631207072607, - 1.6742532160786563, - 1.678477031369694, - ], -] -Rcoords["xguards"]["lsn_noguards"] = [ - [ - 1.3637220088425548, - 1.398269953738293, - 1.4471857696424724, - 1.4906554702651351, - 1.4910962725663104, - 1.4183689061216884, - 1.347340277454199, - 1.4098520146298, - 1.5901479853836888, - 1.6526597225423467, - 1.581631093877856, - 1.5089037420746465, - 1.5093445300820905, - 1.5528142303802623, - 1.6017300462490933, - 1.636277991132195, - ], - [ - 1.360818666233715, - 1.3952319732757494, - 1.443336866254031, - 1.4883455471948903, - 1.48774330872351, - 1.411166995835766, - 1.340212483028225, - 1.405507741486143, - 1.5944922585193568, - 1.659787516968471, - 1.588833004162218, - 1.512256691532882, - 1.511654453458001, - 1.556663133634471, - 1.6047680267117963, - 1.639181333740872, - ], - [ - 1.3469737087087863, - 1.3803836986438645, - 1.421791277740131, - 1.4429193161182974, - 1.44224301735662, - 1.3915236629982315, - 1.3221852092423503, - 1.3945260228812124, - 1.6054739771203768, - 1.6778147907598482, - 1.608476336996642, - 1.557756982876659, - 1.5570806836959035, - 1.5782087231528799, - 1.6196163013523026, - 1.6530262912682507, - ], - [ - 1.3403687928997388, - 1.3731234588050774, - 1.4105407048768301, - 1.4242960514999263, - 1.4239928203707015, - 1.3837168983841686, - 1.3154102314765304, - 1.3904012676011617, - 1.6095987323948033, - 1.6845897685236457, - 1.6162831016236154, - 1.5760071793143173, - 1.575703948578177, - 1.5894592950512672, - 1.626876541195918, - 1.6596312070729946, - ], -] -Rcoords["xguards"]["usn"] = [ - [ - 1.654474756464572, - 1.6506086568630587, - 1.636277991130857, - 1.6017300462488244, - 1.5528142303789878, - 1.5093445300822081, - 1.5089037420747426, - 1.5816310938778486, - 1.6526597225423485, - 1.5901479853836862, - 1.409852014629798, - 1.3473402774541983, - 1.4183689061216866, - 1.491096272566348, - 1.4906554702651578, - 1.447185769642965, - 1.3982699537381038, - 1.3637220088418354, - 1.3493297231775065, - 1.345279448841912, - ], - [ - 1.657446722937884, - 1.6535569463448578, - 1.639181333739533, - 1.6047680267115303, - 1.5566631336332595, - 1.5116544534581375, - 1.512256691532967, - 1.5888330041622236, - 1.6597875169684724, - 1.5944922585193497, - 1.40550774148615, - 1.3402124830282256, - 1.411166995835764, - 1.487743308723576, - 1.488345547194911, - 1.443336866254511, - 1.395231973275562, - 1.3608186662329946, - 1.3463811010722373, - 1.342305790322168, - ], - [ - 1.6715390145846454, - 1.6675496287466045, - 1.653026291268075, - 1.6196163013520648, - 1.5782087231528439, - 1.5570806836958537, - 1.5577569828766566, - 1.6084763369966428, - 1.6778147907598484, - 1.6054739771203772, - 1.394526022881213, - 1.3221852092423507, - 1.3915236629982273, - 1.442243017356615, - 1.442919316118298, - 1.4217912777403656, - 1.38038369864374, - 1.3469737087087414, - 1.3323870568360807, - 1.3282061452488694, - ], - [ - 1.678219095092287, - 1.674189370899626, - 1.659631207072821, - 1.6268765411956827, - 1.5894592950512105, - 1.5757039485781132, - 1.57600717931436, - 1.6162831016235555, - 1.684589768523645, - 1.6095987323948024, - 1.3904012676011606, - 1.315410231476531, - 1.3837168983841137, - 1.4239928203707217, - 1.4242960515000347, - 1.4105407048770908, - 1.3731234588049788, - 1.3403687928996944, - 1.3257467839070638, - 1.3215229686179963, - ], -] -Rcoords["xguards"]["usn_noguards"] = [ - [ - 1.6362779911316216, - 1.6017300462491744, - 1.5528142303795978, - 1.5093445300822081, - 1.5089037420747426, - 1.5816310938778486, - 1.6526597225423485, - 1.5901479853836862, - 1.409852014629798, - 1.3473402774541983, - 1.4183689061216866, - 1.491096272566348, - 1.4906554702654382, - 1.447185769644194, - 1.3982699537378551, - 1.363722008842383, - ], - [ - 1.6391813337402983, - 1.6047680267118767, - 1.5566631336337977, - 1.5116544534581375, - 1.512256691532967, - 1.5888330041622236, - 1.6597875169684724, - 1.5944922585193497, - 1.40550774148615, - 1.3402124830282256, - 1.411166995835764, - 1.487743308723576, - 1.4883455471952527, - 1.4433368662556876, - 1.3952319732753151, - 1.3608186662335429, - ], - [ - 1.653026291267677, - 1.6196163013523994, - 1.5782087231524105, - 1.5570806836960491, - 1.5577569828766566, - 1.6084763369966428, - 1.6778147907598484, - 1.6054739771203772, - 1.394526022881213, - 1.3221852092423507, - 1.3915236629982273, - 1.442243017356615, - 1.4429193161182952, - 1.4217912777413675, - 1.3803836986434368, - 1.3469737087086135, - ], - [ - 1.6596312070724228, - 1.6268765411959925, - 1.5894592950509234, - 1.575703948578138, - 1.57600717931436, - 1.6162831016235555, - 1.684589768523645, - 1.6095987323948024, - 1.3904012676011606, - 1.315410231476531, - 1.3837168983841137, - 1.4239928203707217, - 1.4242960515000136, - 1.4105407048778384, - 1.3731234588047012, - 1.3403687928995673, - ], -] -Rcoords["xguards"]["udn2"] = [ - [ - 1.3566478664544601, - 1.3579988496006845, - 1.3696385719249695, - 1.4058233282355241, - 1.4593006129142247, - 1.4948537517652694, - 1.4893192689349615, - 1.3742585606242101, - 1.3668340969973196, - 1.486045195136874, - 1.4926403442619092, - 1.4476498821102146, - 1.3956847844634048, - 1.3621902950467577, - 1.3520257471569581, - 1.350881782386862, - 1.6490162315839503, - 1.647936318047838, - 1.637809704947434, - 1.6043152155425249, - 1.5523501179293626, - 1.5073596558005014, - 1.5139548025133345, - 1.6331659030046604, - 1.6257414393512508, - 1.510680732651356, - 1.505146248235607, - 1.5406993673279348, - 1.5941766713379775, - 1.6303614275692317, - 1.642046919559591, - 1.6434791167006424, - ], - [ - 1.3484728648460536, - 1.3498445981646738, - 1.361618877236275, - 1.3978258549802423, - 1.4517606013650703, - 1.4933130755398047, - 1.4875429253028418, - 1.3674489852188003, - 1.3597970009521656, - 1.4811709450167876, - 1.4907386255187691, - 1.4436614495151918, - 1.3925414290486269, - 1.359155776020733, - 1.3489581888158104, - 1.3478084210264438, - 1.6520890576008822, - 1.651003691397421, - 1.6408442239735124, - 1.6074585709573437, - 1.5563385503708618, - 1.5092613746912342, - 1.5188290548035965, - 1.6402029990488411, - 1.6325510147407583, - 1.5124570589033621, - 1.5066869246017365, - 1.5482394155556611, - 1.6021741445306934, - 1.6383811222735993, - 1.6502018545828614, - 1.6516561306854354, - ], - [ - 1.332292062597162, - 1.333693768398807, - 1.345616885800996, - 1.3810847540536186, - 1.4299376554930872, - 1.4639054144568566, - 1.455826853831905, - 1.3400688131480294, - 1.3316643766458336, - 1.413632219615771, - 1.4146230489656362, - 1.403614325515295, - 1.3660303685049033, - 1.334425679968123, - 1.3240944356958433, - 1.3229096511401175, - 1.6769845442293456, - 1.6758663519569519, - 1.665574320027344, - 1.6339696314989536, - 1.5963856744289553, - 1.5853769510279005, - 1.586367780289182, - 1.6683356233541087, - 1.6599311868519706, - 1.5441731461889807, - 1.5360945855409402, - 1.5700623443368267, - 1.618915245529635, - 1.6543831137157088, - 1.6663536557762033, - 1.6678398905493939, - ], - [ - 1.331768179431066, - 1.3331706266541552, - 1.3450961081611121, - 1.3805240532855545, - 1.4290757421360494, - 1.4613575191094241, - 1.4541748682724243, - 1.3395546701317573, - 1.33113849241184, - 1.4124554226260884, - 1.4134069283094408, - 1.4027080904331561, - 1.3654465665898001, - 1.3338942566674936, - 1.3235625342279993, - 1.3223772182321727, - 1.6775169255474114, - 1.676398237610659, - 1.666105743328099, - 1.6345534334142031, - 1.5972919095083473, - 1.5865930716904804, - 1.5875445772861958, - 1.6688615075881397, - 1.6604453298682427, - 1.5458251317341947, - 1.5386424808888686, - 1.570924257698443, - 1.6194759462986774, - 1.65490389135564, - 1.666876821096251, - 1.6683638483146104, - ], -] -Rcoords["xguards"]["udn2_noguards"] = [ - [ - 1.3696385719249695, - 1.4058233282355481, - 1.4593006129140935, - 1.494853751765254, - 1.4893192689349615, - 1.3742585606242101, - 1.3668340969973196, - 1.486045195136874, - 1.4926403442619964, - 1.447649882111345, - 1.3956847844633844, - 1.3621902950465767, - 1.6378097049470766, - 1.6043152155425704, - 1.5523501179293626, - 1.5073596558002615, - 1.5139548025133345, - 1.6331659030046604, - 1.6257414393512508, - 1.510680732651356, - 1.505146248235607, - 1.5406993673278804, - 1.5941766713380492, - 1.6303614275703469, - ], - [ - 1.361618877236275, - 1.3978258549802558, - 1.4517606013650604, - 1.493313075539754, - 1.4875429253028418, - 1.3674489852188003, - 1.3597970009521656, - 1.4811709450167876, - 1.4907386255187727, - 1.4436614495163882, - 1.3925414290486064, - 1.3591557760205517, - 1.6408442239731542, - 1.6074585709573885, - 1.5563385503708618, - 1.5092613746912025, - 1.5188290548035965, - 1.6402029990488411, - 1.6325510147407583, - 1.5124570589033621, - 1.5066869246017365, - 1.5482394155555441, - 1.602174144530755, - 1.6383811222747031, - ], - [ - 1.345616885800996, - 1.3810847540536715, - 1.4299376554929877, - 1.4639054144568346, - 1.455826853831905, - 1.3400688131480294, - 1.3316643766458336, - 1.413632219615771, - 1.4146230489656797, - 1.4036143255156914, - 1.3660303685048831, - 1.3344256799677154, - 1.6655743200280473, - 1.6339696314990042, - 1.5963856744284786, - 1.5853769510279496, - 1.586367780289182, - 1.6683356233541087, - 1.6599311868519706, - 1.5441731461889807, - 1.5360945855409456, - 1.5700623443364188, - 1.6189152455296838, - 1.6543831137157088, - ], - [ - 1.3450961081611121, - 1.3805240532856071, - 1.4290757421359543, - 1.4613575191094192, - 1.4541748682724243, - 1.3395546701317573, - 1.33113849241184, - 1.4124554226260884, - 1.4134069283093629, - 1.4027080904335507, - 1.3654465665897464, - 1.3338942566670866, - 1.6661057433288022, - 1.6345534334142475, - 1.5972919095079305, - 1.586593071690503, - 1.5875445772861958, - 1.6688615075881397, - 1.6604453298682427, - 1.5458251317341947, - 1.538642480888868, - 1.5709242576980418, - 1.6194759462987263, - 1.65490389135564, - ], -] - -Rcoords["yguards"] = {} -Rcoords["yguards"]["cdn"] = [ - [ - 1.351121910216036, - 1.35220228669768, - 1.3521643489748365, - 1.3510198921430865, - 1.6488780897873665, - 1.647797713304481, - 1.6478356510273502, - 1.648980107860485, - ], - [ - 1.348004447590053, - 1.3490903714113258, - 1.3490522455377478, - 1.3479018849824416, - 1.6519955524132763, - 1.6509096285907707, - 1.6509477544643745, - 1.6520981150210559, - ], - [ - 1.3457844654346356, - 1.3468741313594736, - 1.3468358789015256, - 1.3456815344532564, - 1.6542155345687861, - 1.6531258686426702, - 1.6531641211006447, - 1.6543184655503398, - ], - [ - 1.3441988658198571, - 1.3452911008421307, - 1.345252761656299, - 1.3440956813882579, - 1.6558011341836467, - 1.654708899160098, - 1.6547472383459563, - 1.6559043186154196, - ], - [ - 1.3429920314796377, - 1.3440861649646945, - 1.3440477617915498, - 1.3428886594438583, - 1.657007968523749, - 1.6559138350374567, - 1.6559522382106273, - 1.6571113405596958, - ], - [ - 1.3418708265465504, - 1.3429666803315563, - 1.3429282192567884, - 1.3417672842635695, - 1.6581291734567583, - 1.6570333196705196, - 1.6570717807453215, - 1.6582327157393875, - ], - [ - 1.3403379479540054, - 1.341436086891985, - 1.3413975490292447, - 1.3402341791370624, - 1.6596620520491099, - 1.6585639131098826, - 1.6586024509726571, - 1.6597658208657016, - ], - [ - 1.337695653831142, - 1.3387975540037518, - 1.3387588900952503, - 1.3375915110916137, - 1.662304346172477, - 1.661202445998645, - 1.6612411099071795, - 1.6624084889116495, - ], - [ - 1.3332194053011495, - 1.3343271797538077, - 1.334288319900861, - 1.3331146754909773, - 1.6667805947007435, - 1.665672820238051, - 1.665711680089024, - 1.6668853245103719, - ], - [ - 1.3262059970526672, - 1.327321769486699, - 1.32728264689639, - 1.326100458743324, - 1.6737940029616882, - 1.6726782304712706, - 1.6727173530738773, - 1.6738995412702466, - ], -] -Rcoords["yguards"]["ldn"] = [ - [ - 1.351098589384265, - 1.3521788839426898, - 1.3533257052197223, - 1.3521379085718201, - 1.6477562750728374, - 1.6466351292323067, - 1.6478590532245063, - 1.6490034229808332, - ], - [ - 1.347988628128352, - 1.3490744540594475, - 1.349908967677857, - 1.3487142657286941, - 1.651179282181987, - 1.650051647545224, - 1.6509636707261006, - 1.6521139272216052, - ], - [ - 1.3457739513307034, - 1.3468635091148056, - 1.3473505208953254, - 1.3461509606109365, - 1.6537421387473443, - 1.6526099406142545, - 1.6531747419153409, - 1.6543289713937732, - ], - [ - 1.3441921246047224, - 1.3452842447098423, - 1.345451330302033, - 1.3442483321920564, - 1.655644449034799, - 1.6545090227404624, - 1.654754092824651, - 1.6559110509069928, - ], - [ - 1.342988153568164, - 1.3440821672729795, - 1.3440195451641688, - 1.3428140484602902, - 1.6570785011260134, - 1.6559407292204105, - 1.655956234088865, - 1.6571152090703678, - ], - [ - 1.3411845720082245, - 1.3422813323046718, - 1.3428673443050676, - 1.3416598941186015, - 1.6582324740920198, - 1.6570928686953357, - 1.657757161469451, - 1.6589190625635988, - ], - [ - 1.3393554643467396, - 1.340454901668437, - 1.3417729653755084, - 1.3405637063674234, - 1.6593284936726487, - 1.6581871908802135, - 1.6595836819723064, - 1.6607484359045268, - ], - [ - 1.3379129565731547, - 1.3390144294479105, - 1.3403355834384743, - 1.3391240168207834, - 1.6607679683358456, - 1.6596245005653933, - 1.6610242223773937, - 1.662191146155045, - ], - [ - 1.335547092260045, - 1.3366517621523963, - 1.3379778883618967, - 1.3367627013251246, - 1.6631289458583738, - 1.6619820826358387, - 1.6633869964928438, - 1.6645573293602662, - ], - [ - 1.331652219482794, - 1.3327617803544605, - 1.3340958310021072, - 1.332875116468144, - 1.6670160123899918, - 1.665863968360624, - 1.6672771409445588, - 1.6684526924348846, - ], - [ - 1.325637101434888, - 1.326753331113207, - 1.3280989936790553, - 1.3268707574960314, - 1.6730196598870926, - 1.6718605754443987, - 1.6732858083217452, - 1.674468486575013, - ], -] -Rcoords["yguards"]["lsn"] = [ - [1.3455252435239562, 1.3493913431172626, 1.6506702768032917, 1.6547205511460767], - [1.3425532770504351, 1.346443053635181, 1.6536188989082803, 1.6576942096655574], - [1.3404368903769044, 1.3443429453238698, 1.6557192340619036, 1.6598117702341173], - [1.338925315823088, 1.34284270483694, 1.657219631564172, 1.661324167739766], - [1.3377748575335655, 1.341700711364507, 1.6583617417946508, 1.6624752438698642], - [1.336706063997912, 1.34063965769189, 1.6594229018356115, 1.6635446048797216], - [1.3352449096822347, 1.3391888928159235, 1.6608738088927946, 1.6650065249773132], - [1.3327264863239994, 1.3366878627506917, 1.663375075392321, 1.6675262415778205], - [1.3284609854072722, 1.332450371230052, 1.6676129431407054, 1.6717938547846003], - [1.321780904871205, 1.3258106290864096, 1.6742532160786563, 1.678477031369694], -] -Rcoords["yguards"]["usn"] = [ - [1.654474756464572, 1.6506086568630587, 1.3493297231775065, 1.345279448841912], - [1.657446722937884, 1.6535569463448578, 1.3463811010722373, 1.342305790322168], - [1.6595631096115744, 1.6556570546563525, 1.3442807659187972, 1.3401882297537804], - [1.6610746841654018, 1.6571572951433449, 1.342780368416595, 1.3386758322481422], - [1.6622251424547962, 1.6582992886156418, 1.3416382581859838, 1.3375247561179078], - [1.6632939359913206, 1.6593603422881587, 1.3405770981445706, 1.336455395107964], - [1.6647550903098085, 1.660811107163892, 1.3391261910871552, 1.3349934750101897], - [1.6672735136551695, 1.6633121372294644, 1.3366249245879676, 1.3324737584099309], - [1.6715390145846454, 1.6675496287466045, 1.3323870568360807, 1.3282061452488694], - [1.678219095092287, 1.674189370899626, 1.3257467839070638, 1.3215229686179963], -] -Rcoords["yguards"]["udn2"] = [ - [ - 1.3566478664544601, - 1.3579988496006845, - 1.3520257471569581, - 1.350881782386862, - 1.6490162315839503, - 1.647936318047838, - 1.642046919559591, - 1.6434791167006424, - ], - [ - 1.3484728648460536, - 1.3498445981646738, - 1.3489581888158104, - 1.3478084210264438, - 1.6520890576008822, - 1.651003691397421, - 1.6502018545828614, - 1.6516561306854354, - ], - [ - 1.3429040643496084, - 1.3442877123763077, - 1.346773335913108, - 1.3456196489536607, - 1.6542774672301779, - 1.6531884197338829, - 1.6557591296681424, - 1.657226096816295, - ], - [ - 1.3393150605894653, - 1.3407054792927553, - 1.3452126338783748, - 1.3440562539237357, - 1.6558406127461118, - 1.6547490363694077, - 1.6593415824751134, - 1.6608157679848776, - ], - [ - 1.3371246614701762, - 1.3385188742537726, - 1.3440246475438316, - 1.3428662762639825, - 1.657030405635487, - 1.6559369596668272, - 1.6615283099610973, - 1.663006543139701, - ], - [ - 1.3357693623982938, - 1.3371657971328288, - 1.3352417806128676, - 1.3340701930027874, - 1.6658252555094974, - 1.6647194111349009, - 1.6628814585251734, - 1.6643620632738587, - ], - [ - 1.334744892249557, - 1.3361429437176904, - 1.3265853682532185, - 1.3254031924103211, - 1.6744912542340455, - 1.6733754975713195, - 1.6639043637821547, - 1.665386694718918, - ], - [ - 1.3338103467451938, - 1.3352098263354846, - 1.3256361963770453, - 1.3244530031644577, - 1.6754413458336332, - 1.6743246388510324, - 1.6648375268497508, - 1.666321383046519, - ], - [ - 1.332978201463924, - 1.334378915524485, - 1.324791140139018, - 1.3236070653154028, - 1.6762871987196204, - 1.6751696686902786, - 1.665668477061708, - 1.6671536520677814, - ], - [ - 1.332292062597162, - 1.333693768398807, - 1.3240944356958433, - 1.3229096511401175, - 1.6769845442293456, - 1.6758663519569519, - 1.6663536557762033, - 1.6678398905493939, - ], - [ - 1.331768179431066, - 1.3331706266541552, - 1.3235625342279993, - 1.3223772182321727, - 1.6775169255474114, - 1.676398237610659, - 1.666876821096251, - 1.6683638483146104, - ], -] - - -@pytest.fixture(scope="session") -def example_grids(tmp_path_factory): - # Pytest fixture to make temporary directory - # the decorator makes sure the files are only used for this session - # and don't break stuff - tmp = tmp_path_factory.mktemp("hypnotoad") - url = "https://zenodo.org/records/17966926/files/Hypnotoad_examples.zip" - urlretrieve(url, "Hypnotoad_examples.zip") - with zipfile.ZipFile("Hypnotoad_examples.zip", "r") as z: - z.extractall(tmp) - - return tmp - - -def test_selectors(example_grids): - grids = dict( - cdn=example_grids / "example_cdn.grd.nc", - cdn_noguards=example_grids / "example_cdn_noguards.grd.nc", - ldn=example_grids / "example_ldn.grd.nc", - ldn_noguards=example_grids / "example_ldn_noguards.grd.nc", - lsn=example_grids / "example_lsn.grd.nc", - lsn_noguards=example_grids / "example_lsn_noguards.grd.nc", - usn=example_grids / "example_usn.grd.nc", - usn_noguards=example_grids / "example_usn_noguards.grd.nc", - udn2=example_grids / "example_udn2.grd.nc", - udn2_noguards=example_grids / "example_udn2_noguards.grd.nc", - ) - - for selection in Rcoords.keys(): - for geometry in Rcoords[selection].keys(): - expected = Rcoords[selection][geometry] - ds = xhermes.HypnotoadGrid(grids[geometry]) - test = ds["Rxy"][xhermes.slice_2d(ds, selection)] - - npt.assert_array_equal( - test, - expected, - err_msg=f"Selector mismatch for {selection} in {geometry}!", - )