mapflpy 1.1.8__tar.gz → 1.2.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 (88) hide show
  1. {mapflpy-1.1.8 → mapflpy-1.2.0}/PKG-INFO +2 -1
  2. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/conf.py +27 -32
  3. {mapflpy-1.1.8 → mapflpy-1.2.0}/environment.yml +2 -0
  4. {mapflpy-1.1.8 → mapflpy-1.2.0}/mapflpy/globals.py +33 -1
  5. {mapflpy-1.1.8 → mapflpy-1.2.0}/mapflpy/scripts.py +435 -91
  6. {mapflpy-1.1.8 → mapflpy-1.2.0}/mapflpy/tracer.py +36 -42
  7. {mapflpy-1.1.8 → mapflpy-1.2.0}/mapflpy/utils.py +178 -81
  8. {mapflpy-1.1.8 → mapflpy-1.2.0}/meson.build +20 -2
  9. {mapflpy-1.1.8 → mapflpy-1.2.0}/noxfile.py +17 -1
  10. {mapflpy-1.1.8 → mapflpy-1.2.0}/pyproject.toml +3 -2
  11. {mapflpy-1.1.8 → mapflpy-1.2.0}/src/mapfl/mapfl.f +233 -45
  12. {mapflpy-1.1.8 → mapflpy-1.2.0}/src/mapfl/psi_io.f90 +3 -1
  13. {mapflpy-1.1.8 → mapflpy-1.2.0}/src/mapflpy_fortran.f90 +6 -2
  14. {mapflpy-1.1.8 → mapflpy-1.2.0}/.f2py_f2cmap +0 -0
  15. {mapflpy-1.1.8 → mapflpy-1.2.0}/.gitattributes +0 -0
  16. {mapflpy-1.1.8 → mapflpy-1.2.0}/.github/workflows/docs.yml +0 -0
  17. {mapflpy-1.1.8 → mapflpy-1.2.0}/.github/workflows/publish.yml +0 -0
  18. {mapflpy-1.1.8 → mapflpy-1.2.0}/.gitignore +0 -0
  19. {mapflpy-1.1.8 → mapflpy-1.2.0}/.python-version +0 -0
  20. {mapflpy-1.1.8 → mapflpy-1.2.0}/LICENSE.txt +0 -0
  21. {mapflpy-1.1.8 → mapflpy-1.2.0}/README.rst +0 -0
  22. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/Makefile +0 -0
  23. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/make.bat +0 -0
  24. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/_static/.gitkeep +0 -0
  25. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/_static/assets/.gitkeep +0 -0
  26. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/_templates/autosummary/attribute.rst +0 -0
  27. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/_templates/autosummary/class.rst +0 -0
  28. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/_templates/autosummary/class_method.rst +0 -0
  29. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/_templates/autosummary/data.rst +0 -0
  30. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/_templates/autosummary/exception.rst +0 -0
  31. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/_templates/autosummary/function.rst +0 -0
  32. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/_templates/autosummary/method.rst +0 -0
  33. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/_templates/autosummary/module.rst +0 -0
  34. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/_templates/autosummary/package.rst +0 -0
  35. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/_templates/autosummary/property.rst +0 -0
  36. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/_templates/autosummary/static_method.rst +0 -0
  37. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/api/index.rst +0 -0
  38. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/guide/development.rst +0 -0
  39. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/guide/index.rst +0 -0
  40. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/guide/installation.rst +0 -0
  41. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/guide/overview.rst +0 -0
  42. {mapflpy-1.1.8 → mapflpy-1.2.0}/docs/source/index.rst +0 -0
  43. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/01_getting_started/GALLERY_HEADER.rst +0 -0
  44. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/01_getting_started/p01_tracing_forward.py +0 -0
  45. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/01_getting_started/p02_tracing_backward.py +0 -0
  46. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/01_getting_started/p03_tracing_forward_backward.py +0 -0
  47. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/01_getting_started/p04_adding_a_magnetogram.py +0 -0
  48. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/02_using_tracer_class/GALLERY_HEADER.rst +0 -0
  49. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/02_using_tracer_class/p01_using_defaults.py +0 -0
  50. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/02_using_tracer_class/p02_setting_tracing_direction.py +0 -0
  51. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/02_using_tracer_class/p03_adjusting_mapfl_params.py +0 -0
  52. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/02_using_tracer_class/p04_manipulating_field_data.py +0 -0
  53. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/03_using_tracermp_class/GALLERY_HEADER.rst +0 -0
  54. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/03_using_tracermp_class/p01_using_defaults.py +0 -0
  55. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/03_using_tracermp_class/p02_creating_multiple_tracermp.py +0 -0
  56. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/03_using_tracermp_class/p03_magnetic_field.py +0 -0
  57. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/04_advanced_examples/GALLERY_HEADER.rst +0 -0
  58. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/04_advanced_examples/p01_interdomain_tracing.py +0 -0
  59. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/04_advanced_examples/p02_coloring_by_polarity.py +0 -0
  60. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/04_advanced_examples/p03_filtering_fieldlines.py +0 -0
  61. {mapflpy-1.1.8 → mapflpy-1.2.0}/examples/GALLERY_HEADER.rst +0 -0
  62. {mapflpy-1.1.8 → mapflpy-1.2.0}/mapflpy/__init__.py +0 -0
  63. {mapflpy-1.1.8 → mapflpy-1.2.0}/mapflpy/_version.py.in +0 -0
  64. {mapflpy-1.1.8 → mapflpy-1.2.0}/mapflpy/data.py +0 -0
  65. {mapflpy-1.1.8 → mapflpy-1.2.0}/mapflpy/fortran/__init__.py +0 -0
  66. {mapflpy-1.1.8 → mapflpy-1.2.0}/mapflpy/py.typed +0 -0
  67. {mapflpy-1.1.8 → mapflpy-1.2.0}/src/f2py_f2cmap_mapflpy +0 -0
  68. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/__init__.py +0 -0
  69. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/conftest.py +0 -0
  70. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/data/reference_traces.npz +0 -0
  71. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/test_module.py +0 -0
  72. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/test_tracer/__init__.py +0 -0
  73. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/test_tracer/test_class_primitives.py +0 -0
  74. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/test_tracer/test_fortran_calls.py +0 -0
  75. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/test_tracer/test_param_editing.py +0 -0
  76. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/test_tracer/test_trace_routines.py +0 -0
  77. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/test_tracermp/__init__.py +0 -0
  78. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/test_tracermp/test_class_primitives_.py +0 -0
  79. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/test_tracermp/test_fortran_calls_.py +0 -0
  80. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/test_tracermp/test_param_editing_.py +0 -0
  81. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/test_tracermp/test_trace_routines_.py +0 -0
  82. {mapflpy-1.1.8 → mapflpy-1.2.0}/tests/utils.py +0 -0
  83. {mapflpy-1.1.8 → mapflpy-1.2.0}/tools/make_build.py +0 -0
  84. {mapflpy-1.1.8 → mapflpy-1.2.0}/tools/make_docs.py +0 -0
  85. {mapflpy-1.1.8 → mapflpy-1.2.0}/tools/make_intersphinx.py +0 -0
  86. {mapflpy-1.1.8 → mapflpy-1.2.0}/tools/pyproject_version.py +0 -0
  87. {mapflpy-1.1.8 → mapflpy-1.2.0}/tools/python_version.py +0 -0
  88. {mapflpy-1.1.8 → mapflpy-1.2.0}/tools/python_versions.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mapflpy
3
- Version: 1.1.8
3
+ Version: 1.2.0
4
4
  Summary: Fast field line tracing for spherical vector fields
5
5
  Keywords: solar physics,space physics,heliophysics,magnetohydrodynamic,science,mas,predsci,psi,modeling,fortran
6
6
  Author: Ryder Davidson, Cooper Downs, Andres Reyes, Asher Pembroke
@@ -51,6 +51,7 @@ Requires-Dist: sphinx==8.2.3; extra == "docs"
51
51
  Requires-Dist: sphinx-book-theme==1.1.4; extra == "docs"
52
52
  Requires-Dist: sphinx-gallery==0.19.0; extra == "docs"
53
53
  Requires-Dist: sphinx-copybutton==0.5.2; extra == "docs"
54
+ Requires-Dist: numpydoc==1.9.0; extra == "docs"
54
55
  Requires-Dist: pooch==1.8.2; extra == "docs"
55
56
  Requires-Dist: matplotlib==3.10.7; extra == "docs"
56
57
  Requires-Dist: scipy; extra == "docs"
@@ -111,7 +111,7 @@ sort_members = True
111
111
  exclusions = ['\\._abc_impl',
112
112
  'mapflpy.fortran',
113
113
  '_load_array_to_shared_memory',
114
- 'scripts._.*',
114
+ 'scripts._inter_domain_tracing_from*',
115
115
  '_version',
116
116
  ]
