torchsky 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (626) hide show
  1. torchsky-0.5.0/.git-blame-ignore-revs +2 -0
  2. torchsky-0.5.0/.gitattributes +2 -0
  3. torchsky-0.5.0/.gitignore +60 -0
  4. torchsky-0.5.0/.pre-commit-config.yaml +19 -0
  5. torchsky-0.5.0/CITATION.cff +18 -0
  6. torchsky-0.5.0/CMakeLists.txt +10 -0
  7. torchsky-0.5.0/CODE_OF_CONDUCT.md +119 -0
  8. torchsky-0.5.0/CONTRIBUTING.md +51 -0
  9. torchsky-0.5.0/LICENSE +21 -0
  10. torchsky-0.5.0/PKG-INFO +184 -0
  11. torchsky-0.5.0/README.md +111 -0
  12. torchsky-0.5.0/SECURITY.md +16 -0
  13. torchsky-0.5.0/pixi.toml +182 -0
  14. torchsky-0.5.0/pyproject.toml +183 -0
  15. torchsky-0.5.0/scripts/api_manifest.py +113 -0
  16. torchsky-0.5.0/scripts/apply_wcs_to_mef.py +343 -0
  17. torchsky-0.5.0/scripts/archive_safety.py +56 -0
  18. torchsky-0.5.0/scripts/astrometric_calibrate.py +485 -0
  19. torchsky-0.5.0/scripts/audit_refactor_cohesion.py +368 -0
  20. torchsky-0.5.0/scripts/capture_example_output.py +62 -0
  21. torchsky-0.5.0/scripts/check_distribution.py +286 -0
  22. torchsky-0.5.0/scripts/check_docs_links.py +294 -0
  23. torchsky-0.5.0/scripts/check_macos_wheel_floor.py +70 -0
  24. torchsky-0.5.0/scripts/check_reference_anchors.py +83 -0
  25. torchsky-0.5.0/scripts/check_release_rc.py +159 -0
  26. torchsky-0.5.0/scripts/check_release_run.py +36 -0
  27. torchsky-0.5.0/scripts/check_release_tag.py +37 -0
  28. torchsky-0.5.0/scripts/ci_operator_smoke.py +53 -0
  29. torchsky-0.5.0/scripts/diagnose_cuda_build.py +96 -0
  30. torchsky-0.5.0/scripts/docstring_audit.py +187 -0
  31. torchsky-0.5.0/scripts/fetch_example_samples.py +50 -0
  32. torchsky-0.5.0/scripts/gen_benchmark_tables.py +103 -0
  33. torchsky-0.5.0/scripts/gen_cli_reference.py +94 -0
  34. torchsky-0.5.0/scripts/gen_example_index.py +474 -0
  35. torchsky-0.5.0/scripts/gen_gallery.py +193 -0
  36. torchsky-0.5.0/scripts/gen_radio_mm_fixture_fits.py +48 -0
  37. torchsky-0.5.0/scripts/gen_reference.py +656 -0
  38. torchsky-0.5.0/scripts/install_hooks.py +46 -0
  39. torchsky-0.5.0/scripts/release_lane.py +234 -0
  40. torchsky-0.5.0/scripts/release_notes.py +80 -0
  41. torchsky-0.5.0/scripts/run_docs_snippets.py +114 -0
  42. torchsky-0.5.0/scripts/smoke_installed_wheel.py +75 -0
  43. torchsky-0.5.0/scripts/sync_docs_examples.sh +19 -0
  44. torchsky-0.5.0/scripts/torch_lanes.json +6 -0
  45. torchsky-0.5.0/scripts/validate_native_runtime.py +258 -0
  46. torchsky-0.5.0/scripts/validate_release_sdist.py +214 -0
  47. torchsky-0.5.0/scripts/validate_release_wheels.py +215 -0
  48. torchsky-0.5.0/scripts/verify_setup.py +36 -0
  49. torchsky-0.5.0/src/torchsky/__init__.py +101 -0
  50. torchsky-0.5.0/src/torchsky/_cpp.py +16 -0
  51. torchsky-0.5.0/src/torchsky/_data/calspec_alpha_lyr_stis_012.npz +0 -0
  52. torchsky-0.5.0/src/torchsky/_dtype.py +30 -0
  53. torchsky-0.5.0/src/torchsky/_fixed_dispatch.py +213 -0
  54. torchsky-0.5.0/src/torchsky/_foreground.py +154 -0
  55. torchsky-0.5.0/src/torchsky/_hash.py +15 -0
  56. torchsky-0.5.0/src/torchsky/_native.py +17 -0
  57. torchsky-0.5.0/src/torchsky/_ops.py +193 -0
  58. torchsky-0.5.0/src/torchsky/_spectral_dispatch.py +661 -0
  59. torchsky-0.5.0/src/torchsky/_wcs_dispatch.py +136 -0
  60. torchsky-0.5.0/src/torchsky/calibration_evidence.py +120 -0
  61. torchsky-0.5.0/src/torchsky/catalogs/__init__.py +190 -0
  62. torchsky-0.5.0/src/torchsky/catalogs/_pairs.py +180 -0
  63. torchsky-0.5.0/src/torchsky/catalogs/catalog.py +447 -0
  64. torchsky-0.5.0/src/torchsky/catalogs/core.py +1720 -0
  65. torchsky-0.5.0/src/torchsky/catalogs/deblending.py +1462 -0
  66. torchsky-0.5.0/src/torchsky/catalogs/index.py +433 -0
  67. torchsky-0.5.0/src/torchsky/catalogs/multi.py +358 -0
  68. torchsky-0.5.0/src/torchsky/catalogs/photometry.py +944 -0
  69. torchsky-0.5.0/src/torchsky/cli/__init__.py +172 -0
  70. torchsky-0.5.0/src/torchsky/cli/_map_command_dispatch.py +392 -0
  71. torchsky-0.5.0/src/torchsky/cli/_map_command_filters.py +232 -0
  72. torchsky-0.5.0/src/torchsky/cli/_map_command_inputs.py +387 -0
  73. torchsky-0.5.0/src/torchsky/cli/map_command.py +1541 -0
  74. torchsky-0.5.0/src/torchsky/cli/sky_command.py +244 -0
  75. torchsky-0.5.0/src/torchsky/coords/__init__.py +44 -0
  76. torchsky-0.5.0/src/torchsky/cosmology.py +714 -0
  77. torchsky-0.5.0/src/torchsky/cpp_src/CMakeLists.txt +299 -0
  78. torchsky-0.5.0/src/torchsky/cpp_src/bindings.cpp +44 -0
  79. torchsky-0.5.0/src/torchsky/cpp_src/cpu_isa.cpp +138 -0
  80. torchsky-0.5.0/src/torchsky/cpp_src/geom.cpp +325 -0
  81. torchsky-0.5.0/src/torchsky/cpp_src/healpix.cpp +6756 -0
  82. torchsky-0.5.0/src/torchsky/cpp_src/include/torchsky/drizzle_operators.h +7 -0
  83. torchsky-0.5.0/src/torchsky/cpp_src/include/torchsky/fixed_operators.h +8 -0
  84. torchsky-0.5.0/src/torchsky/cpp_src/include/torchsky/geom.h +21 -0
  85. torchsky-0.5.0/src/torchsky/cpp_src/include/torchsky/healpix.h +209 -0
  86. torchsky-0.5.0/src/torchsky/cpp_src/include/torchsky/ishioka_kernels.h +112 -0
  87. torchsky-0.5.0/src/torchsky/cpp_src/include/torchsky/wcs.h +242 -0
  88. torchsky-0.5.0/src/torchsky/cpp_src/include/torchsky/wcs_operators.h +83 -0
  89. torchsky-0.5.0/src/torchsky/cpp_src/ishioka_avx2.cpp +119 -0
  90. torchsky-0.5.0/src/torchsky/cpp_src/ishioka_neon.cpp +112 -0
  91. torchsky-0.5.0/src/torchsky/cpp_src/ishioka_scalar.cpp +60 -0
  92. torchsky-0.5.0/src/torchsky/cpp_src/operators/drizzle_cpu.cpp +334 -0
  93. torchsky-0.5.0/src/torchsky/cpp_src/operators/fixed_cpu.cpp +103 -0
  94. torchsky-0.5.0/src/torchsky/cpp_src/operators/fixed_schemas.cpp +28 -0
  95. torchsky-0.5.0/src/torchsky/cpp_src/operators/spectral_cpu.cpp +154 -0
  96. torchsky-0.5.0/src/torchsky/cpp_src/operators/spectral_schemas.cpp +28 -0
  97. torchsky-0.5.0/src/torchsky/cpp_src/operators/wcs_cpu.cpp +115 -0
  98. torchsky-0.5.0/src/torchsky/cpp_src/operators/wcs_schemas.cpp +30 -0
  99. torchsky-0.5.0/src/torchsky/cpp_src/sht_scalar_kernels.inc +694 -0
  100. torchsky-0.5.0/src/torchsky/cpp_src/sphere_ranges.cpp +306 -0
  101. torchsky-0.5.0/src/torchsky/cpp_src/third_party/README.md +13 -0
  102. torchsky-0.5.0/src/torchsky/cpp_src/third_party/pocketfft.LICENSE.md +38 -0
  103. torchsky-0.5.0/src/torchsky/cpp_src/third_party/pocketfft_hdronly.h +3853 -0
  104. torchsky-0.5.0/src/torchsky/cpp_src/torchsky_torch.h +38 -0
  105. torchsky-0.5.0/src/torchsky/cpp_src/wcs.cpp +2995 -0
  106. torchsky-0.5.0/src/torchsky/device.py +248 -0
  107. torchsky-0.5.0/src/torchsky/domain.py +120 -0
  108. torchsky-0.5.0/src/torchsky/encoders/__init__.py +218 -0
  109. torchsky-0.5.0/src/torchsky/encoders/photometry.py +390 -0
  110. torchsky-0.5.0/src/torchsky/extinction.py +1062 -0
  111. torchsky-0.5.0/src/torchsky/field/__init__.py +255 -0
  112. torchsky-0.5.0/src/torchsky/filter_profiles/__init__.py +19 -0
  113. torchsky-0.5.0/src/torchsky/filter_profiles/field_bandpass.py +539 -0
  114. torchsky-0.5.0/src/torchsky/instrument.py +203 -0
  115. torchsky-0.5.0/src/torchsky/log_lambda.py +180 -0
  116. torchsky-0.5.0/src/torchsky/map/__init__.py +223 -0
  117. torchsky-0.5.0/src/torchsky/map/_healpix_overlap.py +408 -0
  118. torchsky-0.5.0/src/torchsky/map/_image_plane_tiling.py +302 -0
  119. torchsky-0.5.0/src/torchsky/map/_image_plane_uncertainty.py +773 -0
  120. torchsky-0.5.0/src/torchsky/map/box_overlap.py +47 -0
  121. torchsky-0.5.0/src/torchsky/map/calibration.py +259 -0
  122. torchsky-0.5.0/src/torchsky/map/cube.py +672 -0
  123. torchsky-0.5.0/src/torchsky/map/evidence.py +167 -0
  124. torchsky-0.5.0/src/torchsky/map/exposure_pose.py +244 -0
  125. torchsky-0.5.0/src/torchsky/map/fft_affine_ldu.py +112 -0
  126. torchsky-0.5.0/src/torchsky/map/fft_resample.py +181 -0
  127. torchsky-0.5.0/src/torchsky/map/field/__init__.py +507 -0
  128. torchsky-0.5.0/src/torchsky/map/field/_core_helpers.py +619 -0
  129. torchsky-0.5.0/src/torchsky/map/field/_gauss_newton.py +137 -0
  130. torchsky-0.5.0/src/torchsky/map/field/_inverse_binding.py +634 -0
  131. torchsky-0.5.0/src/torchsky/map/field/_inverse_stationary.py +257 -0
  132. torchsky-0.5.0/src/torchsky/map/field/_training_losses.py +326 -0
  133. torchsky-0.5.0/src/torchsky/map/field/adaptive.py +243 -0
  134. torchsky-0.5.0/src/torchsky/map/field/artifacts.py +650 -0
  135. torchsky-0.5.0/src/torchsky/map/field/bandpass.py +31 -0
  136. torchsky-0.5.0/src/torchsky/map/field/chromatic.py +350 -0
  137. torchsky-0.5.0/src/torchsky/map/field/core.py +554 -0
  138. torchsky-0.5.0/src/torchsky/map/field/foam_common.py +7 -0
  139. torchsky-0.5.0/src/torchsky/map/field/foam_field.py +785 -0
  140. torchsky-0.5.0/src/torchsky/map/field/foam_geometry.py +1109 -0
  141. torchsky-0.5.0/src/torchsky/map/field/foam_operators.py +886 -0
  142. torchsky-0.5.0/src/torchsky/map/field/foam_solvers.py +1341 -0
  143. torchsky-0.5.0/src/torchsky/map/field/forwarding.py +115 -0
  144. torchsky-0.5.0/src/torchsky/map/field/frequency_adaptive.py +447 -0
  145. torchsky-0.5.0/src/torchsky/map/field/gaussian.py +410 -0
  146. torchsky-0.5.0/src/torchsky/map/field/hashgrid.py +232 -0
  147. torchsky-0.5.0/src/torchsky/map/field/implicit_forward.py +256 -0
  148. torchsky-0.5.0/src/torchsky/map/field/inverse.py +2197 -0
  149. torchsky-0.5.0/src/torchsky/map/field/joint_native_likelihood.py +330 -0
  150. torchsky-0.5.0/src/torchsky/map/field/losses.py +169 -0
  151. torchsky-0.5.0/src/torchsky/map/field/models_component.py +509 -0
  152. torchsky-0.5.0/src/torchsky/map/field/models_encoder.py +873 -0
  153. torchsky-0.5.0/src/torchsky/map/field/models_foam.py +463 -0
  154. torchsky-0.5.0/src/torchsky/map/field/models_implicit.py +1066 -0
  155. torchsky-0.5.0/src/torchsky/map/field/models_skylambda.py +1979 -0
  156. torchsky-0.5.0/src/torchsky/map/field/native_integrated_read.py +613 -0
  157. torchsky-0.5.0/src/torchsky/map/field/native_response.py +503 -0
  158. torchsky-0.5.0/src/torchsky/map/field/networks.py +91 -0
  159. torchsky-0.5.0/src/torchsky/map/field/noise.py +56 -0
  160. torchsky-0.5.0/src/torchsky/map/field/observation_builders.py +456 -0
  161. torchsky-0.5.0/src/torchsky/map/field/observation_ops.py +611 -0
  162. torchsky-0.5.0/src/torchsky/map/field/presets.py +89 -0
  163. torchsky-0.5.0/src/torchsky/map/field/quality.py +864 -0
  164. torchsky-0.5.0/src/torchsky/map/field/registry.py +29 -0
  165. torchsky-0.5.0/src/torchsky/map/field/rendering.py +1779 -0
  166. torchsky-0.5.0/src/torchsky/map/field/sky_encoding.py +46 -0
  167. torchsky-0.5.0/src/torchsky/map/field/spectral_budget.py +187 -0
  168. torchsky-0.5.0/src/torchsky/map/field/training.py +2310 -0
  169. torchsky-0.5.0/src/torchsky/map/field/types.py +906 -0
  170. torchsky-0.5.0/src/torchsky/map/field/validation.py +135 -0
  171. torchsky-0.5.0/src/torchsky/map/healpix_coadd.py +638 -0
  172. torchsky-0.5.0/src/torchsky/map/healpix_image_plane.py +169 -0
  173. torchsky-0.5.0/src/torchsky/map/healpix_spectral.py +428 -0
  174. torchsky-0.5.0/src/torchsky/map/ifu.py +1205 -0
  175. torchsky-0.5.0/src/torchsky/map/image_plane_coadd.py +2496 -0
  176. torchsky-0.5.0/src/torchsky/map/image_plane_common.py +200 -0
  177. torchsky-0.5.0/src/torchsky/map/image_plane_projection.py +1797 -0
  178. torchsky-0.5.0/src/torchsky/map/interpolated_mapping.py +348 -0
  179. torchsky-0.5.0/src/torchsky/map/io_utils.py +355 -0
  180. torchsky-0.5.0/src/torchsky/map/likelihood.py +510 -0
  181. torchsky-0.5.0/src/torchsky/map/observation.py +676 -0
  182. torchsky-0.5.0/src/torchsky/map/operators/__init__.py +525 -0
  183. torchsky-0.5.0/src/torchsky/map/operators/adaptive.py +482 -0
  184. torchsky-0.5.0/src/torchsky/map/operators/adaptive_axes.py +701 -0
  185. torchsky-0.5.0/src/torchsky/map/operators/background.py +535 -0
  186. torchsky-0.5.0/src/torchsky/map/operators/base.py +363 -0
  187. torchsky-0.5.0/src/torchsky/map/operators/bundle.py +363 -0
  188. torchsky-0.5.0/src/torchsky/map/operators/calibration.py +883 -0
  189. torchsky-0.5.0/src/torchsky/map/operators/config.py +118 -0
  190. torchsky-0.5.0/src/torchsky/map/operators/continuous_response.py +452 -0
  191. torchsky-0.5.0/src/torchsky/map/operators/covariance.py +415 -0
  192. torchsky-0.5.0/src/torchsky/map/operators/coverage.py +153 -0
  193. torchsky-0.5.0/src/torchsky/map/operators/detector_response.py +281 -0
  194. torchsky-0.5.0/src/torchsky/map/operators/epsf.py +312 -0
  195. torchsky-0.5.0/src/torchsky/map/operators/execution.py +1839 -0
  196. torchsky-0.5.0/src/torchsky/map/operators/geometry.py +64 -0
  197. torchsky-0.5.0/src/torchsky/map/operators/geometry_conservative.py +153 -0
  198. torchsky-0.5.0/src/torchsky/map/operators/geometry_drizzle.py +713 -0
  199. torchsky-0.5.0/src/torchsky/map/operators/image_grid.py +86 -0
  200. torchsky-0.5.0/src/torchsky/map/operators/inverse.py +202 -0
  201. torchsky-0.5.0/src/torchsky/map/operators/learned.py +147 -0
  202. torchsky-0.5.0/src/torchsky/map/operators/learned_kernel.py +1144 -0
  203. torchsky-0.5.0/src/torchsky/map/operators/magnification.py +217 -0
  204. torchsky-0.5.0/src/torchsky/map/operators/mask_weight.py +267 -0
  205. torchsky-0.5.0/src/torchsky/map/operators/noise.py +2410 -0
  206. torchsky-0.5.0/src/torchsky/map/operators/nuisance.py +330 -0
  207. torchsky-0.5.0/src/torchsky/map/operators/pixel_area.py +187 -0
  208. torchsky-0.5.0/src/torchsky/map/operators/pixel_calibration.py +169 -0
  209. torchsky-0.5.0/src/torchsky/map/operators/psf.py +467 -0
  210. torchsky-0.5.0/src/torchsky/map/operators/radiometry.py +128 -0
  211. torchsky-0.5.0/src/torchsky/map/operators/resampling.py +1255 -0
  212. torchsky-0.5.0/src/torchsky/map/operators/response.py +604 -0
  213. torchsky-0.5.0/src/torchsky/map/operators/spectral.py +372 -0
  214. torchsky-0.5.0/src/torchsky/map/operators/subdivision.py +100 -0
  215. torchsky-0.5.0/src/torchsky/map/periodic_affine.py +82 -0
  216. torchsky-0.5.0/src/torchsky/map/plan.py +642 -0
  217. torchsky-0.5.0/src/torchsky/map/planning.py +798 -0
  218. torchsky-0.5.0/src/torchsky/map/product.py +1143 -0
  219. torchsky-0.5.0/src/torchsky/map/provenance.py +79 -0
  220. torchsky-0.5.0/src/torchsky/map/quality.py +138 -0
  221. torchsky-0.5.0/src/torchsky/map/query.py +294 -0
  222. torchsky-0.5.0/src/torchsky/map/scenes.py +332 -0
  223. torchsky-0.5.0/src/torchsky/map/sky/__init__.py +12 -0
  224. torchsky-0.5.0/src/torchsky/map/sky/corrector.py +398 -0
  225. torchsky-0.5.0/src/torchsky/map/sky/estimator.py +502 -0
  226. torchsky-0.5.0/src/torchsky/map/sky/polynomial.py +434 -0
  227. torchsky-0.5.0/src/torchsky/map/sky/stats.py +63 -0
  228. torchsky-0.5.0/src/torchsky/map/sky_matching.py +645 -0
  229. torchsky-0.5.0/src/torchsky/map/solvers/__init__.py +128 -0
  230. torchsky-0.5.0/src/torchsky/map/solvers/_core.py +1059 -0
  231. torchsky-0.5.0/src/torchsky/map/solvers/_foundation.py +972 -0
  232. torchsky-0.5.0/src/torchsky/map/solvers/_hooks.py +370 -0
  233. torchsky-0.5.0/src/torchsky/map/solvers/_implicit.py +34 -0
  234. torchsky-0.5.0/src/torchsky/map/solvers/_priors.py +517 -0
  235. torchsky-0.5.0/src/torchsky/map/solvers/_state.py +978 -0
  236. torchsky-0.5.0/src/torchsky/map/solvers/_types.py +21 -0
  237. torchsky-0.5.0/src/torchsky/map/spectral_affine.py +185 -0
  238. torchsky-0.5.0/src/torchsky/map/spectral_nonuniform.py +105 -0
  239. torchsky-0.5.0/src/torchsky/map/spectral_nufft.py +63 -0
  240. torchsky-0.5.0/src/torchsky/map/spectral_projection.py +262 -0
  241. torchsky-0.5.0/src/torchsky/map/splat.py +98 -0
  242. torchsky-0.5.0/src/torchsky/map/target.py +97 -0
  243. torchsky-0.5.0/src/torchsky/map/windowing.py +672 -0
  244. torchsky-0.5.0/src/torchsky/py.typed +0 -0
  245. torchsky-0.5.0/src/torchsky/quality.py +161 -0
  246. torchsky-0.5.0/src/torchsky/redshift.py +368 -0
  247. torchsky-0.5.0/src/torchsky/scene/__init__.py +189 -0
  248. torchsky-0.5.0/src/torchsky/scene/operators.py +312 -0
  249. torchsky-0.5.0/src/torchsky/scene/sources.py +802 -0
  250. torchsky-0.5.0/src/torchsky/spectral.py +1317 -0
  251. torchsky-0.5.0/src/torchsky/spectrophotometry.py +821 -0
  252. torchsky-0.5.0/src/torchsky/sphere/__init__.py +292 -0
  253. torchsky-0.5.0/src/torchsky/sphere/_healpix_query_support.py +399 -0
  254. torchsky-0.5.0/src/torchsky/sphere/_healpix_scheme.py +301 -0
  255. torchsky-0.5.0/src/torchsky/sphere/_pixwin.py +308 -0
  256. torchsky-0.5.0/src/torchsky/sphere/_region_area.py +298 -0
  257. torchsky-0.5.0/src/torchsky/sphere/_spectral_autograd.py +326 -0
  258. torchsky-0.5.0/src/torchsky/sphere/_spectral_basis.py +691 -0
  259. torchsky-0.5.0/src/torchsky/sphere/_spectral_cache.py +395 -0
  260. torchsky-0.5.0/src/torchsky/sphere/_spectral_config.py +300 -0
  261. torchsky-0.5.0/src/torchsky/sphere/_spectral_kernels.py +654 -0
  262. torchsky-0.5.0/src/torchsky/sphere/_spectral_layout.py +185 -0
  263. torchsky-0.5.0/src/torchsky/sphere/_spectral_ring_fourier.py +398 -0
  264. torchsky-0.5.0/src/torchsky/sphere/_spectral_weights.py +210 -0
  265. torchsky-0.5.0/src/torchsky/sphere/compat.py +945 -0
  266. torchsky-0.5.0/src/torchsky/sphere/core.py +477 -0
  267. torchsky-0.5.0/src/torchsky/sphere/geom.py +2161 -0
  268. torchsky-0.5.0/src/torchsky/sphere/healpix.py +2168 -0
  269. torchsky-0.5.0/src/torchsky/sphere/moc.py +1814 -0
  270. torchsky-0.5.0/src/torchsky/sphere/multiorder.py +318 -0
  271. torchsky-0.5.0/src/torchsky/sphere/pseudocl.py +1226 -0
  272. torchsky-0.5.0/src/torchsky/sphere/randoms.py +278 -0
  273. torchsky-0.5.0/src/torchsky/sphere/sht.py +1483 -0
  274. torchsky-0.5.0/src/torchsky/sphere/sparse.py +2109 -0
  275. torchsky-0.5.0/src/torchsky/sphere/spectral.py +1833 -0
  276. torchsky-0.5.0/src/torchsky/sphere/spectral_ops.py +717 -0
  277. torchsky-0.5.0/src/torchsky/sphere/stmoc.py +740 -0
  278. torchsky-0.5.0/src/torchsky/transforms.py +479 -0
  279. torchsky-0.5.0/src/torchsky/viz/__init__.py +153 -0
  280. torchsky-0.5.0/src/torchsky/viz/_blocking.py +16 -0
  281. torchsky-0.5.0/src/torchsky/viz/allsky.py +1206 -0
  282. torchsky-0.5.0/src/torchsky/viz/cache.py +69 -0
  283. torchsky-0.5.0/src/torchsky/viz/palettes.py +150 -0
  284. torchsky-0.5.0/src/torchsky/viz/plots.py +326 -0
  285. torchsky-0.5.0/src/torchsky/viz/renderers/__init__.py +1 -0
  286. torchsky-0.5.0/src/torchsky/viz/renderers/hips_tile.py +292 -0
  287. torchsky-0.5.0/src/torchsky/viz/renderers/image.py +309 -0
  288. torchsky-0.5.0/src/torchsky/viz/renderers/moc_geojson.py +81 -0
  289. torchsky-0.5.0/src/torchsky/viz/renderers/validation.py +199 -0
  290. torchsky-0.5.0/src/torchsky/viz/routers/__init__.py +1 -0
  291. torchsky-0.5.0/src/torchsky/viz/routers/_safe_path.py +23 -0
  292. torchsky-0.5.0/src/torchsky/viz/routers/catalog.py +175 -0
  293. torchsky-0.5.0/src/torchsky/viz/routers/fits.py +216 -0
  294. torchsky-0.5.0/src/torchsky/viz/routers/hips.py +377 -0
  295. torchsky-0.5.0/src/torchsky/viz/routers/moc.py +89 -0
  296. torchsky-0.5.0/src/torchsky/viz/routers/validate.py +221 -0
  297. torchsky-0.5.0/src/torchsky/viz/server.py +106 -0
  298. torchsky-0.5.0/src/torchsky/viz/static/index.html +1288 -0
  299. torchsky-0.5.0/src/torchsky/viz/theme.py +282 -0
  300. torchsky-0.5.0/src/torchsky/wcs/__init__.py +311 -0
  301. torchsky-0.5.0/src/torchsky/wcs/_axes_frames.py +295 -0
  302. torchsky-0.5.0/src/torchsky/wcs/_celprm.py +164 -0
  303. torchsky-0.5.0/src/torchsky/wcs/_core_support.py +96 -0
  304. torchsky-0.5.0/src/torchsky/wcs/_differentiable.py +384 -0
  305. torchsky-0.5.0/src/torchsky/wcs/_epv00_data.py +748 -0
  306. torchsky-0.5.0/src/torchsky/wcs/_geometry.py +460 -0
  307. torchsky-0.5.0/src/torchsky/wcs/_graph.py +15 -0
  308. torchsky-0.5.0/src/torchsky/wcs/_header_parse.py +427 -0
  309. torchsky-0.5.0/src/torchsky/wcs/_math.py +25 -0
  310. torchsky-0.5.0/src/torchsky/wcs/_mixed.py +577 -0
  311. torchsky-0.5.0/src/torchsky/wcs/_pixel_world_core.py +725 -0
  312. torchsky-0.5.0/src/torchsky/wcs/_rotation.py +464 -0
  313. torchsky-0.5.0/src/torchsky/wcs/_setup_tensors.py +815 -0
  314. torchsky-0.5.0/src/torchsky/wcs/_wcs_state.py +511 -0
  315. torchsky-0.5.0/src/torchsky/wcs/alignment.py +390 -0
  316. torchsky-0.5.0/src/torchsky/wcs/allsky.py +446 -0
  317. torchsky-0.5.0/src/torchsky/wcs/astrometry.py +1842 -0
  318. torchsky-0.5.0/src/torchsky/wcs/astrometry_net.py +840 -0
  319. torchsky-0.5.0/src/torchsky/wcs/astropy_interop.py +102 -0
  320. torchsky-0.5.0/src/torchsky/wcs/calibration.py +1493 -0
  321. torchsky-0.5.0/src/torchsky/wcs/catalog_state.py +244 -0
  322. torchsky-0.5.0/src/torchsky/wcs/conic.py +522 -0
  323. torchsky-0.5.0/src/torchsky/wcs/coords.py +123 -0
  324. torchsky-0.5.0/src/torchsky/wcs/core.py +2042 -0
  325. torchsky-0.5.0/src/torchsky/wcs/cylindrical.py +158 -0
  326. torchsky-0.5.0/src/torchsky/wcs/detector_astrometry.py +814 -0
  327. torchsky-0.5.0/src/torchsky/wcs/ephemeris.py +87 -0
  328. torchsky-0.5.0/src/torchsky/wcs/frames.py +1353 -0
  329. torchsky-0.5.0/src/torchsky/wcs/functional.py +535 -0
  330. torchsky-0.5.0/src/torchsky/wcs/graph.py +431 -0
  331. torchsky-0.5.0/src/torchsky/wcs/gwcs_live.py +33 -0
  332. torchsky-0.5.0/src/torchsky/wcs/gwcs_sampling.py +585 -0
  333. torchsky-0.5.0/src/torchsky/wcs/iau2000a.py +413 -0
  334. torchsky-0.5.0/src/torchsky/wcs/iau2006.py +668 -0
  335. torchsky-0.5.0/src/torchsky/wcs/legacy.py +304 -0
  336. torchsky-0.5.0/src/torchsky/wcs/mapping.py +768 -0
  337. torchsky-0.5.0/src/torchsky/wcs/observed.py +461 -0
  338. torchsky-0.5.0/src/torchsky/wcs/quadcube.py +793 -0
  339. torchsky-0.5.0/src/torchsky/wcs/residuals.py +1403 -0
  340. torchsky-0.5.0/src/torchsky/wcs/semantics.py +399 -0
  341. torchsky-0.5.0/src/torchsky/wcs/sip.py +486 -0
  342. torchsky-0.5.0/src/torchsky/wcs/spectral.py +662 -0
  343. torchsky-0.5.0/src/torchsky/wcs/tabular.py +1547 -0
  344. torchsky-0.5.0/src/torchsky/wcs/temporal.py +725 -0
  345. torchsky-0.5.0/src/torchsky/wcs/tle.py +45 -0
  346. torchsky-0.5.0/src/torchsky/wcs/tpv.py +462 -0
  347. torchsky-0.5.0/src/torchsky/wcs/zenithal.py +533 -0
  348. torchsky-0.5.0/tests/conftest.py +112 -0
  349. torchsky-0.5.0/tests/data/radio_mm_stub.fits +0 -0
  350. torchsky-0.5.0/tests/data/upstream_astropy_catalogs/README.md +11 -0
  351. torchsky-0.5.0/tests/data/upstream_astropy_catalogs/binary2_masked_strings.xml +51 -0
  352. torchsky-0.5.0/tests/data/upstream_astropy_catalogs/irsa-nph-m31.xml +70 -0
  353. torchsky-0.5.0/tests/data/upstream_astropy_catalogs/vizier_b2_votable.xml +104 -0
  354. torchsky-0.5.0/tests/foreground/__init__.py +0 -0
  355. torchsky-0.5.0/tests/foreground/test_foreground_screens.py +75 -0
  356. torchsky-0.5.0/tests/ifu_loop_oracle.py +638 -0
  357. torchsky-0.5.0/tests/map_field_support.py +102 -0
  358. torchsky-0.5.0/tests/map_image_plane_support.py +66 -0
  359. torchsky-0.5.0/tests/pg_oracle.py +41 -0
  360. torchsky-0.5.0/tests/test_adaptive_axes.py +61 -0
  361. torchsky-0.5.0/tests/test_additive_stage_contract.py +348 -0
  362. torchsky-0.5.0/tests/test_api.py +234 -0
  363. torchsky-0.5.0/tests/test_api_manifest.py +42 -0
  364. torchsky-0.5.0/tests/test_astro_transforms.py +50 -0
  365. torchsky-0.5.0/tests/test_audit_critical_regressions.py +357 -0
  366. torchsky-0.5.0/tests/test_audit_regression_misc.py +93 -0
  367. torchsky-0.5.0/tests/test_calibration_evidence.py +92 -0
  368. torchsky-0.5.0/tests/test_calibration_helpers.py +119 -0
  369. torchsky-0.5.0/tests/test_catalog_compat.py +208 -0
  370. torchsky-0.5.0/tests/test_catalog_covering.py +227 -0
  371. torchsky-0.5.0/tests/test_catalog_no_dataframe.py +14 -0
  372. torchsky-0.5.0/tests/test_catalogs.py +756 -0
  373. torchsky-0.5.0/tests/test_catalogs_arrow.py +280 -0
  374. torchsky-0.5.0/tests/test_catalogue_photoz_example.py +365 -0
  375. torchsky-0.5.0/tests/test_ci_map_ownership.py +16 -0
  376. torchsky-0.5.0/tests/test_cli_help.py +95 -0
  377. torchsky-0.5.0/tests/test_cli_map.py +1596 -0
  378. torchsky-0.5.0/tests/test_cli_sky_viz.py +215 -0
  379. torchsky-0.5.0/tests/test_cold_import.py +93 -0
  380. torchsky-0.5.0/tests/test_continuous_response.py +417 -0
  381. torchsky-0.5.0/tests/test_cosmology.py +545 -0
  382. torchsky-0.5.0/tests/test_cpp_compatibility.py +112 -0
  383. torchsky-0.5.0/tests/test_cpp_dispatcher.py +494 -0
  384. torchsky-0.5.0/tests/test_cpp_fixed_dispatcher.py +372 -0
  385. torchsky-0.5.0/tests/test_cpp_spectral_dispatcher.py +660 -0
  386. torchsky-0.5.0/tests/test_cpp_wcs_safety.py +264 -0
  387. torchsky-0.5.0/tests/test_cpu_isa_dispatch.py +101 -0
  388. torchsky-0.5.0/tests/test_crossmatch.py +460 -0
  389. torchsky-0.5.0/tests/test_detector_response.py +294 -0
  390. torchsky-0.5.0/tests/test_device.py +30 -0
  391. torchsky-0.5.0/tests/test_device_placement.py +290 -0
  392. torchsky-0.5.0/tests/test_device_to.py +318 -0
  393. torchsky-0.5.0/tests/test_distortions_real_headers.py +56 -0
  394. torchsky-0.5.0/tests/test_distribution_check.py +97 -0
  395. torchsky-0.5.0/tests/test_dlpack_roundtrip.py +41 -0
  396. torchsky-0.5.0/tests/test_docs_claims.py +113 -0
  397. torchsky-0.5.0/tests/test_docs_coverage.py +56 -0
  398. torchsky-0.5.0/tests/test_docs_integrity.py +225 -0
  399. torchsky-0.5.0/tests/test_docs_reference.py +117 -0
  400. torchsky-0.5.0/tests/test_docs_snippets.py +74 -0
  401. torchsky-0.5.0/tests/test_docstrings.py +30 -0
  402. torchsky-0.5.0/tests/test_encoders.py +65 -0
  403. torchsky-0.5.0/tests/test_evidence_lifecycle.py +304 -0
  404. torchsky-0.5.0/tests/test_example_sample_data.py +191 -0
  405. torchsky-0.5.0/tests/test_examples_runner.py +48 -0
  406. torchsky-0.5.0/tests/test_explicit_grid_solver.py +1784 -0
  407. torchsky-0.5.0/tests/test_exposure_pose.py +144 -0
  408. torchsky-0.5.0/tests/test_exposure_pose_fit.py +175 -0
  409. torchsky-0.5.0/tests/test_extinction.py +385 -0
  410. torchsky-0.5.0/tests/test_field_artifacts.py +381 -0
  411. torchsky-0.5.0/tests/test_field_bandpass.py +459 -0
  412. torchsky-0.5.0/tests/test_field_diagnostics.py +834 -0
  413. torchsky-0.5.0/tests/test_field_fit_bundle.py +296 -0
  414. torchsky-0.5.0/tests/test_field_gaussian_likelihood.py +441 -0
  415. torchsky-0.5.0/tests/test_field_model_contract.py +91 -0
  416. torchsky-0.5.0/tests/test_field_model_presets.py +51 -0
  417. torchsky-0.5.0/tests/test_field_observation_builders.py +146 -0
  418. torchsky-0.5.0/tests/test_field_types_facade.py +133 -0
  419. torchsky-0.5.0/tests/test_field_validation.py +113 -0
  420. torchsky-0.5.0/tests/test_forced_photometry.py +464 -0
  421. torchsky-0.5.0/tests/test_fossil_operator_gates.py +203 -0
  422. torchsky-0.5.0/tests/test_frame_bias_warning.py +72 -0
  423. torchsky-0.5.0/tests/test_gaia_pleiades_motion_parity.py +119 -0
  424. torchsky-0.5.0/tests/test_gauss_newton_pcg.py +93 -0
  425. torchsky-0.5.0/tests/test_gaussian_likelihood.py +379 -0
  426. torchsky-0.5.0/tests/test_healpix_image_plane.py +186 -0
  427. torchsky-0.5.0/tests/test_healpix_parity.py +111 -0
  428. torchsky-0.5.0/tests/test_healpix_primitives.py +882 -0
  429. torchsky-0.5.0/tests/test_healpix_spectral.py +206 -0
  430. torchsky-0.5.0/tests/test_hosted_native_validation.py +108 -0
  431. torchsky-0.5.0/tests/test_implicit_forward.py +452 -0
  432. torchsky-0.5.0/tests/test_indexed_response_grouping.py +75 -0
  433. torchsky-0.5.0/tests/test_instrument.py +79 -0
  434. torchsky-0.5.0/tests/test_invariants_randomized.py +294 -0
  435. torchsky-0.5.0/tests/test_inverse_information_diagonal.py +262 -0
  436. torchsky-0.5.0/tests/test_joint_native_likelihood.py +549 -0
  437. torchsky-0.5.0/tests/test_known_component_deblending.py +553 -0
  438. torchsky-0.5.0/tests/test_lazy_import_targets.py +64 -0
  439. torchsky-0.5.0/tests/test_learned_kernel_operators.py +496 -0
  440. torchsky-0.5.0/tests/test_linear_query.py +393 -0
  441. torchsky-0.5.0/tests/test_log_lambda.py +149 -0
  442. torchsky-0.5.0/tests/test_magnification_operator.py +113 -0
  443. torchsky-0.5.0/tests/test_map_adaptive_reprojection.py +368 -0
  444. torchsky-0.5.0/tests/test_map_adjoints.py +607 -0
  445. torchsky-0.5.0/tests/test_map_audit_regression.py +586 -0
  446. torchsky-0.5.0/tests/test_map_auto_tiling.py +594 -0
  447. torchsky-0.5.0/tests/test_map_background_ops.py +222 -0
  448. torchsky-0.5.0/tests/test_map_clean_api.py +431 -0
  449. torchsky-0.5.0/tests/test_map_coadd_edge_weights.py +188 -0
  450. torchsky-0.5.0/tests/test_map_cube_spectral_axis.py +226 -0
  451. torchsky-0.5.0/tests/test_map_dq_parity.py +297 -0
  452. torchsky-0.5.0/tests/test_map_drizzle_overlap.py +408 -0
  453. torchsky-0.5.0/tests/test_map_drizzle_semantics.py +635 -0
  454. torchsky-0.5.0/tests/test_map_fft_affine_ldu.py +112 -0
  455. torchsky-0.5.0/tests/test_map_fft_resample.py +212 -0
  456. torchsky-0.5.0/tests/test_map_field_chromatic.py +149 -0
  457. torchsky-0.5.0/tests/test_map_field_decomposition.py +913 -0
  458. torchsky-0.5.0/tests/test_map_field_domain_bandpass.py +333 -0
  459. torchsky-0.5.0/tests/test_map_field_encoders.py +644 -0
  460. torchsky-0.5.0/tests/test_map_field_foam.py +662 -0
  461. torchsky-0.5.0/tests/test_map_field_foam_intersection.py +583 -0
  462. torchsky-0.5.0/tests/test_map_field_foam_model.py +1441 -0
  463. torchsky-0.5.0/tests/test_map_field_foam_spectral.py +156 -0
  464. torchsky-0.5.0/tests/test_map_field_frequency_adaptive.py +403 -0
  465. torchsky-0.5.0/tests/test_map_field_gaussian.py +198 -0
  466. torchsky-0.5.0/tests/test_map_field_grid.py +265 -0
  467. torchsky-0.5.0/tests/test_map_field_losses.py +272 -0
  468. torchsky-0.5.0/tests/test_map_field_optimization.py +1036 -0
  469. torchsky-0.5.0/tests/test_map_field_render_precision.py +273 -0
  470. torchsky-0.5.0/tests/test_map_field_render_scale.py +348 -0
  471. torchsky-0.5.0/tests/test_map_field_render_tiling.py +70 -0
  472. torchsky-0.5.0/tests/test_map_field_rendering.py +839 -0
  473. torchsky-0.5.0/tests/test_map_field_strainer.py +268 -0
  474. torchsky-0.5.0/tests/test_map_field_streamed_tiles.py +532 -0
  475. torchsky-0.5.0/tests/test_map_field_wavelength_models.py +705 -0
  476. torchsky-0.5.0/tests/test_map_flux_area_window.py +161 -0
  477. torchsky-0.5.0/tests/test_map_footprint_window.py +316 -0
  478. torchsky-0.5.0/tests/test_map_geometry_scalability.py +227 -0
  479. torchsky-0.5.0/tests/test_map_healpix_coadd.py +443 -0
  480. torchsky-0.5.0/tests/test_map_healpix_coadd_bridge_smoke.py +70 -0
  481. torchsky-0.5.0/tests/test_map_healpix_native_tan.py +65 -0
  482. torchsky-0.5.0/tests/test_map_healpix_overlap.py +142 -0
  483. torchsky-0.5.0/tests/test_map_ifu_cube.py +361 -0
  484. torchsky-0.5.0/tests/test_map_ifu_variance.py +190 -0
  485. torchsky-0.5.0/tests/test_map_ifu_vectorised.py +504 -0
  486. torchsky-0.5.0/tests/test_map_image_plane_kernels.py +1122 -0
  487. torchsky-0.5.0/tests/test_map_image_plane_products.py +1214 -0
  488. torchsky-0.5.0/tests/test_map_image_plane_stacking.py +951 -0
  489. torchsky-0.5.0/tests/test_map_image_plane_tiling.py +763 -0
  490. torchsky-0.5.0/tests/test_map_image_plane_uncertainty.py +923 -0
  491. torchsky-0.5.0/tests/test_map_interpolated_mapping.py +368 -0
  492. torchsky-0.5.0/tests/test_map_learned_ops.py +110 -0
  493. torchsky-0.5.0/tests/test_map_operator_bundle.py +324 -0
  494. torchsky-0.5.0/tests/test_map_operator_chunking.py +191 -0
  495. torchsky-0.5.0/tests/test_map_operator_coverage.py +57 -0
  496. torchsky-0.5.0/tests/test_map_operator_execution.py +650 -0
  497. torchsky-0.5.0/tests/test_map_operator_foundations.py +324 -0
  498. torchsky-0.5.0/tests/test_map_operator_noise.py +346 -0
  499. torchsky-0.5.0/tests/test_map_periodic_affine.py +38 -0
  500. torchsky-0.5.0/tests/test_map_plan.py +206 -0
  501. torchsky-0.5.0/tests/test_map_product.py +817 -0
  502. torchsky-0.5.0/tests/test_map_radio_fixture.py +26 -0
  503. torchsky-0.5.0/tests/test_map_radio_smoke.py +126 -0
  504. torchsky-0.5.0/tests/test_map_resampling_fused.py +336 -0
  505. torchsky-0.5.0/tests/test_map_scene_clean_breaks.py +97 -0
  506. torchsky-0.5.0/tests/test_map_scene_representations.py +219 -0
  507. torchsky-0.5.0/tests/test_map_sky.py +410 -0
  508. torchsky-0.5.0/tests/test_map_sky_corrector.py +356 -0
  509. torchsky-0.5.0/tests/test_map_sky_polynomial.py +92 -0
  510. torchsky-0.5.0/tests/test_map_solvers.py +1459 -0
  511. torchsky-0.5.0/tests/test_map_spectral_affine.py +95 -0
  512. torchsky-0.5.0/tests/test_map_spectral_nonuniform.py +134 -0
  513. torchsky-0.5.0/tests/test_map_spectral_nufft.py +70 -0
  514. torchsky-0.5.0/tests/test_map_sphere_sh_map_smoke.py +24 -0
  515. torchsky-0.5.0/tests/test_map_target_render_spec.py +61 -0
  516. torchsky-0.5.0/tests/test_native_epsf.py +319 -0
  517. torchsky-0.5.0/tests/test_native_field_response.py +514 -0
  518. torchsky-0.5.0/tests/test_native_integrated_read.py +981 -0
  519. torchsky-0.5.0/tests/test_no_external_fits_backends.py +32 -0
  520. torchsky-0.5.0/tests/test_nuisance_device_gradients.py +114 -0
  521. torchsky-0.5.0/tests/test_nuisance_precision.py +456 -0
  522. torchsky-0.5.0/tests/test_nuisance_spectral_device.py +398 -0
  523. torchsky-0.5.0/tests/test_observation_sampling_epoch.py +124 -0
  524. torchsky-0.5.0/tests/test_observed_audit_regression.py +196 -0
  525. torchsky-0.5.0/tests/test_observed_erfa_parity.py +155 -0
  526. torchsky-0.5.0/tests/test_observed_tt_default.py +93 -0
  527. torchsky-0.5.0/tests/test_operator_calibration.py +379 -0
  528. torchsky-0.5.0/tests/test_package_isolation.py +363 -0
  529. torchsky-0.5.0/tests/test_perf_gate.py +203 -0
  530. torchsky-0.5.0/tests/test_photometry_encoders.py +222 -0
  531. torchsky-0.5.0/tests/test_pixel_calibration.py +251 -0
  532. torchsky-0.5.0/tests/test_poisson_gaussian_boundary.py +548 -0
  533. torchsky-0.5.0/tests/test_poisson_gaussian_positive_nll.py +362 -0
  534. torchsky-0.5.0/tests/test_poisson_gaussian_support.py +148 -0
  535. torchsky-0.5.0/tests/test_psf_transport_invariants.py +347 -0
  536. torchsky-0.5.0/tests/test_public_namespaces.py +64 -0
  537. torchsky-0.5.0/tests/test_quality.py +50 -0
  538. torchsky-0.5.0/tests/test_query_spectral_device.py +370 -0
  539. torchsky-0.5.0/tests/test_redshift.py +170 -0
  540. torchsky-0.5.0/tests/test_refactor_cohesion_audit.py +45 -0
  541. torchsky-0.5.0/tests/test_release_lane.py +214 -0
  542. torchsky-0.5.0/tests/test_release_smoke.py +53 -0
  543. torchsky-0.5.0/tests/test_release_workflow.py +116 -0
  544. torchsky-0.5.0/tests/test_repo_boundaries.py +34 -0
  545. torchsky-0.5.0/tests/test_scene_facade.py +295 -0
  546. torchsky-0.5.0/tests/test_science_invariants.py +163 -0
  547. torchsky-0.5.0/tests/test_security.py +35 -0
  548. torchsky-0.5.0/tests/test_security_eval.py +24 -0
  549. torchsky-0.5.0/tests/test_shared_observation_contract.py +294 -0
  550. torchsky-0.5.0/tests/test_sht_high_lmax.py +204 -0
  551. torchsky-0.5.0/tests/test_sky_outlier_units.py +76 -0
  552. torchsky-0.5.0/tests/test_solver_foundations.py +482 -0
  553. torchsky-0.5.0/tests/test_spectral.py +820 -0
  554. torchsky-0.5.0/tests/test_spectral_cache.py +211 -0
  555. torchsky-0.5.0/tests/test_spectral_data_budget.py +85 -0
  556. torchsky-0.5.0/tests/test_spectral_nonuniform.py +159 -0
  557. torchsky-0.5.0/tests/test_spectrophotometry.py +440 -0
  558. torchsky-0.5.0/tests/test_sphere_compat.py +431 -0
  559. torchsky-0.5.0/tests/test_sphere_core.py +253 -0
  560. torchsky-0.5.0/tests/test_sphere_ecosystem.py +118 -0
  561. torchsky-0.5.0/tests/test_sphere_ecosystem_p2.py +91 -0
  562. torchsky-0.5.0/tests/test_sphere_ecosystem_p3.py +105 -0
  563. torchsky-0.5.0/tests/test_sphere_exact_regions.py +216 -0
  564. torchsky-0.5.0/tests/test_sphere_high_nside.py +131 -0
  565. torchsky-0.5.0/tests/test_sphere_moc.py +672 -0
  566. torchsky-0.5.0/tests/test_sphere_multiorder.py +257 -0
  567. torchsky-0.5.0/tests/test_sphere_native_ranges.py +242 -0
  568. torchsky-0.5.0/tests/test_sphere_pixwin.py +111 -0
  569. torchsky-0.5.0/tests/test_sphere_polygons.py +512 -0
  570. torchsky-0.5.0/tests/test_sphere_pseudocl.py +836 -0
  571. torchsky-0.5.0/tests/test_sphere_query_fallback.py +181 -0
  572. torchsky-0.5.0/tests/test_sphere_randoms.py +177 -0
  573. torchsky-0.5.0/tests/test_sphere_regions.py +182 -0
  574. torchsky-0.5.0/tests/test_sphere_sht_semantics.py +468 -0
  575. torchsky-0.5.0/tests/test_sphere_sparse.py +1024 -0
  576. torchsky-0.5.0/tests/test_sphere_spectral.py +2149 -0
  577. torchsky-0.5.0/tests/test_sphere_stmoc.py +443 -0
  578. torchsky-0.5.0/tests/test_splat.py +60 -0
  579. torchsky-0.5.0/tests/test_torchfits_integration.py +47 -0
  580. torchsky-0.5.0/tests/test_torchfits_public_boundary.py +86 -0
  581. torchsky-0.5.0/tests/test_transforms.py +398 -0
  582. torchsky-0.5.0/tests/test_viz_allsky.py +475 -0
  583. torchsky-0.5.0/tests/test_viz_plots.py +133 -0
  584. torchsky-0.5.0/tests/test_viz_renderers.py +408 -0
  585. torchsky-0.5.0/tests/test_viz_server.py +495 -0
  586. torchsky-0.5.0/tests/test_wcs_alignment.py +150 -0
  587. torchsky-0.5.0/tests/test_wcs_api.py +1421 -0
  588. torchsky-0.5.0/tests/test_wcs_astrometric_residuals.py +578 -0
  589. torchsky-0.5.0/tests/test_wcs_astrometry.py +491 -0
  590. torchsky-0.5.0/tests/test_wcs_astrometry_net.py +444 -0
  591. torchsky-0.5.0/tests/test_wcs_audit_regression.py +325 -0
  592. torchsky-0.5.0/tests/test_wcs_axis_permutations.py +344 -0
  593. torchsky-0.5.0/tests/test_wcs_catalog_state.py +452 -0
  594. torchsky-0.5.0/tests/test_wcs_core.py +315 -0
  595. torchsky-0.5.0/tests/test_wcs_coupled_calibration.py +542 -0
  596. torchsky-0.5.0/tests/test_wcs_cylindrical.py +84 -0
  597. torchsky-0.5.0/tests/test_wcs_detector_astrometry.py +366 -0
  598. torchsky-0.5.0/tests/test_wcs_extended_projections.py +267 -0
  599. torchsky-0.5.0/tests/test_wcs_fiducial_point.py +100 -0
  600. torchsky-0.5.0/tests/test_wcs_frames.py +501 -0
  601. torchsky-0.5.0/tests/test_wcs_gradcheck.py +212 -0
  602. torchsky-0.5.0/tests/test_wcs_gwcs_sampling.py +140 -0
  603. torchsky-0.5.0/tests/test_wcs_header_distortion_policy.py +196 -0
  604. torchsky-0.5.0/tests/test_wcs_hpx.py +136 -0
  605. torchsky-0.5.0/tests/test_wcs_legacy.py +272 -0
  606. torchsky-0.5.0/tests/test_wcs_mapping_graph.py +434 -0
  607. torchsky-0.5.0/tests/test_wcs_observed_frames.py +271 -0
  608. torchsky-0.5.0/tests/test_wcs_optional_extras.py +119 -0
  609. torchsky-0.5.0/tests/test_wcs_paper4_and_gls.py +173 -0
  610. torchsky-0.5.0/tests/test_wcs_parity.py +162 -0
  611. torchsky-0.5.0/tests/test_wcs_pixel_affine_distortions.py +504 -0
  612. torchsky-0.5.0/tests/test_wcs_precision_warning.py +63 -0
  613. torchsky-0.5.0/tests/test_wcs_projection_domains.py +214 -0
  614. torchsky-0.5.0/tests/test_wcs_projection_matrix.py +187 -0
  615. torchsky-0.5.0/tests/test_wcs_reference_jacobian.py +200 -0
  616. torchsky-0.5.0/tests/test_wcs_sip.py +90 -0
  617. torchsky-0.5.0/tests/test_wcs_spectral.py +257 -0
  618. torchsky-0.5.0/tests/test_wcs_sphere_devices.py +249 -0
  619. torchsky-0.5.0/tests/test_wcs_sphere_map_extensions.py +427 -0
  620. torchsky-0.5.0/tests/test_wcs_tabular.py +1419 -0
  621. torchsky-0.5.0/tests/test_wcs_temporal.py +339 -0
  622. torchsky-0.5.0/tests/test_wcs_tpv.py +426 -0
  623. torchsky-0.5.0/tests/test_wcs_unsupported_projection.py +41 -0
  624. torchsky-0.5.0/tests/test_wcs_zpx.py +68 -0
  625. torchsky-0.5.0/tests/test_windowing_canvas_mask.py +94 -0
  626. torchsky-0.5.0/tests/test_write_cube_fits.py +102 -0
