Skip to content

Commit

Permalink
Saving progress on documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmoosh committed Nov 16, 2023
1 parent cf18f7b commit b1fcea7
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 77 deletions.
15 changes: 11 additions & 4 deletions PlanetMag.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function PlanetMag(moonName, era, coordType, CALC_NEW, ALL_MODELS, DO_FFT, DO_MPAUSE, specificModel, ...
specificMPmodel, outData, nptsApprox, magPhase)
function PlanetMag(moonName, era, coordType, CALC_NEW, ALL_MODELS, DO_FFT, DO_MPAUSE, ...
specificModel, specificMPmodel, outData, nptsApprox, magPhase)
% Evaluates planetary magnetic field for a time series at the specified moon location and inverts
% for the complex amplitudes of oscillation in that moon's frame.
%
Expand All @@ -26,13 +26,20 @@ function PlanetMag(moonName, era, coordType, CALC_NEW, ALL_MODELS, DO_FFT, DO_MP
% CALC_NEW : bool
% Whether to perform calculations or attempt to reload saved data for plotting purposes.
% ALL_MODELS : bool
% Whether to run all implemented model options for the desired body.
% DO_FFT : bool
% Whether to calculate and print an FFT from the time series after performing the inversion.
% DO_MPAUSE : bool
% Whether to include a magnetopause screening current model.
% specificModel : int
% Index number for the magnetospheric model to run. Options depend on the body, and setting to
% 0 selects the default model. See GetModelOpts for a description of the options.
% specificMPmodel : int
% Index number for the magnetopause model to run if DO_MPAUSE is true. 0 selects the default
% model See MpauseFld for a description of the options.
% outData : char, 1xF
% Directory to use for output complex spectrum amplitudes.
% nptsApprox : int
% Directory to use for output of complex spectrum amplitudes.
% nptsApprox : int
% Desired number of points to use in time series for inversion. A whole number of the period of
% interest (typically synodic period, as it is the strongest oscillation) will ultimately be
% selected, which is why this number is approximate.
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#sys.path.insert(0, _PACKAGE_DIR)

matlab_src_dir = _ROOT_DIR
matlab_auto_link = 'all'

apidoc_module_dir = _ROOT_DIR
apidoc_output_dir = 'stubs'
Expand Down
6 changes: 3 additions & 3 deletions docs/docstringTemplateMatlab.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
% Contact: corey.j.cochrane@jpl.nasa.gov
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Keep the above informational notice intact, separated by docstring by an empty line, not preceded
Keep the above informational notice intact, separated from docstring by an empty line, not preceded
by a %. The informational notice must appear in the first function in each file, AFTER the
docstring.

Expand All @@ -52,12 +52,12 @@ where it's required!):
% Parameters
% ----------
% inputName : type, dims
% Description.
% Description.
%
% Returns
% -------
% outputName : type, dims
% Description.
% Description.

% Part of the PlanetMag framework for evaluation and study of planetary magnetic fields.
% Created by Corey J. Cochrane and Marshall J. Styczinski
Expand Down
110 changes: 56 additions & 54 deletions docs/functions.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. role:: mat:func
:class: func
.. role:: func
:class: func

Expand All @@ -10,138 +12,138 @@ Calculation functions
.. mat:module:: functions
:noindex:

:func:`MagFldParent`
++++++++++++++++++++
:mat:func:`MagFldParent`
++++++++++++++++++++++++

.. mat:autofunction:: MagFldParent
:func:`KSMagFldJupiter`
+++++++++++++++++++++++
:mat:func:`KSMagFldJupiter`
+++++++++++++++++++++++++++

.. mat:autofunction:: KSMagFldJupiter
:func:`MpauseFld`
+++++++++++++++++
:mat:func:`MpauseFld`
+++++++++++++++++++++

.. mat:autofunction:: MpauseFld
:func:`MagFldParentSingle`
++++++++++++++++++++++++++
:mat:func:`MagFldParentSingle`
++++++++++++++++++++++++++++++

.. mat:autofunction:: MagFldParentSingle
:func:`LegendreP`
+++++++++++++++++
:mat:func:`LegendreP`
+++++++++++++++++++++

.. mat:autofunction:: LegendreP
:func:`LegendreS`
+++++++++++++++++
:mat:func:`LegendreS`
+++++++++++++++++++++

.. mat:autofunction:: LegendreS
:func:`dLegendreP`
++++++++++++++++++
:mat:func:`dLegendreP`
++++++++++++++++++++++

.. mat:autofunction:: dLegendreP
:func:`dLegendreS`
++++++++++++++++++
:mat:func:`dLegendreS`
++++++++++++++++++++++

.. mat:autofunction:: dLegendreS
:func:`Bsph2Bxyz`
+++++++++++++++++
:mat:func:`Bsph2Bxyz`
+++++++++++++++++++++

.. mat:autofunction:: Bsph2Bxyz
:func:`Bxyz2Bsph`
+++++++++++++++++
:mat:func:`Bxyz2Bsph`
+++++++++++++++++++++

.. mat:autofunction:: Bxyz2Bsph
:func:`CalcExcitationsFFT`
++++++++++++++++++++++++++
:mat:func:`CalcExcitationsFFT`
++++++++++++++++++++++++++++++

.. mat:autofunction:: CalcExcitationsFFT
:func:`ConvertSwarmCDF`
+++++++++++++++++++++++
:mat:func:`ConvertSwarmCDF`
+++++++++++++++++++++++++++

.. mat:autofunction:: ConvertSwarmCDF
:func:`ExcitationSpectrum`
++++++++++++++++++++++++++
:mat:func:`ExcitationSpectrum`
++++++++++++++++++++++++++++++

.. mat:autofunction:: ExcitationSpectrum
:func:`GetBodyParams`
+++++++++++++++++++++
:mat:func:`GetBodyParams`
+++++++++++++++++++++++++

.. mat:autofunction:: GetBodyParams
:func:`GetBplotAndLsq`
++++++++++++++++++++++
:mat:func:`GetBplotAndLsq`
++++++++++++++++++++++++++

.. mat:autofunction:: GetBplotAndLsq
:func:`GetBplotAndLsqMoon`
++++++++++++++++++++++++++
:mat:func:`GetBplotAndLsqMoon`
++++++++++++++++++++++++++++++

.. mat:autofunction:: GetBplotAndLsqMoon
:func:`GetBplotAndLsqNeptune`
+++++++++++++++++++++++++++++
:mat:func:`GetBplotAndLsqNeptune`
+++++++++++++++++++++++++++++++++

.. mat:autofunction:: GetBplotAndLsqNeptune
:func:`GetGaussCoeffs`
++++++++++++++++++++++
:mat:func:`GetGaussCoeffs`
++++++++++++++++++++++++++

.. mat:autofunction:: GetGaussCoeffs
:func:`GetModelOpts`
++++++++++++++++++++
:mat:func:`GetModelOpts`
++++++++++++++++++++++++

.. mat:autofunction:: GetModelOpts
:func:`GetMoonDist`
+++++++++++++++++++
:mat:func:`GetMoonDist`
+++++++++++++++++++++++

.. mat:autofunction:: GetMoonDist
:func:`GetPosSpice`
+++++++++++++++++++
:mat:func:`GetPosSpice`
+++++++++++++++++++++++

.. mat:autofunction:: GetPosSpice
:func:`GetTargetMoonDist`
+++++++++++++++++++++++++
:mat:func:`GetTargetMoonDist`
+++++++++++++++++++++++++++++

.. mat:autofunction:: GetTargetMoonDist
:func:`LoadSpice`
+++++++++++++++++
:mat:func:`LoadSpice`
+++++++++++++++++++++

.. mat:autofunction:: LoadSpice
:func:`LshellTrace`
+++++++++++++++++++
:mat:func:`LshellTrace`
+++++++++++++++++++++++

.. mat:autofunction:: LshellTrace
:func:`PCA_decomposition`
+++++++++++++++++++++++++
:mat:func:`PCA_decomposition`
+++++++++++++++++++++++++++++

.. mat:autofunction:: PCA_decomposition
:func:`PlotSpectrum`
++++++++++++++++++++
:mat:func:`PlotSpectrum`
++++++++++++++++++++++++

.. mat:autofunction:: PlotSpectrum
:func:`RotateBspice`
++++++++++++++++++++
:mat:func:`RotateBspice`
++++++++++++++++++++++++

.. mat:autofunction:: RotateBspice
Expand Down
27 changes: 15 additions & 12 deletions docs/primary.rst
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
.. role:: mat:func
:class: func

PlanetMag Matlab run scripts
============================

.. mat:module:: .
:noindex:

:func:`PlanetMag`
+++++++++++++++++
:mat:func:`PlanetMag`
+++++++++++++++++++++

.. mat:autofunction:: PlanetMag
.. mat:module:: comparison
:noindex:

:func:`CompareEarModels`
++++++++++++++++++++++++
:mat:func:`CompareEarModels`
++++++++++++++++++++++++++++

.. mat:autofunction:: CompareEarModels
:func:`CompareJupModels`
++++++++++++++++++++++++
:mat:func:`CompareJupModels`
++++++++++++++++++++++++++++

.. mat:autofunction:: CompareJupModels
:func:`CompareSatModels`
++++++++++++++++++++++++
:mat:func:`CompareSatModels`
++++++++++++++++++++++++++++

.. mat:autofunction:: CompareSatModels
:func:`CompareUraModels`
++++++++++++++++++++++++
:mat:func:`CompareUraModels`
++++++++++++++++++++++++++++

.. mat:autofunction:: CompareUraModels
:func:`CompareNepModels`
++++++++++++++++++++++++
:mat:func:`CompareNepModels`
++++++++++++++++++++++++++++

.. mat:autofunction:: CompareNepModels
Expand Down
28 changes: 24 additions & 4 deletions modelCoeffs/coeffsBode1994G.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
function Gnm = coeffsBode1994G(alpha)
% Calculate magnetopause field coefficients for use with Engle (1992)
% method as a function of dipole "precession angle" alpha, as fit by
% Bode (1994) -- see https://apps.dtic.mil/sti/pdfs/ADA284857.pdf.
% alpha = 0 is when the the dipole nod longitude is at local noon.
% **Gnm**
%
% Calculate magnetopause field coefficients as fit by Bode (1994).
%
% For use with Engle (1992) method as a function of dipole "precession angle" alpha for Jupiter
% See https://apps.dtic.mil/sti/pdfs/ADA284857.pdf.
%
% Parameters
% ----------
% alpha : double, 1xN
% Nod longitude for planetary dipole moment in degrees. This is the angle between the equatorial
% projection of the magnetic dipole moment vector and the direction of the Sun.
% alpha = 0 is when the the dipole north nod longitude is at local noon.
%
% Returns
% -------
% outputName : type, dims
% Description.

% Part of the PlanetMag framework for evaluation and study of planetary magnetic fields.
% Created by Corey J. Cochrane and Marshall J. Styczinski
% Maintained by Marshall J. Styczinski
% Contact: corey.j.cochrane@jpl.nasa.gov
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

npts = length(alpha);
Gnm = zeros(10, 11, npts);
Expand Down

0 comments on commit b1fcea7

Please sign in to comment.