117
117
 
@@ -129,43 +129,38 @@ autosummary_context = dict(pkgtree=node_tree_to_dict(node_tree))
129
129
  # ------------------------------------------------------------------------------
130
130
  extensions.append("sphinx.ext.autodoc")
131
131
 
132
- autodoc_typehints = "description"
132
+ autodoc_typehints = "none"
133
133
  autodoc_member_order = 'bysource'
134
134
  autodoc_default_options = {
135
135
  "show-inheritance": True,
136
136
  }
137
- autodoc_type_aliases = {
138
- "NumberType": "NumberType",
139
- "PathType": "PathType",
140
- "ArrayType": "ArrayType",
141
- "MagneticFieldArrayType": "MagneticFieldArrayType",
142
- "DirectionType": "DirectionType",
143
- "MagneticFieldLabelType": "MagneticFieldLabelType",
144
- "ContextType": "ContextType",
145
- }
146
137
 
147
138
  # ------------------------------------------------------------------------------
148
- # Napoleon Configuration
149
- # ------------------------------------------------------------------------------
150
- extensions.append('sphinx.ext.napoleon')
151
-
152
- napoleon_use_ivar = True
153
- napoleon_preprocess_types = True
154
- napoleon_type_aliases = {
155
- "NumberType": "~mapflpy.globals.NumberType",
156
- "PathType": "~mapflpy.globals.PathType",
157
- "ArrayType": "~mapflpy.globals.ArrayType",
158
- "MagneticFieldArrayType": "~mapflpy.globals.MagneticFieldArrayType",
159
- "DirectionType": "~mapflpy.globals.DirectionType",
160
- "MagneticFieldLabelType": "~mapflpy.globals.MagneticFieldLabelType",
161
- "ContextType": "~mapflpy.globals.ContextType",
162
- "Traces": "~mapflpy.globals.Traces",
163
- "Polarity": "~mapflpy.globals.Polarity",
164
- "MagneticFieldFiles": "~mapflpy.data.MagneticFieldFiles",
165
- "ndarray": "~numpy.ndarray",
166
- "ChainMap": "~collections.ChainMap",
167
- "Callable": "~collections.abc.Callable",
168
- "MutableMapping": "~collections.abc.MutableMapping",
139
+ # Numpydoc Configuration
140
+ # ------------------------------------------------------------------------------
141
+ extensions.append("numpydoc")
142
+
143
+ numpydoc_xref_param_type = True
144
+ numpydoc_show_class_members = False
145
+ numpydoc_show_inherited_class_members = False
146
+ numpydoc_xref_ignore = {"optional", "default", "of", "or"}
147
+ numpydoc_xref_aliases = {
148
+ "NumberType": "mapflpy.globals.NumberType",
149
+ "PathType": "mapflpy.globals.PathType",
150
+ "ArrayType": "mapflpy.globals.ArrayType",
151
+ "MagneticFieldArrayType": "mapflpy.globals.MagneticFieldArrayType",
152
+ "DirectionType": "mapflpy.globals.DirectionType",
153
+ "MagneticFieldLabelType": "mapflpy.globals.MagneticFieldLabelType",
154
+ "ContextType": "mapflpy.globals.ContextType",
155
+ "Traces": "mapflpy.globals.Traces",
156
+ "Polarity": "mapflpy.globals.Polarity",
157
+ "MagneticFieldFiles": "mapflpy.data.MagneticFieldFiles",
158
+ "ndarray": "numpy.ndarray",
159
+ "ChainMap": "collections.ChainMap",
160
+ "Callable": "collections.abc.Callable",
161
+ "MutableMapping": "collections.abc.MutableMapping",
162
+ "ArrayLike": "numpy.typing.ArrayLike",
163
+ "Sequence": "collections.abc.Sequence",
169
164
  }
170
165
 
171
166
  # ------------------------------------------------------------------------------
@@ -30,12 +30,14 @@ dependencies:
30
30
  - ruff
31
31
  - coverage
32
32
  - nox
33
+ - pre-commit
33
34
 
34
35
  # -------- Docs --------
35
36
  - sphinx
36
37
  - sphinx-book-theme
37
38
  - sphinx-gallery
38
39
  - sphinx-copybutton
40
+ - numpydoc
39
41
  - matplotlib
40
42
  - pooch
41
43
  - scipy
@@ -30,7 +30,7 @@ __all__ = [
30
30
  # It contains the geometry of the traces, their start and end positions,
31
31
  # and whether they were traced to a boundary.
32
32
  #------------------------------------------------------------------------------
33
- Traces = namedtuple('Traces', ['geometry', 'start_pos', 'end_pos', 'traced_to_boundary'])
33
+ Traces = namedtuple('Traces', ['geometry', 'start_pos', 'end_pos', 'traced_to_boundary', 'integral'])
34
34
  Traces.__doc__ = (
35
35
  """Named tuple for storing magnetic fieldline trace information.
36
36
 
@@ -45,9 +45,39 @@ Traces.__doc__ = (
45
45
  Array of shape (N, 3) containing the ending positions of each fieldline.
46
46
  traced_to_boundary : ndarray
47
47
  Boolean array of shape (N,) indicating whether each fieldline was traced to a boundary.
48
+ integral : ndarray
49
+ Array of shape (N,) containing the field aligned integral. By default the integral
50
+ is just the field line length, but certain mapflpy options can change this behavior,
51
+ currently `integrate_along_fl_`, `scalar_input_file_`, `weight_integral_by_area_`, and
52
+ max_along_fl_`.
48
53
  """
49
54
  )
50
55
 
56
+ # ------------------------------------------------------------------------------
57
+ # Named tuple for storing mapping information produced by some of the mapping
58
+ # scripts in `mapflpy.scripts`
59
+ # ------------------------------------------------------------------------------
60
+ Mapping = namedtuple('Mapping', ['r', 't', 'p', 'traced_to_boundary', 'integral'])
61
+ Mapping.__doc__ = (
62
+ """Named tuple for storing magnetic fieldline mapping information.
63
+
64
+ Attributes
65
+ ----------
66
+ r : ndarray
67
+ Array containing the radial positions of the mapping endpoints [R_sun]).
68
+ t : ndarray
69
+ Array containing the theta (co-latitude) positions of the mapping endpoints [radians].
70
+ p : ndarray
71
+ Array containing the phi (longitude) positions of the mapping endpoints [radians].
72
+ traced_to_boundary : ndarray
73
+ Boolean array indicating whether each fieldline was traced to a boundary.
74
+ integral : ndarray
75
+ Array containing the values of the field line integral. By default the integral
76
+ is just the field line length, but certain mapflpy options can change this behavior,
77
+ currently `integrate_along_fl_`, `scalar_input_file_`, `weight_integral_by_area_`, and
78
+ `max_along_fl_`.
79
+ """
80
+ )
51
81
 
52
82
  # ------------------------------------------------------------------------------
53
83
  # Type aliases for improved code readability.
@@ -182,6 +212,8 @@ DEFAULT_FIELDS = MappingProxyType({
182
212
  DEFAULT_PARAMS = MappingProxyType({
183
213
  'integrate_along_fl_': False,
184
214
  'scalar_input_file_': '',
215
+ 'weight_integral_by_area_': False,
216
+ 'max_along_fl_': False,
185
217
  'verbose_': False,
186
218
  'cubic_': False,
187
219
  'trace_fwd_': False,