Skip to content

Instantly share code, notes, and snippets.

@cdeil
Created July 4, 2019 12:27
Show Gist options
  • Save cdeil/c3d55981734bb7cd574f8473d18e2cc8 to your computer and use it in GitHub Desktop.
Save cdeil/c3d55981734bb7cd574f8473d18e2cc8 to your computer and use it in GitHub Desktop.
(astropy-healpix) hfm-1804a:cds-healpix-python deil$ cp build/lib/cdshealpix/cdshealpix.cpython-36m-darwin.so cdshealpix/
(astropy-healpix) hfm-1804a:cds-healpix-python deil$ python -m pytest -v cdshealpix
====================================================================================== test session starts ======================================================================================
platform darwin -- Python 3.6.0, pytest-5.0.0, py-1.8.0, pluggy-0.12.0 -- /Users/deil/software/anaconda3/envs/astropy-healpix/bin/python
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/Users/deil/work/code/cds-healpix-python/.hypothesis/examples')
benchmark: 3.2.2 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /Users/deil/work/code/cds-healpix-python
plugins: arraydiff-0.3, hypothesis-4.24.6, benchmark-3.2.2, doctestplus-0.3.0, remotedata-0.3.1, openfiles-0.3.1
collected 109 items
cdshealpix/tests/test_benchmark_healpix.py::test_lonlat_to_healpix PASSED [ 0%]
cdshealpix/tests/test_benchmark_healpix.py::test_lonlat_to_healpix_astropy PASSED [ 1%]
cdshealpix/tests/test_benchmark_healpix.py::test_healpix_to_lonlat PASSED [ 2%]
cdshealpix/tests/test_benchmark_healpix.py::test_healpix_to_lonlat_astropy PASSED [ 3%]
cdshealpix/tests/test_benchmark_healpix.py::test_healpix_to_skycoord PASSED [ 4%]
cdshealpix/tests/test_benchmark_healpix.py::test_healpix_vertices_lonlat PASSED [ 5%]
cdshealpix/tests/test_benchmark_healpix.py::test_healpix_vertices_lonlat_astropy PASSED [ 6%]
cdshealpix/tests/test_benchmark_healpix.py::test_healpix_neighbours PASSED [ 7%]
cdshealpix/tests/test_benchmark_healpix.py::test_cone_search PASSED [ 8%]
cdshealpix/tests/test_benchmark_healpix.py::test_cone_search_astropy PASSED [ 9%]
cdshealpix/tests/test_nested_healpix.py::test_lonlat_to_healpix[1] PASSED [ 10%]
cdshealpix/tests/test_nested_healpix.py::test_lonlat_to_healpix[10] PASSED [ 11%]
cdshealpix/tests/test_nested_healpix.py::test_lonlat_to_healpix[100] PASSED [ 11%]
cdshealpix/tests/test_nested_healpix.py::test_lonlat_to_healpix[1000] PASSED [ 12%]
cdshealpix/tests/test_nested_healpix.py::test_lonlat_to_healpix[10000] PASSED [ 13%]
cdshealpix/tests/test_nested_healpix.py::test_lonlat_to_healpix[100000] PASSED [ 14%]
cdshealpix/tests/test_nested_healpix.py::test_lonlat_to_healpix[1000000] PASSED [ 15%]
cdshealpix/tests/test_nested_healpix.py::test_healpix_to_lonlat[1] PASSED [ 16%]
cdshealpix/tests/test_nested_healpix.py::test_healpix_to_lonlat[10] PASSED [ 17%]
cdshealpix/tests/test_nested_healpix.py::test_healpix_to_lonlat[100] PASSED [ 18%]
cdshealpix/tests/test_nested_healpix.py::test_healpix_to_lonlat[1000] PASSED [ 19%]
cdshealpix/tests/test_nested_healpix.py::test_healpix_to_lonlat[10000] PASSED [ 20%]
cdshealpix/tests/test_nested_healpix.py::test_healpix_to_lonlat[100000] PASSED [ 21%]
cdshealpix/tests/test_nested_healpix.py::test_healpix_to_lonlat[1000000] PASSED [ 22%]
cdshealpix/tests/test_nested_healpix.py::test_healpix_to_lonlat_on_brocasted_arrays PASSED [ 22%]
cdshealpix/tests/test_nested_healpix.py::test_invalid_depth_exception PASSED [ 23%]
cdshealpix/tests/test_nested_healpix.py::test_lonlat_shape_exception PASSED [ 24%]
cdshealpix/tests/test_nested_healpix.py::test_invalid_ipix_exception[0] PASSED [ 25%]
cdshealpix/tests/test_nested_healpix.py::test_invalid_ipix_exception[12] PASSED [ 26%]
cdshealpix/tests/test_nested_healpix.py::test_invalid_ipix_exception[24] PASSED [ 27%]
cdshealpix/tests/test_nested_healpix.py::test_healpix_to_skycoord PASSED [ 28%]
cdshealpix/tests/test_nested_healpix.py::test_vertices_lonlat PASSED [ 29%]
cdshealpix/tests/test_nested_healpix.py::test_neighbours PASSED [ 30%]
cdshealpix/tests/test_nested_healpix.py::test_cone_search PASSED [ 31%]
cdshealpix/tests/test_nested_healpix.py::test_polygon_search[0] PASSED [ 32%]
cdshealpix/tests/test_nested_healpix.py::test_polygon_search[1] PASSED [ 33%]
cdshealpix/tests/test_nested_healpix.py::test_polygon_search[2] PASSED [ 33%]
cdshealpix/tests/test_nested_healpix.py::test_polygon_search[3] PASSED [ 34%]
cdshealpix/tests/test_nested_healpix.py::test_polygon_search[5] PASSED [ 35%]
cdshealpix/tests/test_nested_healpix.py::test_polygon_search[6] PASSED [ 36%]
cdshealpix/tests/test_nested_healpix.py::test_polygon_search[9] PASSED [ 37%]
cdshealpix/tests/test_nested_healpix.py::test_polygon_search_not_enough_vertices_exception PASSED [ 38%]
cdshealpix/tests/test_nested_healpix.py::test_elliptical_cone_search PASSED [ 39%]
cdshealpix/tests/test_nested_healpix.py::test_external_neighbours[0-0-expected_border_cells0-expected_corner_cells0] PASSED [ 40%]
cdshealpix/tests/test_nested_healpix.py::test_external_neighbours[27-0-expected_border_cells1-expected_corner_cells1] PASSED [ 41%]
cdshealpix/tests/test_nested_healpix.py::test_healpix_to_xy[ipix0-0-expected_x0-expected_y0] PASSED [ 42%]
cdshealpix/tests/test_nested_healpix.py::test_healpix_to_xy[ipix1-0-expected_x1-expected_y1] PASSED [ 43%]
cdshealpix/tests/test_nested_healpix.py::test_healpix_to_xy[0-0-expected_x2-expected_y2] PASSED [ 44%]
cdshealpix/tests/test_nested_healpix.py::test_healpix_to_xy_expection PASSED [ 44%]
cdshealpix/tests/test_nested_healpix.py::test_lonlat_to_xy[lon0-lat0-expected_x0-expected_y0] PASSED [ 45%]
cdshealpix/tests/test_nested_healpix.py::test_xy_to_lonlat[x0-y0-expected_lon0-expected_lat0] PASSED [ 46%]
cdshealpix/tests/test_nested_healpix.py::test_to_ring[pix0-0-expected_ring_pix0] PASSED [ 47%]
cdshealpix/tests/test_nested_healpix.py::test_to_ring[4-1-15] PASSED [ 48%]
cdshealpix/tests/test_nested_healpix.py::test_to_ring[pix2-1-expected_ring_pix2] PASSED [ 49%]
cdshealpix/tests/test_nested_healpix.py::test_to_ring[pix3-1-expected_ring_pix3] PASSED [ 50%]
cdshealpix/tests/test_nested_healpix.py::test_from_ring[pix0-0-expected_nested_pix0] PASSED [ 51%]
cdshealpix/tests/test_nested_healpix.py::test_from_ring[15-1-4] PASSED [ 52%]
cdshealpix/tests/test_nested_healpix.py::test_from_ring[pix2-1-expected_nested_pix2] PASSED [ 53%]
cdshealpix/tests/test_nested_healpix.py::test_from_ring[pix3-1-expected_nested_pix3] PASSED [ 54%]
cdshealpix/tests/test_nested_healpix.py::test_from_vs_to_ring[1] PASSED [ 55%]
cdshealpix/tests/test_nested_healpix.py::test_from_vs_to_ring[10] PASSED [ 55%]
cdshealpix/tests/test_nested_healpix.py::test_from_vs_to_ring[100] PASSED [ 56%]
cdshealpix/tests/test_nested_healpix.py::test_from_vs_to_ring[1000] PASSED [ 57%]
cdshealpix/tests/test_nested_healpix.py::test_from_vs_to_ring[10000] PASSED [ 58%]
cdshealpix/tests/test_nested_healpix.py::test_from_vs_to_ring[100000] PASSED [ 59%]
cdshealpix/tests/test_nested_healpix.py::test_bilinear_interpolation[5] PASSED [ 60%]
cdshealpix/tests/test_nested_healpix.py::test_bilinear_interpolation[0] PASSED [ 61%]
cdshealpix/tests/test_nested_healpix.py::test_bilinear_interpolation[7] PASSED [ 62%]
cdshealpix/tests/test_nested_healpix.py::test_bilinear_interpolation[12] PASSED [ 63%]
cdshealpix/tests/test_nested_healpix.py::test_bilinear_interpolation[20] PASSED [ 64%]
cdshealpix/tests/test_nested_healpix.py::test_bilinear_interpolation[29] PASSED [ 65%]
cdshealpix/tests/test_ring_healpix.py::test_lonlat_to_healpix[1] PASSED [ 66%]
cdshealpix/tests/test_ring_healpix.py::test_lonlat_to_healpix[10] PASSED [ 66%]
cdshealpix/tests/test_ring_healpix.py::test_lonlat_to_healpix[100] PASSED [ 67%]
cdshealpix/tests/test_ring_healpix.py::test_lonlat_to_healpix[1000] PASSED [ 68%]
cdshealpix/tests/test_ring_healpix.py::test_lonlat_to_healpix[10000] PASSED [ 69%]
cdshealpix/tests/test_ring_healpix.py::test_lonlat_to_healpix_accurate[lon0-lat0-12] PASSED [ 70%]
cdshealpix/tests/test_ring_healpix.py::test_lonlat_to_healpix_accurate[lon1-lat1-16] PASSED [ 71%]
cdshealpix/tests/test_ring_healpix.py::test_lonlat_to_healpix_accurate[lon2-lat2-45] PASSED [ 72%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_to_lonlat[1] PASSED [ 73%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_to_lonlat[10] PASSED [ 74%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_to_lonlat[100] PASSED [ 75%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_to_lonlat[1000] PASSED [ 76%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_to_lonlat[10000] PASSED [ 77%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_vs_lonlat[nside0] PASSED [ 77%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_vs_lonlat[nside1] PASSED [ 78%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_vs_lonlat[nside2] PASSED [ 79%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_vs_lonlat[nside3] PASSED [ 80%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_vs_lonlat[nside4] PASSED [ 81%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_vs_lonlat[nside5] PASSED [ 82%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_vs_lonlat[nside6] PASSED [ 83%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_vs_lonlat[nside7] PASSED [ 84%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_vs_lonlat[nside8] PASSED [ 85%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_vs_lonlat[nside9] PASSED [ 86%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_to_xy_robust[1] PASSED [ 87%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_to_xy_robust[10] PASSED [ 88%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_to_xy_robust[100] PASSED [ 88%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_to_xy_robust[1000] PASSED [ 89%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_to_xy_robust[10000] PASSED [ 90%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_to_xy_robust[100000] PASSED [ 91%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_to_xy[ipix0-0-expected_x0-expected_y0] PASSED [ 92%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_to_xy[ipix1-0-expected_x1-expected_y1] PASSED [ 93%]
cdshealpix/tests/test_ring_healpix.py::test_healpix_to_xy[0-0-expected_x2-expected_y2] PASSED [ 94%]
cdshealpix/tests/test_ring_healpix.py::test_vertices_lonlat[1] PASSED [ 95%]
cdshealpix/tests/test_ring_healpix.py::test_vertices_lonlat[10] PASSED [ 96%]
cdshealpix/tests/test_ring_healpix.py::test_vertices_lonlat[100] PASSED [ 97%]
cdshealpix/tests/test_ring_healpix.py::test_vertices_lonlat[1000] PASSED [ 98%]
cdshealpix/tests/test_ring_healpix.py::test_vertices_lonlat[10000] PASSED [ 99%]
cdshealpix/tests/test_ring_healpix.py::test_vertices_lonlat[100000] PASSED [100%]
-------------------------------------------------------------------------------------- benchmark 'cone_search': 2 tests --------------------------------------------------------------------------------------
Name (time in us) Min Max Mean StdDev Median IQR Outliers OPS Rounds Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_cone_search 277.7690 (1.0) 359.2795 (1.0) 291.1093 (1.0) 16.0695 (1.0) 285.0573 (1.0) 15.5406 (1.0) 12;6 3,435.1361 (1.0) 100 10
test_cone_search_astropy 3,828.9901 (13.78) 4,502.5212 (12.53) 3,945.3703 (13.55) 101.0339 (6.29) 3,913.6295 (13.73) 91.0189 (5.86) 17;8 253.4616 (0.07) 100 10
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------- benchmark 'healpix_to_lonlat': 2 tests ---------------------------------------------------------------------------------------
Name (time in us) Min Max Mean StdDev Median IQR Outliers OPS Rounds Iterations
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_healpix_to_lonlat 269.1060 (1.0) 958.0969 (1.0) 333.2466 (1.0) 46.2928 (1.0) 320.9070 (1.0) 29.2657 (1.0) 190;148 3,000.7807 (1.0) 1535 1
test_healpix_to_lonlat_astropy 1,897.6160 (7.05) 24,571.7970 (25.65) 2,013.7592 (6.04) 1,070.2331 (23.12) 1,923.5130 (5.99) 62.1003 (2.12) 1;54 496.5837 (0.17) 451 1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------- benchmark 'lonlat_to_healpix': 2 tests --------------------------------------------------------------------------------------
Name (time in us) Min Max Mean StdDev Median IQR Outliers OPS Rounds Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_lonlat_to_healpix 243.7370 (1.0) 571.4910 (1.0) 314.8325 (1.0) 42.5421 (1.0) 302.3660 (1.0) 48.4100 (1.0) 218;34 3,176.2920 (1.0) 880 1
test_lonlat_to_healpix_astropy 1,663.8860 (6.83) 2,245.1250 (3.93) 1,756.2152 (5.58) 107.3810 (2.52) 1,720.1391 (5.69) 111.6562 (2.31) 47;25 569.4063 (0.18) 319 1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------- benchmark 'neighbours': 1 tests -----------------------------------------
Name (time in ms) Min Max Mean StdDev Median IQR Outliers OPS Rounds Iterations
------------------------------------------------------------------------------------------------------------------
test_healpix_neighbours 2.7158 4.0402 2.9016 0.1792 2.8410 0.1408 28;19 344.6316 266 1
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------- benchmark 'vertices': 2 tests -------------------------------------------------------------------------------------
Name (time in ms) Min Max Mean StdDev Median IQR Outliers OPS Rounds Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_healpix_vertices_lonlat 3.3824 (1.0) 4.6153 (1.0) 3.6879 (1.0) 0.2156 (1.0) 3.6202 (1.0) 0.2634 (1.0) 30;6 271.1603 (1.0) 137 1
test_healpix_vertices_lonlat_astropy 72.8447 (21.54) 77.1371 (16.71) 74.5840 (20.22) 1.2369 (5.74) 74.3688 (20.54) 1.5413 (5.85) 3;0 13.4077 (0.05) 13 1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Legend:
Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
OPS: Operations Per Second, computed as 1 / Mean
================================================================================== 109 passed in 11.52 seconds ==================================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment