Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dchaddock committed Jun 25, 2024
1 parent 8f2dc22 commit ea3acab
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/code/pyaurorax_api_reference/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,7 @@ INDEX=[
{
"ref":"pyaurorax.models.atm.ATMManager.inverse",
"url":32,
"doc":"Perform an inverse calculation using the TREx Auroral Transport Model and the supplied input parameters. Note that this function utilizes the UCalgary Space Remote Sensing API to perform the calculation. Args: timestamp (datetime.datetime): Timestamp for the calculation. This value is expected to be in UTC, and is valid a pre-defined timeframe. An error will be raised if outside of the valid timeframe. Any timezone data will be ignored. This parameter is required. geodetic_latitude (float): Latitude in geodetic coordinates. Currently limited to the Transition Region Explorer (TREx) region of >=50.0 and =-110 and <-70 degrees. An error will be raised if outside of this range. This parameter is required. intensity_4278 (float): Intensity of the 427.8nm (blue) wavelength in Rayleighs. This parameter is required. intensity_5577 (float): Intensity of the 557.7nm (green) wavelength in Rayleighs. This parameter is required. intensity_6300 (float): Intensity of the 630.0nm (red) wavelength in Rayleighs. This parameter is required. intensity_8446 (float): Intensity of the 844.6nm (near infrared) wavelength in Rayleighs. This parameter is required. output (ATMInverseOutputFlags): Flags to indicate which values are included in the output. See [ ATMInverseOutputFlags ](https: docs-pyucalgarysrs.phys.ucalgary.ca/models/atm/classes_inverse.html pyucalgarysrs.models.atm.classes_inverse.ATMInverseOutputFlags) for more details. This parameter is required. precipitation_flux_spectral_type (str): The precipitation flux spectral type to use. Possible values are gaussian or maxwellian . The default is gaussian . This parameter is optional. nrlmsis_model_version (str): NRLMSIS version number. Possible values are 00 or 2.0 . Default is 2.0 . This parameter is optional. More details about this empirical model can be found [here](https: ccmc.gsfc.nasa.gov/models/NRLMSIS~00/), and [here](https: ccmc.gsfc.nasa.gov/models/NRLMSIS~2.0/). atm_model_version (str): ATM model version number. Possible values are only '1.0' at this time, but will have additional possible values in the future. This parameter is optional. no_cache (bool): The UCalgary Space Remote Sensing API utilizes a caching layer for performing ATM calculations. If this variation of input parameters has been run before (and the cache is still valid), then it will not re-run the calculation. Instead it will return the cached results immediately. To disable the caching layer, set this parameter to True . Default is False . This parameter is optional. timeout (int): Represents how many seconds to wait for the API to send data before giving up. The default is 10 seconds, or the api_timeout value in the super class' pyaurorax.PyAuroraX object. This parameter is optional. Returns: An [ ATMInverseResult ](https: docs-pyucalgarysrs.phys.ucalgary.ca/models/atm/classes_inverse.html pyucalgarysrs.models.atm.classes_inverse.ATMInverseResult) object containing the requested output data, among other values. Raises: pyaurorax.exceptions.AuroraXAPIError: An API error was encountered",
"doc":"Perform an inverse calculation using the TREx Auroral Transport Model and the supplied input parameters. Note that this function utilizes the UCalgary Space Remote Sensing API to perform the calculation. Args: timestamp (datetime.datetime): Timestamp for the calculation. This value is expected to be in UTC, and is valid a pre-defined timeframe. An error will be raised if outside of the valid timeframe. Any timezone data will be ignored. This parameter is required. geodetic_latitude (float): Latitude in geodetic coordinates. Currently limited to the Transition Region Explorer (TREx) region of >=50.0 and =-110 and <-70 degrees. An error will be raised if outside of this range. This parameter is required. intensity_4278 (float): Intensity of the 427.8nm (blue) wavelength in Rayleighs. This parameter is required. intensity_5577 (float): Intensity of the 557.7nm (green) wavelength in Rayleighs. This parameter is required. intensity_6300 (float): Intensity of the 630.0nm (red) wavelength in Rayleighs. This parameter is required. intensity_8446 (float): Intensity of the 844.6nm (near infrared) wavelength in Rayleighs. This parameter is required. output (ATMInverseOutputFlags): Flags to indicate which values are included in the output. See [ ATMInverseOutputFlags ](https: docs-pyucalgarysrs.phys.ucalgary.ca/models/atm/classes_inverse.html pyucalgarysrs.models.atm.classes_inverse.ATMInverseOutputFlags) for more details. This parameter is required. precipitation_flux_spectral_type (str): The precipitation flux spectral type to use. Possible values are gaussian or maxwellian . The default is gaussian . This parameter is optional. nrlmsis_model_version (str): NRLMSIS version number. Possible values are 00 or 2.0 . Default is 2.0 . This parameter is optional. More details about this empirical model can be found [here](https: ccmc.gsfc.nasa.gov/models/NRLMSIS~00/), and [here](https: ccmc.gsfc.nasa.gov/models/NRLMSIS~2.0/). atmospheric_attenuation_correction (bool): Apply an atmospheric attenuation correction factor. Default is False . atm_model_version (str): ATM model version number. Possible values are only '1.0' at this time, but will have additional possible values in the future. This parameter is optional. no_cache (bool): The UCalgary Space Remote Sensing API utilizes a caching layer for performing ATM calculations. If this variation of input parameters has been run before (and the cache is still valid), then it will not re-run the calculation. Instead it will return the cached results immediately. To disable the caching layer, set this parameter to True . Default is False . This parameter is optional. timeout (int): Represents how many seconds to wait for the API to send data before giving up. The default is 10 seconds, or the api_timeout value in the super class' pyaurorax.PyAuroraX object. This parameter is optional. Returns: An [ ATMInverseResult ](https: docs-pyucalgarysrs.phys.ucalgary.ca/models/atm/classes_inverse.html pyucalgarysrs.models.atm.classes_inverse.ATMInverseResult) object containing the requested output data, among other values. Raises: pyaurorax.exceptions.AuroraXAPIError: An API error was encountered",
"func":1
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/code/pyaurorax_api_reference/pyaurorax/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h1 class="title">Package <code>pyaurorax</code></h1>
&#34;&#34;&#34;

# versioning info
__version__ = &#34;1.0.0&#34;
__version__ = &#34;1.0.1&#34;

# documentation excludes
__pdoc__ = {&#34;cli&#34;: False, &#34;pyaurorax&#34;: False}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ <h1 class="title">Module <code>pyaurorax.models.atm</code></h1>
output: ATMInverseOutputFlags,
precipitation_flux_spectral_type: Literal[&#34;gaussian&#34;, &#34;maxwellian&#34;] = ATM_DEFAULT_PRECIPITATION_SPECTRAL_FLUX_TYPE,
nrlmsis_model_version: Literal[&#34;00&#34;, &#34;2.0&#34;] = ATM_DEFAULT_NRLMSIS_MODEL_VERSION,
atmospheric_attenuation_correction: bool = False,
atm_model_version: Literal[&#34;1.0&#34;] = ATM_DEFAULT_MODEL_VERSION,
no_cache: bool = False,
timeout: Optional[int] = None) -&gt; ATMInverseResult:
Expand Down Expand Up @@ -268,6 +269,9 @@ <h1 class="title">Module <code>pyaurorax.models.atm</code></h1>
optional. More details about this empirical model can be found [here](https://ccmc.gsfc.nasa.gov/models/NRLMSIS~00/),
and [here](https://ccmc.gsfc.nasa.gov/models/NRLMSIS~2.0/).

atmospheric_attenuation_correction (bool):
Apply an atmospheric attenuation correction factor. Default is `False`.

atm_model_version (str):
ATM model version number. Possible values are only &#39;1.0&#39; at this time, but will have
additional possible values in the future. This parameter is optional.
Expand Down Expand Up @@ -304,6 +308,7 @@ <h1 class="title">Module <code>pyaurorax.models.atm</code></h1>
precipitation_flux_spectral_type=precipitation_flux_spectral_type,
nrlmsis_model_version=nrlmsis_model_version,
atm_model_version=atm_model_version,
atmospheric_attenuation_correction=atmospheric_attenuation_correction,
no_cache=no_cache,
timeout=timeout,
)
Expand Down Expand Up @@ -479,6 +484,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
output: ATMInverseOutputFlags,
precipitation_flux_spectral_type: Literal[&#34;gaussian&#34;, &#34;maxwellian&#34;] = ATM_DEFAULT_PRECIPITATION_SPECTRAL_FLUX_TYPE,
nrlmsis_model_version: Literal[&#34;00&#34;, &#34;2.0&#34;] = ATM_DEFAULT_NRLMSIS_MODEL_VERSION,
atmospheric_attenuation_correction: bool = False,
atm_model_version: Literal[&#34;1.0&#34;] = ATM_DEFAULT_MODEL_VERSION,
no_cache: bool = False,
timeout: Optional[int] = None) -&gt; ATMInverseResult:
Expand Down Expand Up @@ -529,6 +535,9 @@ <h2 class="section-title" id="header-classes">Classes</h2>
optional. More details about this empirical model can be found [here](https://ccmc.gsfc.nasa.gov/models/NRLMSIS~00/),
and [here](https://ccmc.gsfc.nasa.gov/models/NRLMSIS~2.0/).

atmospheric_attenuation_correction (bool):
Apply an atmospheric attenuation correction factor. Default is `False`.

atm_model_version (str):
ATM model version number. Possible values are only &#39;1.0&#39; at this time, but will have
additional possible values in the future. This parameter is optional.
Expand Down Expand Up @@ -565,6 +574,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
precipitation_flux_spectral_type=precipitation_flux_spectral_type,
nrlmsis_model_version=nrlmsis_model_version,
atm_model_version=atm_model_version,
atmospheric_attenuation_correction=atmospheric_attenuation_correction,
no_cache=no_cache,
timeout=timeout,
)
Expand Down Expand Up @@ -782,7 +792,7 @@ <h2 id="raises">Raises</h2>
</details>
</dd>
<dt id="pyaurorax.models.atm.ATMManager.inverse"><code class="name flex">
<span>def <span class="ident">inverse</span></span>(<span>self, timestamp: datetime.datetime, geodetic_latitude: float, geodetic_longitude: float, intensity_4278: float, intensity_5577: float, intensity_6300: float, intensity_8446: float, output: pyucalgarysrs.models.atm.classes_inverse.ATMInverseOutputFlags, precipitation_flux_spectral_type: Literal['gaussian', 'maxwellian'] = 'gaussian', nrlmsis_model_version: Literal['00', '2.0'] = '2.0', atm_model_version: Literal['1.0'] = '1.0', no_cache: bool = False, timeout: Optional[int] = None) ‑> pyucalgarysrs.models.atm.classes_inverse.ATMInverseResult</span>
<span>def <span class="ident">inverse</span></span>(<span>self, timestamp: datetime.datetime, geodetic_latitude: float, geodetic_longitude: float, intensity_4278: float, intensity_5577: float, intensity_6300: float, intensity_8446: float, output: pyucalgarysrs.models.atm.classes_inverse.ATMInverseOutputFlags, precipitation_flux_spectral_type: Literal['gaussian', 'maxwellian'] = 'gaussian', nrlmsis_model_version: Literal['00', '2.0'] = '2.0', atmospheric_attenuation_correction: bool = False, atm_model_version: Literal['1.0'] = '1.0', no_cache: bool = False, timeout: Optional[int] = None) ‑> pyucalgarysrs.models.atm.classes_inverse.ATMInverseResult</span>
</code></dt>
<dd>
<div class="desc"><p>Perform an inverse calculation using the TREx Auroral Transport Model and the supplied input
Expand Down Expand Up @@ -825,6 +835,8 @@ <h2 id="args">Args</h2>
<dd>NRLMSIS version number. Possible values are <code>00</code> or <code>2.0</code>. Default is <code>2.0</code>. This parameter is
optional. More details about this empirical model can be found <a href="https://ccmc.gsfc.nasa.gov/models/NRLMSIS~00/">here</a>,
and <a href="https://ccmc.gsfc.nasa.gov/models/NRLMSIS~2.0/">here</a>.</dd>
<dt><strong><code>atmospheric_attenuation_correction</code></strong> :&ensp;<code>bool</code></dt>
<dd>Apply an atmospheric attenuation correction factor. Default is <code>False</code>.</dd>
<dt><strong><code>atm_model_version</code></strong> :&ensp;<code>str</code></dt>
<dd>ATM model version number. Possible values are only '1.0' at this time, but will have
additional possible values in the future. This parameter is optional.</dd>
Expand Down Expand Up @@ -862,6 +874,7 @@ <h2 id="raises">Raises</h2>
output: ATMInverseOutputFlags,
precipitation_flux_spectral_type: Literal[&#34;gaussian&#34;, &#34;maxwellian&#34;] = ATM_DEFAULT_PRECIPITATION_SPECTRAL_FLUX_TYPE,
nrlmsis_model_version: Literal[&#34;00&#34;, &#34;2.0&#34;] = ATM_DEFAULT_NRLMSIS_MODEL_VERSION,
atmospheric_attenuation_correction: bool = False,
atm_model_version: Literal[&#34;1.0&#34;] = ATM_DEFAULT_MODEL_VERSION,
no_cache: bool = False,
timeout: Optional[int] = None) -&gt; ATMInverseResult:
Expand Down Expand Up @@ -912,6 +925,9 @@ <h2 id="raises">Raises</h2>
optional. More details about this empirical model can be found [here](https://ccmc.gsfc.nasa.gov/models/NRLMSIS~00/),
and [here](https://ccmc.gsfc.nasa.gov/models/NRLMSIS~2.0/).

atmospheric_attenuation_correction (bool):
Apply an atmospheric attenuation correction factor. Default is `False`.

atm_model_version (str):
ATM model version number. Possible values are only &#39;1.0&#39; at this time, but will have
additional possible values in the future. This parameter is optional.
Expand Down Expand Up @@ -948,6 +964,7 @@ <h2 id="raises">Raises</h2>
precipitation_flux_spectral_type=precipitation_flux_spectral_type,
nrlmsis_model_version=nrlmsis_model_version,
atm_model_version=atm_model_version,
atmospheric_attenuation_correction=atmospheric_attenuation_correction,
no_cache=no_cache,
timeout=timeout,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,8 @@ <h2 id="returns">Returns</h2>
path_counter += 1

if path_counter == 0:
raise ValueError(
&#34;Could not form keogram path... First ensure that coordinates are within image range. Then try increasing &#39;width&#39; or decreasing number of points in input coordinates.&#34;
)
raise ValueError(&#34;Could not form keogram path. First ensure that coordinates are within image range. Then &#34; +
&#34;try increasing &#39;width&#39; or decreasing number of points in input coordinates.&#34;)

# Create keogram object
keo_obj = Keogram(data=keo_arr, timestamp=timestamp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,13 @@ <h2 id="raises">Raises</h2>
continue

# Scale this site&#39;s data based on previously defined scaling bounds
tmp = scale_intensity(tmp, min=image_intensity_scales[site][0], max=image_intensity_scales[site][1], top=255) # type: ignore
tmp = scale_intensity(
tmp,
min=image_intensity_scales[site][0], # type: ignore
max=image_intensity_scales[site][1], # type: ignore
top=255,
memory_saver=False,
)

# Add the timestamp to tracking list if it&#39;s unique
if meta_timestamp not in unique_timestamps:
Expand Down

0 comments on commit ea3acab

Please sign in to comment.