@@ -0,0 +1,2 @@
1
+ # Tree-wide ruff format (0.5.0rc1 cleanup)
2
+ 93db0c13454e197d50d30980c4ecff6393d82bc3
@@ -0,0 +1,2 @@
1
+ # SCM syntax highlighting & preventing 3-way merges
2
+ pixi.lock merge=binary linguist-language=YAML linguist-generated=true
@@ -0,0 +1,60 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ .mypy_cache/
7
+ .pixi/
8
+ .venv/
9
+ venv/
10
+ .cache/
11
+ .coverage
12
+ htmlcov/
13
+ .ipynb_checkpoints/
14
+
15
+ # Editor / OS
16
+ .DS_Store
17
+ .vscode/
18
+ *.swp
19
+ *~
20
+
21
+ # Build and packaging
22
+ build/
23
+ dist/
24
+ wheelhouse/
25
+ _skbuild/
26
+ site/
27
+ *.egg-info/
28
+ *.whl
29
+ *.conda
30
+ *.tar.gz
31
+ src/torchsky/_cpp*.so
32
+ .tmp-vendor/
33
+
34
+ # Local run output
35
+ *.log
36
+ mpl-cache-*/
37
+ scratch/
38
+ benchmark_results*/
39
+ benchmarks_results*/
40
+ bench_results/
41
+
42
+ # Fetched / generated data (tests/data and docs/data are tracked)
43
+ *.fits
44
+ !tests/data/**/*.fits
45
+ examples/data_*/
46
+ examples/output/
47
+
48
+ # Generated at docs-build time (sources: examples/, docs/gallery)
49
+ docs/published-examples/
50
+
51
+ # Agent tooling and local research notes, not project code
52
+ .claude/
53
+ .cursor/
54
+ .agents/
55
+ .codex/
56
+ .jules/
57
+ .opencode/
58
+ .freebuff/
59
+ .dsh/
60
+ notes/
@@ -0,0 +1,19 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: trailing-whitespace
6
+ - id: end-of-file-fixer
7
+ - id: check-yaml
8
+ - id: check-toml
9
+ - id: check-added-large-files
10
+ - id: check-merge-conflict
11
+ # Pyright runs in CI (pixi run typecheck), not per commit.
12
+ - repo: https://github.com/astral-sh/ruff-pre-commit
13
+ rev: v0.15.20
14
+ hooks:
15
+ - id: ruff
16
+ args: [--fix, --exit-non-zero-on-fix]
17
+ types_or: [python, pyi]
18
+ - id: ruff-format
19
+ types_or: [python, pyi]
@@ -0,0 +1,18 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use torchsky in your research, please cite it as below."
3
+ title: "torchsky"
4
+ abstract: "Torch-native sky data, coordinates, geometry, and mapmaking."
5
+ type: software
6
+ authors:
7
+ - family-names: Fabbro
8
+ given-names: Sébastien
9
+ version: 0.5.0
10
+ license: MIT
11
+ repository-code: "https://github.com/astroai/torchsky"
12
+ url: "https://astroai.github.io/torchsky/"
13
+ keywords:
14
+ - astronomy
15
+ - pytorch
16
+ - wcs
17
+ - healpix
18
+ - mapmaking
@@ -0,0 +1,10 @@
1
+ cmake_minimum_required(VERSION 3.15)
2
+ project(torchsky)
3
+
4
+ if(DEFINED ENV{TORCHSKY_DISABLE_CPP} AND "$ENV{TORCHSKY_DISABLE_CPP}" STREQUAL "1")
5
+ message(STATUS "TORCHSKY_DISABLE_CPP=1: skipping native extension build")
6
+ return()
7
+ endif()
8
+
9
+ # Add the actual CMake project as a subdirectory
10
+ add_subdirectory(src/torchsky/cpp_src)
@@ -0,0 +1,119 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+
56
+ ## Enforcement
57
+
58
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
59
+ reported to the project maintainers via a private GitHub security advisory or
60
+ the maintainer contact listed on the GitHub profile. All complaints will be
61
+ reviewed and investigated promptly and fairly.
62
+
63
+ All community leaders are obligated to respect the privacy and security of the
64
+ reporter of any incident.
65
+
66
+ ## Enforcement Guidelines
67
+
68
+ Community leaders will follow these Community Impact Guidelines in determining
69
+ the consequences for any action they deem in violation of this Code of Conduct:
70
+
71
+ ### 1. Correction
72
+
73
+ **Community Impact**: Use of inappropriate language or other behavior deemed
74
+ unprofessional or unwelcome in the community.
75
+
76
+ **Consequence**: A private, written warning from community leaders, providing
77
+ clarity around the nature of the violation and an explanation of why the
78
+ behavior was inappropriate. A public apology may be requested.
79
+
80
+ ### 2. Warning
81
+
82
+ **Community Impact**: A violation through a single incident or series of
83
+ actions.
84
+
85
+ **Consequence**: A warning with consequences for continued behavior. No
86
+ interaction with the people involved, including unsolicited interaction with
87
+ those enforcing the Code of Conduct, for a specified period of time. This
88
+ includes avoiding interactions in community spaces as well as external channels
89
+ like social media. Violating these terms may lead to a temporary or permanent
90
+ ban.
91
+
92
+ ### 3. Temporary Ban
93
+
94
+ **Community Impact**: A serious violation of community standards, including
95
+ sustained inappropriate behavior.
96
+
97
+ **Consequence**: A temporary ban from any sort of interaction or public
98
+ communication with the community for a specified period of time. No public or
99
+ private interaction with the people involved, including unsolicited interaction
100
+ with those enforcing the Code of Conduct, is allowed during this period.
101
+ Violating these terms may lead to a permanent ban.
102
+
103
+ ### 4. Permanent Ban
104
+
105
+ **Community Impact**: Demonstrating a pattern of violation of community
106
+ standards, including sustained inappropriate behavior, harassment of an
107
+ individual, or aggression toward or disparagement of classes of individuals.
108
+
109
+ **Consequence**: A permanent ban from any sort of public interaction within the
110
+ community.
111
+
112
+ ## Attribution
113
+
114
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
115
+ version 2.1, available at
116
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
117
+
118
+ [homepage]: https://www.contributor-covenant.org
119
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
@@ -0,0 +1,51 @@
1
+ # Contributing to torchsky
2
+
3
+ Thanks for your interest. torchsky is a torch-native astronomy stack (WCS,
4
+ HEALPix, mapmaking, observation operators, field models). Please read the
5
+ [Code of Conduct](CODE_OF_CONDUCT.md) first. The full guide is
6
+ [docs/project/contributing.md](docs/project/contributing.md); repository policy for coding
7
+ agents and maintainers is in [AGENTS.md](AGENTS.md).
8
+
9
+ ## Setup
10
+
11
+ torchsky uses [pixi](https://pixi.sh/). Use `pixi run ...` for all Python; do not
12
+ call a bare `python` from your shell.
13
+
14
+ ```bash
15
+ git clone https://github.com/<you>/torchsky.git
16
+ cd torchsky
17
+ pixi install
18
+ pixi run dev # build the native extension
19
+ pixi run verify # import smoke test
20
+ pixi run setup-hooks # optional pre-push hook (ruff + compileall)
21
+ ```
22
+
23
+ ## Checks
24
+
25
+ ```bash
26
+ pixi run preflight-push # ruff + compileall
27
+ pixi run -e test -- pytest tests/test_foo.py # targeted tests
28
+ pixi run test # main suite (excludes map tests)
29
+ pixi run -e test -- pytest -n 4 -q tests/test_map_*.py # map tests
30
+ pixi run typecheck # pyright, when types change
31
+ pixi run docs-contract # strict docs build and docs tests
32
+ pixi run examples # example smoke runner
33
+ ```
34
+
35
+ Run the targeted tests for what you changed; CI runs the full suite.
36
+
37
+ ## Pull requests
38
+
39
+ - Fork, branch from `main`, and open a single focused PR against `main`.
40
+ - Add tests for behavior changes (bounded unit, regression, adjoint, gradient,
41
+ or device contracts). Scientific benchmarks live in
42
+ [torchsky-harness](https://github.com/astroai/torchsky-harness).
43
+ - Performance PRs state the bottleneck removed, why it scales, and the
44
+ benchmark evidence.
45
+ - Public API changes update the matching guide, `docs/reference/_registry.toml`,
46
+ and `docs/api-manifest.json` (`pixi run api-manifest`).
47
+ - Keep FITS I/O in [torchfits](https://github.com/astroai/torchfits); never
48
+ import `astropy.io.fits` or `fitsio`.
49
+ - Add a line to `docs/project/changelog.md` for user-visible changes.
50
+
51
+ Maintainers: see [docs/project/release.md](docs/project/release.md) for releases.
torchsky-0.5.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sébastien Fabbro
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,184 @@
1
+ Metadata-Version: 2.4
2
+ Name: torchsky
3
+ Version: 0.5.0
4
+ Summary: Torch-native sky data, coordinates, geometry, and mapmaking
5
+ Keywords: astronomy,pytorch,tensor,wcs,healpix,mapmaking,coadd,differentiable,machine-learning
6
+ Author-Email: Seb Fabbro <sebfabbro@gmail.com>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ License-File: src/torchsky/cpp_src/third_party/pocketfft.LICENSE.md
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Programming Language :: C++
17
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Project-URL: Homepage, https://github.com/astroai/torchsky
20
+ Project-URL: Repository, https://github.com/astroai/torchsky
21
+ Project-URL: Documentation, https://astroai.github.io/torchsky/
22
+ Project-URL: Changelog, https://astroai.github.io/torchsky/project/changelog/
23
+ Project-URL: Issues, https://github.com/astroai/torchsky/issues
24
+ Requires-Python: >=3.12
25
+ Requires-Dist: torch<2.15,>=2.14
26
+ Requires-Dist: numpy>=1.20.0
27
+ Requires-Dist: torchfits>=1.3.1
28
+ Provides-Extra: docs
29
+ Requires-Dist: zensical<0.1,>=0.0.71; extra == "docs"
30
+ Requires-Dist: mkdocstrings-python<2,>=1.16; extra == "docs"
31
+ Provides-Extra: viz
32
+ Requires-Dist: fastapi>=0.110; extra == "viz"
33
+ Requires-Dist: uvicorn[standard]>=0.29; extra == "viz"
34
+ Requires-Dist: pillow>=10.0; extra == "viz"
35
+ Requires-Dist: matplotlib>=3.8; extra == "viz"
36
+ Provides-Extra: dev
37
+ Requires-Dist: pytest>=6.0; extra == "dev"
38
+ Requires-Dist: pytest-cov>=2.0; extra == "dev"
39
+ Requires-Dist: ruff<0.16,>=0.15.5; extra == "dev"
40
+ Requires-Dist: ipykernel; extra == "dev"
41
+ Requires-Dist: pyright>=1.1.350; extra == "dev"
42
+ Provides-Extra: test
43
+ Requires-Dist: pytest>=6.0; extra == "test"
44
+ Requires-Dist: pytest-cov>=2.0; extra == "test"
45
+ Requires-Dist: pytest-xdist>=3.0; extra == "test"
46
+ Requires-Dist: psutil>=5.0; extra == "test"
47
+ Requires-Dist: fastapi>=0.110; extra == "test"
48
+ Requires-Dist: httpx>=0.27; extra == "test"
49
+ Requires-Dist: pillow>=10.0; extra == "test"
50
+ Requires-Dist: scipy>=1.9.0; extra == "test"
51
+ Requires-Dist: requests>=2.28.0; extra == "test"
52
+ Requires-Dist: polars>=1.0; extra == "test"
53
+ Requires-Dist: pyarrow>=14.0; extra == "test"
54
+ Requires-Dist: pandas>=2.2; extra == "test"
55
+ Requires-Dist: astropy>=5.0; extra == "test"
56
+ Requires-Dist: matplotlib>=3.8; extra == "test"
57
+ Requires-Dist: pyright>=1.1.350; extra == "test"
58
+ Provides-Extra: examples
59
+ Requires-Dist: polars>=1.0; extra == "examples"
60
+ Requires-Dist: pyarrow>=14.0; extra == "examples"
61
+ Requires-Dist: pandas>=2.2; extra == "examples"
62
+ Requires-Dist: astropy>=5.0; extra == "examples"
63
+ Provides-Extra: map
64
+ Requires-Dist: astropy>=5.0; extra == "map"
65
+ Requires-Dist: astroquery>=0.4.6; extra == "map"
66
+ Provides-Extra: ephem
67
+ Requires-Dist: jplephem>=2.17; extra == "ephem"
68
+ Provides-Extra: tle
69
+ Requires-Dist: sgp4>=2.21; extra == "tle"
70
+ Provides-Extra: gwcs
71
+ Requires-Dist: gwcs>=0.18; extra == "gwcs"
72
+ Description-Content-Type: text/markdown
73
+
74
+ # torchsky
75
+
76
+ [![CI](https://github.com/astroai/torchsky/actions/workflows/ci.yml/badge.svg)](https://github.com/astroai/torchsky/actions/workflows/ci.yml)
77
+ [![Docs](https://img.shields.io/badge/docs-astroai.github.io%2Ftorchsky-brightgreen)](https://astroai.github.io/torchsky/)
78
+ [![PyPI](https://img.shields.io/pypi/v/torchsky)](https://pypi.org/project/torchsky/)
79
+ [![Python 3.12-3.14](https://img.shields.io/badge/python-3.12%E2%80%933.14-blue)](https://www.python.org/downloads/)
80
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://github.com/astroai/torchsky/blob/main/LICENSE)
81
+
82
+ Sky coordinates, spherical geometry, and mapmaking as PyTorch tensor operations.
83
+ They run on CPU, CUDA, and MPS, support autograd, and scale to survey-sized inputs.
84
+
85
+ torchsky covers FITS-WCS, HEALPix, spherical harmonic transforms, catalog
86
+ crossmatch, image coadds, spectral cubes, and observation operators. FITS reading
87
+ and writing is handled by [torchfits](https://github.com/astroai/torchfits), which
88
+ torchsky installs as a dependency.
89
+
90
+ ## Install
91
+
92
+ Stable releases, from 0.5.0, are on PyPI: `pip install torchsky`. Release
93
+ candidates are only [GitHub pre-releases](https://github.com/astroai/torchsky/releases)
94
+ and are never uploaded to PyPI. Building from source needs a C++ compiler and
95
+ CMake for the native extension:
96
+
97
+ ```bash
98
+ git clone https://github.com/astroai/torchsky.git
99
+ cd torchsky
100
+ pip install .
101
+ ```
102
+
103
+ torchsky supports Python 3.12 to 3.14 with PyTorch 2.14. The
104
+ [installation guide](https://astroai.github.io/torchsky/introduction/install/) covers CUDA,
105
+ Pixi, and troubleshooting.
106
+
107
+ ## Quick start
108
+
109
+ ```python
110
+ import torch
111
+ import torchsky.sphere as sphere
112
+ from torchsky.map import Observation, coadd, plan
113
+ from torchsky.wcs import WCS
114
+
115
+ header = {"NAXIS": 2, "NAXIS1": 64, "NAXIS2": 64,
116
+ "CTYPE1": "RA---TAN", "CTYPE2": "DEC--TAN", "CRPIX1": 32.5, "CRPIX2": 32.5,
117
+ "CRVAL1": 150.0, "CRVAL2": 2.0, "CDELT1": -2.8e-4, "CDELT2": 2.8e-4}
118
+
119
+ ra, dec = WCS(header).pixel_to_world(torch.tensor([0.0, 63.0]), torch.tensor([0.0, 63.0]))
120
+ pix = sphere.ang2pix(1024, ra, dec, lonlat=True, nest=True)
121
+
122
+ obs = [Observation(data=torch.randn(64, 64), wcs={**header, "CRVAL1": c}) for c in (150.0, 150.01)]
123
+ result = coadd(obs, plan(obs, projection="TAN"), kernel="bilinear")
124
+ ```
125
+
126
+ For real files, read them with torchfits and pass the header on:
127
+ `data, header = torchfits.read("image.fits", return_header=True)`.
128
+
129
+ ## What's in the box
130
+
131
+ | Namespace | Contents |
132
+ |---|---|
133
+ | `torchsky.wcs` | FITS-WCS projections, SIP/TPV distortions, affine fitting |
134
+ | `torchsky.sphere` | HEALPix, MOC, sparse maps, polygons, spin SHT |
135
+ | `torchsky.coords` | Frame conversion, observed alt/az, proper motion |
136
+ | `torchsky.catalogs` | Crossmatch and spherical partitioning |
137
+ | `torchsky.map` | Coadds, spectral cubes, observation operators, solvers |
138
+ | `torchsky.spectral` and friends | Spectra, photometry, extinction, cosmology |
139
+ | `torchsky.scene`, `torchsky.field` | Forward models and continuous sky fields (experimental) |
140
+
141
+ ## Performance
142
+
143
+ On 135 JWST/NIRCam exposures (566 Mpix) onto a 512 x 512 grid, torchsky's
144
+ Lanczos-3 coadd takes 14.3 s on 8 CPU threads and 5.2 s on a GPU slice, against
145
+ 30.1 s for SWarp. Its drizzle matches STScI drizzle to better than 2e-6 sigma. A
146
+ 280-CCD UNIONS tile coadd fell from 2292 s to 711 s on CPU. Hardware, versions,
147
+ and evidence are on the
148
+ [performance highlights](https://astroai.github.io/torchsky/performance/highlights/)
149
+ page.
150
+
151
+ ## Documentation
152
+
153
+ - [Quick start](https://astroai.github.io/torchsky/introduction/quickstart/) and
154
+ [examples](https://astroai.github.io/torchsky/examples/)
155
+ - [User guide and API reference](https://github.com/astroai/torchsky/blob/main/docs/index.md)
156
+ (rendered at [astroai.github.io/torchsky](https://astroai.github.io/torchsky/))
157
+ - [Coming from Astropy, healpy, or reproject](https://astroai.github.io/torchsky/introduction/coming-from/)
158
+ - [Changelog](https://astroai.github.io/torchsky/project/changelog/)
159
+
160
+ ## Contributing
161
+
162
+ Development uses [pixi](https://pixi.sh):
163
+
164
+ ```bash
165
+ git clone https://github.com/astroai/torchsky.git && cd torchsky
166
+ pixi install --locked
167
+ pixi run dev # build the native extension in place
168
+ pixi run preflight-push # lint + compile check
169
+ pixi run test # unit suite
170
+ ```
171
+
172
+ Read [CONTRIBUTING.md](https://github.com/astroai/torchsky/blob/main/CONTRIBUTING.md)
173
+ before opening a PR. Issues labelled
174
+ [good first issue](https://github.com/astroai/torchsky/labels/good%20first%20issue)
175
+ are a good place to start.
176
+
177
+ ## Citation
178
+
179
+ If torchsky helps your research, please cite it using
180
+ [CITATION.cff](https://github.com/astroai/torchsky/blob/main/CITATION.cff).
181
+
182
+ ## License
183
+
184
+ [MIT](https://github.com/astroai/torchsky/blob/main/LICENSE)
@@ -0,0 +1,111 @@
1
+ # torchsky
2
+
3
+ [![CI](https://github.com/astroai/torchsky/actions/workflows/ci.yml/badge.svg)](https://github.com/astroai/torchsky/actions/workflows/ci.yml)
4
+ [![Docs](https://img.shields.io/badge/docs-astroai.github.io%2Ftorchsky-brightgreen)](https://astroai.github.io/torchsky/)
5
+ [![PyPI](https://img.shields.io/pypi/v/torchsky)](https://pypi.org/project/torchsky/)
6
+ [![Python 3.12-3.14](https://img.shields.io/badge/python-3.12%E2%80%933.14-blue)](https://www.python.org/downloads/)
7
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://github.com/astroai/torchsky/blob/main/LICENSE)
8
+
9
+ Sky coordinates, spherical geometry, and mapmaking as PyTorch tensor operations.
10
+ They run on CPU, CUDA, and MPS, support autograd, and scale to survey-sized inputs.
11
+
12
+ torchsky covers FITS-WCS, HEALPix, spherical harmonic transforms, catalog
13
+ crossmatch, image coadds, spectral cubes, and observation operators. FITS reading
14
+ and writing is handled by [torchfits](https://github.com/astroai/torchfits), which
15
+ torchsky installs as a dependency.
16
+
17
+ ## Install
18
+
19
+ Stable releases, from 0.5.0, are on PyPI: `pip install torchsky`. Release
20
+ candidates are only [GitHub pre-releases](https://github.com/astroai/torchsky/releases)
21
+ and are never uploaded to PyPI. Building from source needs a C++ compiler and
22
+ CMake for the native extension:
23
+
24
+ ```bash
25
+ git clone https://github.com/astroai/torchsky.git
26
+ cd torchsky
27
+ pip install .
28
+ ```
29
+
30
+ torchsky supports Python 3.12 to 3.14 with PyTorch 2.14. The
31
+ [installation guide](https://astroai.github.io/torchsky/introduction/install/) covers CUDA,
32
+ Pixi, and troubleshooting.
33
+
34
+ ## Quick start
35
+
36
+ ```python
37
+ import torch
38
+ import torchsky.sphere as sphere
39
+ from torchsky.map import Observation, coadd, plan
40
+ from torchsky.wcs import WCS
41
+
42
+ header = {"NAXIS": 2, "NAXIS1": 64, "NAXIS2": 64,
43
+ "CTYPE1": "RA---TAN", "CTYPE2": "DEC--TAN", "CRPIX1": 32.5, "CRPIX2": 32.5,
44
+ "CRVAL1": 150.0, "CRVAL2": 2.0, "CDELT1": -2.8e-4, "CDELT2": 2.8e-4}
45
+
46
+ ra, dec = WCS(header).pixel_to_world(torch.tensor([0.0, 63.0]), torch.tensor([0.0, 63.0]))
47
+ pix = sphere.ang2pix(1024, ra, dec, lonlat=True, nest=True)
48
+
49
+ obs = [Observation(data=torch.randn(64, 64), wcs={**header, "CRVAL1": c}) for c in (150.0, 150.01)]
50
+ result = coadd(obs, plan(obs, projection="TAN"), kernel="bilinear")
51
+ ```
52
+
53
+ For real files, read them with torchfits and pass the header on:
54
+ `data, header = torchfits.read("image.fits", return_header=True)`.
55
+
56
+ ## What's in the box
57
+
58
+ | Namespace | Contents |
59
+ |---|---|
60
+ | `torchsky.wcs` | FITS-WCS projections, SIP/TPV distortions, affine fitting |
61
+ | `torchsky.sphere` | HEALPix, MOC, sparse maps, polygons, spin SHT |
62
+ | `torchsky.coords` | Frame conversion, observed alt/az, proper motion |
63
+ | `torchsky.catalogs` | Crossmatch and spherical partitioning |
64
+ | `torchsky.map` | Coadds, spectral cubes, observation operators, solvers |
65
+ | `torchsky.spectral` and friends | Spectra, photometry, extinction, cosmology |
66
+ | `torchsky.scene`, `torchsky.field` | Forward models and continuous sky fields (experimental) |
67
+
68
+ ## Performance
69
+
70
+ On 135 JWST/NIRCam exposures (566 Mpix) onto a 512 x 512 grid, torchsky's
71
+ Lanczos-3 coadd takes 14.3 s on 8 CPU threads and 5.2 s on a GPU slice, against
72
+ 30.1 s for SWarp. Its drizzle matches STScI drizzle to better than 2e-6 sigma. A
73
+ 280-CCD UNIONS tile coadd fell from 2292 s to 711 s on CPU. Hardware, versions,
74
+ and evidence are on the
75
+ [performance highlights](https://astroai.github.io/torchsky/performance/highlights/)
76
+ page.
77
+
78
+ ## Documentation
79
+
80
+ - [Quick start](https://astroai.github.io/torchsky/introduction/quickstart/) and
81
+ [examples](https://astroai.github.io/torchsky/examples/)
82
+ - [User guide and API reference](https://github.com/astroai/torchsky/blob/main/docs/index.md)
83
+ (rendered at [astroai.github.io/torchsky](https://astroai.github.io/torchsky/))
84
+ - [Coming from Astropy, healpy, or reproject](https://astroai.github.io/torchsky/introduction/coming-from/)
85
+ - [Changelog](https://astroai.github.io/torchsky/project/changelog/)
86
+
87
+ ## Contributing
88
+
89
+ Development uses [pixi](https://pixi.sh):
90
+
91
+ ```bash
92
+ git clone https://github.com/astroai/torchsky.git && cd torchsky
93
+ pixi install --locked
94
+ pixi run dev # build the native extension in place
95
+ pixi run preflight-push # lint + compile check
96
+ pixi run test # unit suite
97
+ ```
98
+
99
+ Read [CONTRIBUTING.md](https://github.com/astroai/torchsky/blob/main/CONTRIBUTING.md)
100
+ before opening a PR. Issues labelled
101
+ [good first issue](https://github.com/astroai/torchsky/labels/good%20first%20issue)
102
+ are a good place to start.
103
+
104
+ ## Citation
105
+
106
+ If torchsky helps your research, please cite it using
107
+ [CITATION.cff](https://github.com/astroai/torchsky/blob/main/CITATION.cff).
108
+
109
+ ## License
110
+
111
+ [MIT](https://github.com/astroai/torchsky/blob/main/LICENSE)
@@ -0,0 +1,16 @@
1
+ # Security policy
2
+
3
+ ## Supported versions
4
+
5
+ Security fixes are made on the latest released minor version and on `main`.
6
+
7
+ ## Reporting a vulnerability
8
+
9
+ Please do not open a public issue for security problems. Use GitHub private
10
+ vulnerability reporting: open the **Security** tab of
11
+ [astroai/torchsky](https://github.com/astroai/torchsky/security) and choose
12
+ **Report a vulnerability**.
13
+
14
+ Include the affected version, a minimal reproduction, and the impact you
15
+ expect. We aim to acknowledge reports within a few days and will coordinate a
16
+ fix and disclosure timeline with you.