SpiralMap 0.0.20__py3-none-any.whl → 0.0.22__py3-none-any.whl

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.
Binary file
Binary file
@@ -1,39 +1,73 @@
1
- @ARTICLE{Drimmel:2024,
2
- author = {{Drimmel}, Ronald and {Khanna}, Shourya and {Poggio}, Eloisa and {Skowron}, Dorota M.},
3
- title = "{The Milky Way as Seen by Classical Cepheids II: Spiral Structure}",
4
- journal = {arXiv e-prints},
5
- keywords = {Astrophysics - Astrophysics of Galaxies},
6
- year = 2024,
1
+ @ARTICLE{Taylor_Cordes_1992,
2
+ author = {{Taylor}, J.~H. and {Cordes}, J.~M.},
3
+ title = "{Pulsar Distances and the Galactic Distribution of Free Electrons}",
4
+ journal = {\apj},
5
+ keywords = {Astrometry, Electron Density (Concentration), Free Electrons, Galactic Structure, H Ii Regions, Pulsars, Astronomical Models, Extragalactic Radio Sources, Interstellar Matter, Milky Way Galaxy, Astrophysics, GALAXY: STRUCTURE, ISM: GENERAL, STARS: PULSARS: GENERAL, STARS: DISTANCES},
6
+ year = 1993,
7
+ month = jul,
8
+ volume = {411},
9
+ pages = {674},
10
+ doi = {10.1086/172870},
11
+ adsurl = {https://ui.adsabs.harvard.edu/abs/1993ApJ...411..674T},
12
+ adsnote = {Provided by the SAO/NASA Astrophysics Data System}
13
+ }
14
+
15
+ @ARTICLE{Drimmel_NIR_2000,
16
+ author = {{Drimmel}, R.},
17
+ title = "{Evidence for a two-armed spiral in the Milky Way}",
18
+ journal = {\aap},
19
+ keywords = {GALAXY: STRUCTURE, INFRARED: GALAXIES, Astrophysics},
20
+ year = 2000,
7
21
  month = jun,
8
- eid = {arXiv:2406.09127},
9
- pages = {arXiv:2406.09127},
10
- doi = {10.48550/arXiv.2406.09127},
22
+ volume = {358},
23
+ pages = {L13-L16},
24
+ doi = {10.48550/arXiv.astro-ph/0005241},
11
25
  archivePrefix = {arXiv},
12
- eprint = {2406.09127},
13
- primaryClass = {astro-ph.GA},
14
- adsurl = {https://ui.adsabs.harvard.edu/abs/2024arXiv240609127D},
26
+ eprint = {astro-ph/0005241},
27
+ primaryClass = {astro-ph},
28
+ adsurl = {https://ui.adsabs.harvard.edu/abs/2000A&A...358L..13D},
15
29
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
16
30
  }
17
31
 
18
- #
19
-
20
- @ARTICLE{Skowron:2024,
21
- author = {{Skowron}, Dorota M. and {Drimmel}, Ronald and {Khanna}, Shourya and {Spagna}, Alessandro and {Poggio}, Eloisa and {Ramos}, Pau},
22
- title = "{The Milky Way as seen by Classical Cepheids I: distances based on mid-infrared photometry}",
23
- journal = {arXiv e-prints},
24
- keywords = {Astrophysics - Astrophysics of Galaxies, Astrophysics - Solar and Stellar Astrophysics},
25
- year = 2024,
32
+ @ARTICLE{Levine_2006,
33
+ author = {{Levine}, E.~S. and {Blitz}, Leo and {Heiles}, Carl},
34
+ title = "{The Spiral Structure of the Outer Milky Way in Hydrogen}",
35
+ journal = {Science},
36
+ keywords = {ASTRONOMY, Astrophysics},
37
+ year = 2006,
26
38
  month = jun,
27
- eid = {arXiv:2406.09113},
28
- pages = {arXiv:2406.09113},
29
- doi = {10.48550/arXiv.2406.09113},
39
+ volume = {312},
40
+ number = {5781},
41
+ pages = {1773-1777},
42
+ doi = {10.1126/science.1128455},
30
43
  archivePrefix = {arXiv},
31
- eprint = {2406.09113},
44
+ eprint = {astro-ph/0605728},
45
+ primaryClass = {astro-ph},
46
+ adsurl = {https://ui.adsabs.harvard.edu/abs/2006Sci...312.1773L},
47
+ adsnote = {Provided by the SAO/NASA Astrophysics Data System}
48
+ }
49
+
50
+
51
+
52
+ @ARTICLE{Hou:2014,
53
+ author = {{Hou}, L.~G. and {Han}, J.~L.},
54
+ title = "{The observed spiral structure of the Milky Way}",
55
+ journal = {\aap},
56
+ keywords = {Galaxy: disk, Galaxy: structure, Galaxy: kinematics and dynamics, HII regions, ISM: clouds, Astrophysics - Astrophysics of Galaxies},
57
+ year = 2014,
58
+ month = sep,
59
+ volume = {569},
60
+ eid = {A125},
61
+ pages = {A125},
62
+ doi = {10.1051/0004-6361/201424039},
63
+ archivePrefix = {arXiv},
64
+ eprint = {1407.7331},
32
65
  primaryClass = {astro-ph.GA},
33
- adsurl = {https://ui.adsabs.harvard.edu/abs/2024arXiv240609113S},
66
+ adsurl = {https://ui.adsabs.harvard.edu/abs/2014A&A...569A.125H},
34
67
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
35
68
  }
36
69
 
70
+
37
71
  @ARTICLE{Reid:2019,
38
72
  author = {{Reid}, M.~J. and {Menten}, K.~M. and {Brunthaler}, A. and {Zheng}, X.~W. and {Dame}, T.~M. and {Xu}, Y. and {Li}, J. and {Sakai}, N. and {Wu}, Y. and {Immer}, K. and {Zhang}, B. and {Sanna}, A. and {Moscadelli}, L. and {Rygl}, K.~L.~J. and {Bartkiewicz}, A. and {Hu}, B. and {Quiroga-Nu{\~n}ez}, L.~H. and {van Langevelde}, H.~J.},
39
73
  title = "{Trigonometric Parallaxes of High-mass Star-forming Regions: Our View of the Milky Way}",
@@ -53,7 +87,8 @@ archivePrefix = {arXiv},
53
87
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
54
88
  }
55
89
 
56
- @ARTICLE{Poggio:2021,
90
+
91
+ @ARTICLE{Poggio_2021,
57
92
  author = {{Poggio}, E. and {Drimmel}, R. and {Cantat-Gaudin}, T. and {Ramos}, P. and {Ripepi}, V. and {Zari}, E. and {Andrae}, R. and {Blomme}, R. and {Chemin}, L. and {Clementini}, G. and {Figueras}, F. and {Fouesneau}, M. and {Fr{\'e}mat}, Y. and {Lobel}, A. and {Marshall}, D.~J. and {Muraveva}, T. and {Romero-G{\'o}mez}, M.},
58
93
  title = "{Galactic spiral structure revealed by Gaia EDR3}",
59
94
  journal = {\aap},
@@ -71,66 +106,34 @@ archivePrefix = {arXiv},
71
106
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
72
107
  }
73
108
 
74
- @ARTICLE{Levine:2006,
75
- author = {{Levine}, E.~S. and {Blitz}, Leo and {Heiles}, Carl},
76
- title = "{The Spiral Structure of the Outer Milky Way in Hydrogen}",
77
- journal = {Science},
78
- keywords = {ASTRONOMY, Astrophysics},
79
- year = 2006,
80
- month = jun,
81
- volume = {312},
82
- number = {5781},
83
- pages = {1773-1777},
84
- doi = {10.1126/science.1128455},
85
- archivePrefix = {arXiv},
86
- eprint = {astro-ph/0605728},
87
- primaryClass = {astro-ph},
88
- adsurl = {https://ui.adsabs.harvard.edu/abs/2006Sci...312.1773L},
89
- adsnote = {Provided by the SAO/NASA Astrophysics Data System}
90
- }
91
109
 
92
- @ARTICLE{Hou:2009,
93
- author = {{Hou}, L.~G. and {Han}, J.~L. and {Shi}, W.~B.},
94
- title = "{The spiral structure of our Milky Way Galaxy}",
95
- journal = {\aap},
96
- keywords = {Galaxy: structure, Galaxy: kinematics and dynamics, ISM: HII regions, Astrophysics - Astrophysics of Galaxies},
97
- year = 2009,
98
- month = may,
99
- volume = {499},
100
- number = {2},
101
- pages = {473-482},
102
- doi = {10.1051/0004-6361/200809692},
110
+ @ARTICLE{Drimmel_Ceph_2024,
111
+ author = {{Drimmel}, Ronald and {Khanna}, Shourya and {Poggio}, Eloisa and {Skowron}, Dorota M.},
112
+ title = "{The Milky Way as Seen by Classical Cepheids II: Spiral Structure}",
113
+ journal = {arXiv e-prints},
114
+ keywords = {Astrophysics - Astrophysics of Galaxies},
115
+ year = 2024,
116
+ month = jun,
117
+ eid = {arXiv:2406.09127},
118
+ pages = {arXiv:2406.09127},
119
+ doi = {10.48550/arXiv.2406.09127},
103
120
  archivePrefix = {arXiv},
104
- eprint = {0903.0721},
121
+ eprint = {2406.09127},
105
122
  primaryClass = {astro-ph.GA},
106
- adsurl = {https://ui.adsabs.harvard.edu/abs/2009A&A...499..473H},
123
+ adsurl = {https://ui.adsabs.harvard.edu/abs/2024arXiv240609127D},
107
124
  adsnote = {Provided by the SAO/NASA Astrophysics Data System}
108
- }
125
+ }
109
126
 
110
- @ARTICLE{Georgelin:1976,
111
- author = {{Georgelin}, Y.~M. and {Georgelin}, Y.~P.},
112
- title = "{The spiral structure of our Galaxy determined from H II regions.}",
113
- journal = {\aap},
114
- keywords = {Astronomical Models, Galactic Rotation, Galactic Structure, H Alpha Line, H Ii Regions, Milky Way Galaxy, Astronomical Maps, Hydrogen Ions, Kinematics, Radial Velocity, Radio Astronomy, Tables (Data), Visual Observation, Astrophysics},
115
- year = 1976,
116
- month = may,
117
- volume = {49},
118
- pages = {57-79},
119
- adsurl = {https://ui.adsabs.harvard.edu/abs/1976A&A....49...57G},
120
- adsnote = {Provided by the SAO/NASA Astrophysics Data System}
121
- }
122
127
 
123
- @ARTICLE{Taylor:1993,
124
- author = {{Taylor}, J.~H. and {Cordes}, J.~M.},
125
- title = "{Pulsar Distances and the Galactic Distribution of Free Electrons}",
126
- journal = {\apj},
127
- keywords = {Astrometry, Electron Density (Concentration), Free Electrons, Galactic Structure, H Ii Regions, Pulsars, Astronomical Models, Extragalactic Radio Sources, Interstellar Matter, Milky Way Galaxy, Astrophysics, GALAXY: STRUCTURE, ISM: GENERAL, STARS: PULSARS: GENERAL, STARS: DISTANCES},
128
- year = 1993,
129
- month = jul,
130
- volume = {411},
131
- pages = {674},
132
- doi = {10.1086/172870},
133
- adsurl = {https://ui.adsabs.harvard.edu/abs/1993ApJ...411..674T},
134
- adsnote = {Provided by the SAO/NASA Astrophysics Data System}
135
- }
136
128
 
129
+ @article{Gaia_2022,
130
+ title={Gaia Data Release 3: Mapping the asymmetric disc of the Milky Way},
131
+ volume={674},
132
+ ISSN={1432-0746},
133
+ url={http://dx.doi.org/10.1051/0004-6361/202243797},
134
+ DOI={10.1051/0004-6361/202243797},
135
+ journal={Astronomy & Astrophysics},
136
+ publisher={EDP Sciences},
137
+ author={Drimmel, R. and Romero-Gómez, M. and Chemin, L. and Ramos, P. and Poggio, E. and Ripepi, V. and Andrae, R. and Blomme, R. and Cantat-Gaudin, T. and Castro-Ginard, A. and Clementini, G. and Figueras, F. and Fouesneau, M. and Frémat, Y. and Jardine, K. and Khanna, S. and Lobel, A. and Marshall, D. J. and Muraveva, T. and Brown, A. G. A. and Vallenari, A. and Prusti, T. and de Bruijne, J. H. J. and Arenou, F. and Babusiaux, C. and Biermann, M. and Creevey, O. L. and Ducourant, C. and Evans, D. W. and Eyer, L. and Guerra, R. and Hutton, A. and Jordi, C. and Klioner, S. A. and Lammers, U. L. and Lindegren, L. and Luri, X. and Mignard, F. and Panem, C. and Pourbaix, D. and Randich, S. and Sartoretti, P. and Soubiran, C. and Tanga, P. and Walton, N. A. and Bailer-Jones, C. A. L. and Bastian, U. and Jansen, F. and Katz, D. and Lattanzi, M. G. and van Leeuwen, F. and Bakker, J. and Cacciari, C. and Castañeda, J. and De Angeli, F. and Fabricius, C. and Galluccio, L. and Guerrier, A. and Heiter, U. and Masana, E. and Messineo, R. and Mowlavi, N. and Nicolas, C. and Nienartowicz, K. and Pailler, F. and Panuzzo, P. and Riclet, F. and Roux, W. and Seabroke, G. M. and Sordo, R. and Thévenin, F. and Gracia-Abril, G. and Portell, J. and Teyssier, D. and Altmann, M. and Audard, M. and Bellas-Velidis, I. and Benson, K. and Berthier, J. and Burgess, P. W. and Busonero, D. and Busso, G. and Cánovas, H. and Carry, B. and Cellino, A. and Cheek, N. and Damerdji, Y. and Davidson, M. and de Teodoro, P. and Nuñez Campos, M. and Delchambre, L. and Dell’Oro, A. and Esquej, P. and Fernández-Hernández, J. and Fraile, E. and Garabato, D. and García-Lario, P. and Gosset, E. and Haigron, R. and Halbwachs, J.-L. and Hambly, N. C. and Harrison, D. L. and Hernández, J. and Hestroffer, D. and Hodgkin, S. T. and Holl, B. and Janßen, K. and Jevardat de Fombelle, G. and Jordan, S. and Krone-Martins, A. and Lanzafame, A. C. and Löffler, W. and Marchal, O. and Marrese, P. M. and Moitinho, A. and Muinonen, K. and Osborne, P. and Pancino, E. and Pauwels, T. and Recio-Blanco, A. and Reylé, C. and Riello, M. and Rimoldini, L. and Roegiers, T. and Rybizki, J. and Sarro, L. M. and Siopis, C. and Smith, M. and Sozzetti, A. and Utrilla, E. and van Leeuwen, M. and Abbas, U. and Ábrahám, P. and Abreu Aramburu, A. and Aerts, C. and Aguado, J. J. and Ajaj, M. and Aldea-Montero, F. and Altavilla, G. and Álvarez, M. A. and Alves, J. and Anders, F. and Anderson, R. I. and Anglada Varela, E. and Antoja, T. and Baines, D. and Baker, S. G. and Balaguer-Núñez, L. and Balbinot, E. and Balog, Z. and Barache, C. and Barbato, D. and Barros, M. and Barstow, M. A. and Bartolomé, S. and Bassilana, J.-L. and Bauchet, N. and Becciani, U. and Bellazzini, M. and Berihuete, A. and Bernet, M. and Bertone, S. and Bianchi, L. and Binnenfeld, A. and Blanco-Cuaresma, S. and Boch, T. and Bombrun, A. and Bossini, D. and Bouquillon, S. and Bragaglia, A. and Bramante, L. and Breedt, E. and Bressan, A. and Brouillet, N. and Brugaletta, E. and Bucciarelli, B. and Burlacu, A. and Butkevich, A. G. and Buzzi, R. and Caffau, E. and Cancelliere, R. and Carballo, R. and Carlucci, T. and Carnerero, M. I. and Carrasco, J. M. and Casamiquela, L. and Castellani, M. and Chaoul, L. and Charlot, P. and Chiaramida, V. and Chiavassa, A. and Chornay, N. and Comoretto, G. and Contursi, G. and Cooper, W. J. and Cornez, T. and Cowell, S. and Crifo, F. and Cropper, M. and Crosta, M. and Crowley, C. and Dafonte, C. and Dapergolas, A. and David, P. and de Laverny, P. and De Luise, F. and De March, R. and De Ridder, J. and de Souza, R. and de Torres, A. and del Peloso, E. F. and del Pozo, E. and Delbo, M. and Delgado, A. and Delisle, J.-B. and Demouchy, C. and Dharmawardena, T. E. and Di Matteo, P. and Diakite, S. and Diener, C. and Distefano, E. and Dolding, C. and Enke, H. and Fabre, C. and Fabrizio, M. and Faigler, S. and Fedorets, G. and Fernique, P. and Fournier, Y. and Fouron, C. and Fragkoudi, F. and Gai, M. and Garcia-Gutierrez, A. and Garcia-Reinaldos, M. and García-Torres, M. and Garofalo, A. and Gavel, A. and Gavras, P. and Gerlach, E. and Geyer, R. and Giacobbe, P. and Gilmore, G. and Girona, S. and Giuffrida, G. and Gomel, R. and Gomez, A. and González-Núñez, J. and González-Santamaría, I. and González-Vidal, J. J. and Granvik, M. and Guillout, P. and Guiraud, J. and Gutiérrez-Sánchez, R. and Guy, L. P. and Hatzidimitriou, D. and Hauser, M. and Haywood, M. and Helmer, A. and Helmi, A. and Sarmiento, M. H. and Hidalgo, S. L. and Hładczuk, N. and Hobbs, D. and Holland, G. and Huckle, H. E. and Jasniewicz, G. and Jean-Antoine Piccolo, A. and Jiménez-Arranz, Ó. and Juaristi Campillo, J. and Julbe, F. and Karbevska, L. and Kervella, P. and Kordopatis, G. and Korn, A. J. and Kóspál, Á and Kostrzewa-Rutkowska, Z. and Kruszyńska, K. and Kun, M. and Laizeau, P. and Lambert, S. and Lanza, A. F. and Lasne, Y. and Le Campion, J.-F. and Lebreton, Y. and Lebzelter, T. and Leccia, S. and Leclerc, N. and Lecoeur-Taibi, I. and Liao, S. and Licata, E. L. and Lindstrøm, H. E. P. and Lister, T. A. and Livanou, E. and Lorca, A. and Loup, C. and Madrero Pardo, P. and Magdaleno Romeo, A. and Managau, S. and Mann, R. G. and Manteiga, M. and Marchant, J. M. and Marconi, M. and Marcos, J. and Marcos Santos, M. M. S. and Marín Pina, D. and Marinoni, S. and Marocco, F. and Martin Polo, L. and Martín-Fleitas, J. M. and Marton, G. and Mary, N. and Masip, A. and Massari, D. and Mastrobuono-Battisti, A. and Mazeh, T. and McMillan, P. J. and Messina, S. and Michalik, D. and Millar, N. R. and Mints, A. and Molina, D. and Molinaro, R. and Molnár, L. and Monari, G. and Monguió, M. and Montegriffo, P. and Montero, A. and Mor, R. and Mora, A. and Morbidelli, R. and Morel, T. and Morris, D. and Murphy, C. P. and Musella, I. and Nagy, Z. and Noval, L. and Ocaña, F. and Ogden, A. and Ordenovic, C. and Osinde, J. O. and Pagani, C. and Pagano, I. and Palaversa, L. and Palicio, P. A. and Pallas-Quintela, L. and Panahi, A. and Payne-Wardenaar, S. and Peñalosa Esteller, X. and Penttilä, A. and Pichon, B. and Piersimoni, A. M. and Pineau, F.-X. and Plachy, E. and Plum, G. and Prša, A. and Pulone, L. and Racero, E. and Ragaini, S. and Rainer, M. and Raiteri, C. M. and Ramos-Lerate, M. and Re Fiorentin, P. and Regibo, S. and Richards, P. J. and Rios Diaz, C. and Riva, A. and Rix, H.-W. and Rixon, G. and Robichon, N. and Robin, A. C. and Robin, C. and Roelens, M. and Rogues, H. R. O. and Rohrbasser, L. and Rowell, N. and Royer, F. and Ruz Mieres, D. and Rybicki, K. A. and Sadowski, G. and Sáez Núñez, A. and Sagristà Sellés, A. and Sahlmann, J. and Salguero, E. and Samaras, N. and Sanchez Gimenez, V. and Sanna, N. and Santoveña, R. and Sarasso, M. and Schultheis, M. S. and Sciacca, E. and Segol, M. and Segovia, J. C. and Ségransan, D. and Semeux, D. and Shahaf, S. and Siddiqui, H. I. and Siebert, A. and Siltala, L. and Silvelo, A. and Slezak, E. and Slezak, I. and Smart, R. L. and Snaith, O. N. and Solano, E. and Solitro, F. and Souami, D. and Souchay, J. and Spagna, A. and Spina, L. and Spoto, F. and Steele, I. A. and Steidelmüller, H. and Stephenson, C. A. and Süveges, M. and Surdej, J. and Szabados, L. and Szegedi-Elek, E. and Taris, F. and Taylor, M. B. and Teixeira, R. and Tolomei, L. and Tonello, N. and Torra, F. and Torra, J. and Torralba Elipe, G. and Trabucchi, M. and Tsounis, A. T. and Turon, C. and Ulla, A. and Unger, N. and Vaillant, M. V. and van Dillen, E. and van Reeven, W. and Vanel, O. and Vecchiato, A. and Viala, Y. and Vicente, D. and Voutsinas, S. and Weiler, M. and Wevers, T. and Wyrzykowski, Ł. and Yoldas, A. and Yvard, P. and Zhao, H. and Zorec, J. and Zucker, S. and Zwitter, T.},
138
+ year={2023},
139
+ month=jun, pages={A37} }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
SpiralMap/models_.py CHANGED
@@ -198,7 +198,7 @@ class TaylorCordesSpiral(object):
198
198
 
199
199
 
200
200
  class spiral_houhan(object):
201
- """Hou & Han (2014) polynomial-logarithmic spiral arm model
201
+ """Hou & Han (2014) polynomial-logarithmic spiral arm model, all tracers
202
202
 
203
203
  Implements the Milky Way spiral structure model from:
204
204
  "The spiral structure of the Milky Way from classical Cepheids" (Hou & Han 2014)
@@ -218,7 +218,7 @@ class spiral_houhan(object):
218
218
 
219
219
  def getparams(self):
220
220
  """
221
- Load spiral parameters from Hou & Han (2014) Table 4.
221
+ Load spiral parameters from Hou & Han (2014) Table 4 (vcirc=239, Z =0.16), all tracers.
222
222
 
223
223
  :return: params ( Nested dictionary containing for each arm).
224
224
 
@@ -228,7 +228,112 @@ class spiral_houhan(object):
228
228
 
229
229
  θ_end: End angle in degrees.
230
230
  :rtype: dict
231
- """
231
+ """
232
+ params = {
233
+ 'Norma': {'a': 1.1320, 'b': 0.1233, 'c': 0.003488, 'd': 0.0, 'θ_start': 40, 'θ_end': 250},
234
+ 'Scutum-Centaurus': {'a': 5.8243, 'b': -1.8196, 'c': 0.2350, 'd': -0.009011, 'θ_start': 275, 'θ_end': 620},
235
+ 'Sagittarius-Carina': {'a': 4.2767, 'b': -1.1507, 'c': 0.1570, 'd': -0.006078, 'θ_start': 275, 'θ_end': 575},
236
+ 'Perseus': {'a': 1.1280, 'b': 0.1282, 'c': 0.002617, 'd': 0.0, 'θ_start': 280, 'θ_end': 500},
237
+ 'Local': {'a': 1.7978, 'b': -0.04738, 'c': 0.01684, 'd': 0.0, 'θ_start': 280, 'θ_end': 500},
238
+ 'Outer': {'a': 2.4225, 'b': -0.1636, 'c': 0.02494, 'd': 0.0, 'θ_start': 280, 'θ_end': 405}
239
+ }
240
+ return params
241
+ def polynomial_log_spiral(self, θ, a, b, c, d):
242
+ """Calculate radius using polynomial-logarithmic spiral equation.
243
+
244
+ Parameters
245
+ ----------
246
+ θ : float or ndarray
247
+ Galactic longitude angle in degrees
248
+ a,b,c,d : float
249
+ Polynomial coefficients from Hou & Han Table 4
250
+
251
+ Returns
252
+ -------
253
+ float or ndarray
254
+ Galactocentric radius in kiloparsecs
255
+
256
+ Notes
257
+ -----
258
+ Implements equation:
259
+ R(θ) = exp(a + bθ_rad + cθ_rad² + dθ_rad³)
260
+ where θ_rad = np.radians(θ)
261
+ """
262
+ return np.exp(a + b*np.radians(θ) + c*np.radians(θ)**2 + d*np.radians(θ)**3)
263
+
264
+ def model_(self, arm_name, n_points=500):
265
+
266
+ params_ = self.getparams()
267
+ params = params_[arm_name]
268
+
269
+
270
+ θ = np.linspace(params['θ_start'], params['θ_end'], n_points)
271
+ R = self.polynomial_log_spiral(θ, params['a'], params['b'], params['c'], params['d'])
272
+
273
+ # Convert to Cartesian coordinates (Galactocentric)
274
+ y_gc = R*np.cos(np.radians(θ))
275
+ x_gc = -R * np.sin(np.radians(θ))
276
+
277
+ # Convert to Heliocentric coordinates
278
+ x_hc = (x_gc + self.R0)
279
+
280
+ return x_hc, y_gc, x_gc, y_gc
281
+
282
+ def output_(self, arm):
283
+ """
284
+ Get arm coordinates in structured format.
285
+
286
+ :param arm: Arm identifier (e.g., 'Arm1')
287
+ :type arm: String
288
+ :return: self.dout = {'xhc':xhc,'yhc':yhc,'xgc':xgc,'ygc':ygc}
289
+ :rtype: dict
290
+ """
291
+
292
+ xsun = self.xsun
293
+ self.R0 = -xsun # Solar Galactocentric radius (kpc)
294
+ # Generate spiral arm coordinates
295
+ xhc, yhc, xgc, ygc = self.model_(arm)
296
+ self.dout = {
297
+ 'xhc': xhc,
298
+ 'yhc': yhc,
299
+ 'xgc': xgc,
300
+ 'ygc': ygc
301
+ }
302
+
303
+
304
+ class spiral_houhan_HII(object):
305
+ """Hou & Han (2014) polynomial-logarithmic spiral arm model, HII regions only.
306
+
307
+ Implements the Milky Way spiral structure model from:
308
+ "The spiral structure of the Milky Way from classical Cepheids" (Hou & Han 2014)
309
+ using polynomial-logarithmic spiral functions. Provides 6 major arm segments.
310
+ """
311
+ def __init__(self):
312
+ self.getarmlist()
313
+ def getarmlist(self):
314
+ """Set arm names and colours"""
315
+ self.arms = np.array(['Norma','Scutum-Centaurus','Sagittarius-Carina','Perseus','Local','Outer'])
316
+ self.armcolour = {'Norma':'black','Scutum-Centaurus':'red','Sagittarius-Carina':'green','Perseus':'blue','Local':'purple','Outer':'gold'}
317
+ self.armcolours= [self.armcolour[ky] for ky in self.arms ]
318
+ def info(self):
319
+ d = {'Arm list': self.arms, 'Colour': self.armcolours}
320
+ dfmodlist = pd.DataFrame(d)
321
+ print(tabulate(dfmodlist, headers = 'keys', tablefmt = 'psql'))
322
+
323
+ def getparams(self):
324
+ """
325
+ Load spiral parameters from Hou & Han (2014) Table 4 (vcirc=239, Z =0.16), HII regions only.
326
+
327
+ :return: params ( Nested dictionary containing for each arm).
328
+
329
+ a, b, c, d: Polynomial coefficients.
330
+
331
+ θ_start: Start angle in degrees (Galactic longitude).
332
+
333
+ θ_end: End angle in degrees.
334
+ :rtype: dict
335
+ """
336
+
232
337
  params = {
233
338
  'Norma': {'a': 1.1668, 'b': 0.1198, 'c': 0.002557, 'd': 0.0, 'θ_start': 40, 'θ_end': 250},
234
339
  'Scutum-Centaurus': {'a': 5.8002, 'b': -1.8188, 'c': 0.2352, 'd': -0.008999, 'θ_start': 275, 'θ_end': 620},
@@ -237,6 +342,7 @@ class spiral_houhan(object):
237
342
  'Local': {'a': 0.9887, 'b': 0.1714, 'c': 0.004358, 'd': 0.0, 'θ_start': 280, 'θ_end': 475},
238
343
  'Outer': {'a': 3.3846, 'b': -0.6554, 'c': 0.08170, 'd': 0.0, 'θ_start': 280, 'θ_end': 355}
239
344
  }
345
+
240
346
  return params
241
347
  def polynomial_log_spiral(self, θ, a, b, c, d):
242
348
  """Calculate radius using polynomial-logarithmic spiral equation.
@@ -271,8 +377,8 @@ class spiral_houhan(object):
271
377
  R = self.polynomial_log_spiral(θ, params['a'], params['b'], params['c'], params['d'])
272
378
 
273
379
  # Convert to Cartesian coordinates (Galactocentric)
274
- x_gc = R*np.cos(np.radians(θ))
275
- y_gc = R * np.sin(np.radians(θ))
380
+ y_gc = R*np.cos(np.radians(θ))
381
+ x_gc = -R * np.sin(np.radians(θ))
276
382
 
277
383
  # Convert to Heliocentric coordinates
278
384
  x_hc = (x_gc + self.R0)
@@ -301,6 +407,8 @@ class spiral_houhan(object):
301
407
  }
302
408
 
303
409
 
410
+
411
+
304
412
  class spiral_levine(object):
305
413
  """
306
414
  Levine et al (2006) logarithmic spiral arm model for the Milky Way.
@@ -818,7 +926,7 @@ class main_(object):
818
926
  """
819
927
 
820
928
  self.models = ['Taylor_Cordes_1992','Drimmel_NIR_2000',
821
- 'Levine_2006','Hou_Han_2014','Reid_2019',
929
+ 'Levine_2006','Hou_Han_2014','Hou_Han_HII_2014','Reid_2019',
822
930
  'Poggio_cont_2021','GaiaPVP_cont_2022','Drimmel_Ceph_2024']
823
931
  self.models_class = {'Reid_2019':reid_spiral(),
824
932
  'Levine_2006':spiral_levine(),
@@ -827,10 +935,11 @@ class main_(object):
827
935
  'Drimmel_NIR_2000':spiral_drimmel_nir(),
828
936
  'Taylor_Cordes_1992':TaylorCordesSpiral(),
829
937
  'Hou_Han_2014':spiral_houhan(),
938
+ 'Hou_Han_HII_2014':spiral_houhan_HII(),
830
939
  'Drimmel_Ceph_2024':spiral_drimmel_cepheids()}
831
940
 
832
941
  self.models_desc = ['HII','NIR emission',
833
- 'HI','HII/GMC/Masers','MASER parallax',
942
+ 'HI','HII/GMC/Masers','HII','MASER parallax',
834
943
  'Upper main sequence (map)','OB stars (map)','Cepheids']
835
944
  def getinfo(self,model='',print_=True):
836
945
  """
@@ -973,7 +1082,7 @@ class _make_supportfiles(object):
973
1082
 
974
1083
  def __init__(self):
975
1084
 
976
- self.xsun = -8.277
1085
+ self.Rsun = 8.277
977
1086
 
978
1087
  # self.prep_poggio_polar()
979
1088
  self.savelims_all()
@@ -991,7 +1100,7 @@ class _make_supportfiles(object):
991
1100
  plt.close('all')
992
1101
  plotattrs = {'plot':True,'coordsys': 'HC','markersize':15,'linewidth':1,'polarproj':False,'armcolour':'black'}
993
1102
  sp = spiral_poggio_maps(model_=usemodel)
994
- sp.xsun = xsun
1103
+ sp.Rsun = Rsun
995
1104
  cset1,cset2 = sp.output_(plotattrs)
996
1105
 
997
1106
  # # check xy projection
@@ -1043,11 +1152,11 @@ class _make_supportfiles(object):
1043
1152
  def savelims_all(self):
1044
1153
 
1045
1154
  print('saving plot limits for all models')
1046
- xsun=self.xsun
1155
+ Rsun=self.Rsun
1047
1156
 
1048
1157
  mylims = {}
1049
1158
 
1050
- spirals = main_(xsun=xsun)
1159
+ spirals = main_(Rsun=Rsun)
1051
1160
  for inum,use_model in enumerate(spirals.models):
1052
1161
 
1053
1162
  plt.close('all')
@@ -1080,11 +1189,11 @@ class _make_supportfiles(object):
1080
1189
  def savelims(self):
1081
1190
 
1082
1191
  print('saving plot limits for all models')
1083
- xsun=self.xsun
1192
+ Rsun=self.Rsun
1084
1193
 
1085
1194
  mylims = {}
1086
1195
 
1087
- spirals = main_(xsun=xsun)
1196
+ spirals = main_(Rsun=Rsun)
1088
1197
 
1089
1198
  for inum,use_model in enumerate(spirals.models):
1090
1199
 
@@ -1125,3 +1234,4 @@ class _make_supportfiles(object):
1125
1234
 
1126
1235
 
1127
1236
 
1237
+ # # _make_supportfiles()
SpiralMap/movie_.gif CHANGED
Binary file
SpiralMap/test.py CHANGED
@@ -195,7 +195,7 @@ if single_model_polar_hou:
195
195
  plt.savefig(figdir_primer+'/polar_proj_single_model.png')
196
196
 
197
197
 
198
- multiple_models_polar = True
198
+ multiple_models_polar = False
199
199
  if multiple_models_polar:
200
200
 
201
201
  Rsun=8.277
@@ -254,6 +254,43 @@ if multiple_models_polar:
254
254
  plt.savefig(figdir_primer+'/polar_proj_multiple_models2.png')
255
255
 
256
256
 
257
+ hou_han_test = False
258
+ if hou_han_test:
259
+
260
+ Rsun=8.277
261
+ spirals = sp.main_(Rsun=Rsun)
262
+ use_model = 'Hou_Han_2014'
263
+ use_model3 = 'Hou_Han__HII_2014'
264
+ use_arm = 'all'
265
+ use_model2 = 'Poggio_cont_2021'
266
+
267
+
268
+ spirals.getinfo(model=use_model)
269
+
270
+ plt.close('all')
271
+
272
+ fig = plt.figure(figsize=(10,10.))
273
+
274
+ ax = plt.subplot(121, projection='polar')
275
+
276
+ plotattrs = {'plot':True,'coordsys':'GC','markersize':15,'markSunGC':True,'polarproj':True,'linewidth':5}
277
+ spirals.readout(plotattrs,model=use_model,arm=use_arm)
278
+ plotattrs = {'plot':True,'coordsys':'GC','markersize':3,'polarproj':True}
279
+ spirals.readout(plotattrs,model=use_model2,arm='all')
280
+ polar_style(ax,title=use_model+' (GC)')
281
+
282
+ ax = plt.subplot(122, projection='polar')
283
+
284
+ plotattrs = {'plot':True,'coordsys':'GC','markersize':15,'markSunGC':True,'polarproj':True,'linewidth':5}
285
+ spirals.readout(plotattrs,model=use_model3,arm=use_arm)
286
+ plotattrs = {'plot':True,'coordsys':'GC','markersize':3,'polarproj':True}
287
+ spirals.readout(plotattrs,model=use_model2,arm='all')
288
+ polar_style(ax,title=use_model3+' (GC)')
289
+
290
+
291
+ plt.tight_layout()
292
+
293
+ plt.savefig(figdir_primer+'/test_houhan.png')
257
294
 
258
295
  makegif = False
259
296
  if makegif:
@@ -286,7 +323,7 @@ if makegif:
286
323
 
287
324
  import mytools
288
325
  curdir = os.getcwd()
289
- mytools.png2movie(figdir_primer,curdir,flname='movie_',duration=2.5,fmt='gif')
326
+ mytools.png2movie(figdir_primer,curdir,flname='movie_',duration=3.5,fmt='gif')
290
327
 
291
328
 
292
329
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SpiralMap
3
- Version: 0.0.20
3
+ Version: 0.0.22
4
4
  Summary: Python Library of Milky Way's Spiral Arms
5
5
  Project-URL: Homepage, https://github.com/Abhaypru/SpiralMap
6
6
  Project-URL: Issues, https://github.com/Abhaypru/SpiralMap/issues
@@ -31,7 +31,9 @@ For a quickstart please refer to the accompanying [Jupyter notebook](https://git
31
31
  + Extract the 2D trace of individual or all spiral arms from a particular model.
32
32
  + Directly overplot spiral arms with choice of Cartesian or Polar coordinates, and in Heliocentric or Galactocentric frames.
33
33
 
34
+ ![image info](src/SpiralMap/movie_.gif).
34
35
 
36
+ Shown above is a gallery of the spiral models & maps included in the current version.
35
37
 
36
38
  Installation
37
39
  -------------
@@ -1,12 +1,12 @@
1
1
  SpiralMap/__init__.py,sha256=7F5e52HrtZpHq8kNmLG8e1jtNlf6jkufCDgoIKlKZGs,100
2
- SpiralMap/models_.py,sha256=aHSZh4XpdbewJsLltG-ETo0OwCQgJhXLhsESGpeC5X0,36681
3
- SpiralMap/movie_.gif,sha256=9cjZHcbIwXVWyCzX3rETQWBNamF409iojpyVBX0Ec5M,190718
2
+ SpiralMap/models_.py,sha256=_1_l1AUv39EkEE7rF2-twOBDajvfO4k7LWdUY1DaqTE,40387
3
+ SpiralMap/movie_.gif,sha256=famzvY320Jz8xjKjB0FndkXdGPZ4P8pJGlVKEHQuoto,125026
4
4
  SpiralMap/mytools.py,sha256=rmUT9Wsg3NhRHTlV-RvoZ3TWvYSEs5epX3zydEonnHM,7237
5
- SpiralMap/test.py,sha256=owAKSAyvCevvyKHptYf9S-i4p_8XMheRG0HO4Tkw4PI,8848
5
+ SpiralMap/test.py,sha256=C7h_h-P1FFJlVv9CHGxO_2x_Zud12j1Xf-tUmmh0tdc,9987
6
6
  SpiralMap/version.py,sha256=G_9nHD5j8EWxdjfiRE8uUrh0l_FRWN5WAnCM9wjLIJw,78
7
- SpiralMap/datafiles/flim.pkl,sha256=_UJxKjAjAjD6IlgmedN61NiCSA19qFjWWJOuu_HbHzo,9560
8
- SpiralMap/datafiles/flim_all.pkl,sha256=G4mad8eZQ_cuow_N6ZkyuK2yWAd4i-jhOwvRXzX8Tkc,2129
9
- SpiralMap/datafiles/spiral.bib,sha256=F9e7jMTLehTPB9DRmsdH_VtR66-jJ7dAunStEq9WDUY,6361
7
+ SpiralMap/datafiles/flim.pkl,sha256=VmwuaFXQbAc0P3ey2sPrZa3BgpXk4KSlwZrb3aoKYzU,11235
8
+ SpiralMap/datafiles/flim_all.pkl,sha256=HWjuVpmOfdtLqsZK6eMajoGGXTdUfF9nXodRMjKYHbU,2112
9
+ SpiralMap/datafiles/spiral.bib,sha256=tOAgtQcbd4uFfcf-8twiEjpZGXjdV_ZE7VvlMLDn_jk,13614
10
10
  SpiralMap/datafiles/Drimmel2024_cepheids/ArmAttributes_dyoungW1_bw025.pkl,sha256=F4pUfUSEg7_BBC9jpMjFeuWFHj4dYKszrpMt8wKW0ds,6571
11
11
  SpiralMap/datafiles/Drimmel_NIR/Drimmel2armspiral.fits,sha256=jJ2k0yddyIUbMxGRGszD6cwlleUrGMtkrMByc_hU5bA,14400
12
12
  SpiralMap/datafiles/Drimmel_NIR/Readme_spiral_m2_147.txt,sha256=h2aA4V9T8RQRBlG_GYDJRfLswnqrK6AmdCleFR-NLSE,395
@@ -27,8 +27,14 @@ SpiralMap/datafiles/Poggio_cont_2021/Poggio_cont_2021_pproj_contours.pkl,sha256=
27
27
  SpiralMap/datafiles/Poggio_cont_2021/overdens_grid_locscale03.npy,sha256=peM4jyLQsE8X4bMTCCe-7UD3Hayi2qmRcOQzCudBfHM,117256
28
28
  SpiralMap/datafiles/Poggio_cont_2021/xvalues.npy,sha256=uhY3STTfBhTer8pWNAkLezyu4o94VmNZgft0RZPFcTk,1096
29
29
  SpiralMap/datafiles/Poggio_cont_2021/yvalues.npy,sha256=uhY3STTfBhTer8pWNAkLezyu4o94VmNZgft0RZPFcTk,1096
30
- SpiralMap/figdir_primer/polar_proj_multiple_models2.png,sha256=Wpyp8A1rjzMZHCdBbMJW56ZOwitRMAmDRaWZkk5Y_Lg,129119
31
- spiralmap-0.0.20.dist-info/METADATA,sha256=88vRzGsCH1Vq1MlrlqdOSZPdjVSfNTnx9ws9D0-xb0A,2153
32
- spiralmap-0.0.20.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
33
- spiralmap-0.0.20.dist-info/licenses/LICENSE.md,sha256=5w1L9A7eVMqU0wNIsBTTZA8K2JBIK0KKbqMSaQ1z9m0,1076
34
- spiralmap-0.0.20.dist-info/RECORD,,
30
+ SpiralMap/figdir_primer/map_0png.png,sha256=OMkJAkxqk9a9rvwphY6cvboY7RmYylApkKXINLiQtUs,75636
31
+ SpiralMap/figdir_primer/map_1png.png,sha256=tA2OgSICQlC0N7VxypEZDucHvCKq3HsFStgo0eq95rM,83668
32
+ SpiralMap/figdir_primer/map_2png.png,sha256=kBvhJb4KZJ5We6wnLo0YdnWQHmys1BF-kaXweQCYto8,71296
33
+ SpiralMap/figdir_primer/map_3png.png,sha256=J8MUzu100rOaWxd1LGvhNItXJdtvQpt_cecgebSDxOI,86123
34
+ SpiralMap/figdir_primer/map_4png.png,sha256=IBBJYP7boTzGUhIDdOnjsjK549YWeoEQgZABB7Lu7FA,84457
35
+ SpiralMap/figdir_primer/map_5png.png,sha256=DzqQO-CBwKpq1wW75yqi4msLA5hslsUs8f3qfI-jkY4,71955
36
+ SpiralMap/figdir_primer/map_8png.png,sha256=YNKex-pu4Vo8ULBuGKNhWXuuvNOEd6Xl_2KXtPcfAUw,74856
37
+ spiralmap-0.0.22.dist-info/METADATA,sha256=67HYgoq7yV1yUT6W_BaU3H_-JjSpXzv6MZ3DbvmnV14,2281
38
+ spiralmap-0.0.22.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
39
+ spiralmap-0.0.22.dist-info/licenses/LICENSE.md,sha256=5w1L9A7eVMqU0wNIsBTTZA8K2JBIK0KKbqMSaQ1z9m0,1076
40
+ spiralmap-0.0.22.dist-info/RECORD,,