Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dchaddock committed Dec 8, 2024
1 parent 7dd45e9 commit 8032bfe
Show file tree
Hide file tree
Showing 9 changed files with 1,042 additions and 152 deletions.
174 changes: 111 additions & 63 deletions docs/generated/index.js

Large diffs are not rendered by default.

98 changes: 75 additions & 23 deletions docs/generated/pyaurorax/data/ucalgary/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ <h2 id="attributes">Attributes</h2>
var_str = str(var_value)

# print string for this var
print(&#34; %-30s: %s&#34; % (var_name, var_str))</code></pre>
print(&#34; %-27s: %s&#34; % (var_name, var_str))</code></pre>
</details>
<h3>Class variables</h3>
<dl>
Expand Down Expand Up @@ -342,7 +342,12 @@ <h2 id="attributes">Attributes</h2>
if (len(self.data) == 1):
data_str = &#34;[1 RiometerData object]&#34;
else:
data_str = &#34;[%d RiometerData objects]&#34; % (len(self.data))
data_str = &#34;[%d HSRData objects]&#34; % (len(self.data))
elif (isinstance(self.data[0], HSRData) is True):
if (len(self.data) == 1):
data_str = &#34;[1 HSRData object]&#34;
else:
data_str = &#34;[%d HSRData objects]&#34; % (len(self.data))
elif (len(self.data) == 1):
data_str = &#34;[1 item]&#34;
else:
Expand Down Expand Up @@ -374,12 +379,12 @@ <h2 id="attributes">Attributes</h2>

# print
print(&#34;Data:&#34;)
print(&#34; %-22s: %s&#34; % (&#34;data&#34;, data_str))
print(&#34; %-22s: %s&#34; % (&#34;timestamp&#34;, timestamp_str))
print(&#34; %-22s: %s&#34; % (&#34;metadata&#34;, metadata_str))
print(&#34; %-22s: %s&#34; % (&#34;problematic_files&#34;, problematic_files_str))
print(&#34; %-22s: %s&#34; % (&#34;calibrated_data&#34;, calibrated_data_str))
print(&#34; %-22s: %s&#34; % (&#34;dataset&#34;, dataset_str))</code></pre>
print(&#34; %-19s: %s&#34; % (&#34;data&#34;, data_str))
print(&#34; %-19s: %s&#34; % (&#34;timestamp&#34;, timestamp_str))
print(&#34; %-19s: %s&#34; % (&#34;metadata&#34;, metadata_str))
print(&#34; %-19s: %s&#34; % (&#34;problematic_files&#34;, problematic_files_str))
print(&#34; %-19s: %s&#34; % (&#34;calibrated_data&#34;, calibrated_data_str))
print(&#34; %-19s: %s&#34; % (&#34;dataset&#34;, dataset_str))</code></pre>
</details>
<h3>Class variables</h3>
<dl>
Expand Down Expand Up @@ -420,7 +425,7 @@ <h3>Methods</h3>
</dd>
<dt id="pyaurorax.data.ucalgary.Dataset"><code class="flex name class">
<span>class <span class="ident">Dataset</span></span>
<span>(</span><span>name: str,<br>short_description: str,<br>long_description: str,<br>data_tree_url: str,<br>file_listing_supported: bool,<br>file_reading_supported: bool,<br>level: str,<br>supported_libraries: List[str],<br>doi: str | None = None,<br>doi_details: str | None = None,<br>citation: str | None = None)</span>
<span>(</span><span>name: str,<br>short_description: str,<br>long_description: str,<br>data_tree_url: str,<br>file_listing_supported: bool,<br>file_reading_supported: bool,<br>level: str,<br>supported_libraries: List[str],<br>file_time_resolution: str,<br>doi: str | None = None,<br>doi_details: str | None = None,<br>citation: str | None = None)</span>
</code></dt>
<dd>
<div class="desc"><p>A dataset available from the UCalgary Space Remote Sensing API, with possibly
Expand All @@ -440,6 +445,9 @@ <h2 id="attributes">Attributes</h2>
<dd>Flag indicating if file listing (downloading) is supported for this dataset.</dd>
<dt><strong><code>file_reading_supported</code></strong> :&ensp;<code>bool</code></dt>
<dd>Flag indicating if file reading is supported for this dataset.</dd>
<dt><strong><code>file_time_resolution</code></strong> :&ensp;<code>str</code></dt>
<dd>Time resolution of the files for this dataset, represented as a string. Possible values
are: 1min, 1hr, 1day, not_applicable.</dd>
<dt><strong><code>level</code></strong> :&ensp;<code>str</code></dt>
<dd>Dataset level as per L0/L1/L2/etc standards.</dd>
<dt><strong><code>doi</code></strong> :&ensp;<code>str</code></dt>
Expand Down Expand Up @@ -481,7 +489,11 @@ <h2 id="attributes">Attributes</h2>

file_reading_supported (bool):
Flag indicating if file reading is supported for this dataset.


file_time_resolution (str):
Time resolution of the files for this dataset, represented as a string. Possible values
are: 1min, 1hr, 1day, not_applicable.

level (str):
Dataset level as per L0/L1/L2/etc standards.

Expand Down Expand Up @@ -510,6 +522,7 @@ <h2 id="attributes">Attributes</h2>
file_reading_supported: bool,
level: str,
supported_libraries: List[str],
file_time_resolution: str,
doi: Optional[str] = None,
doi_details: Optional[str] = None,
citation: Optional[str] = None):
Expand All @@ -525,6 +538,7 @@ <h2 id="attributes">Attributes</h2>
self.citation = citation
self.provider = &#34;UCalgary&#34;
self.supported_libraries = supported_libraries
self.file_time_resolution = file_time_resolution

def __str__(self) -&gt; str:
return self.__repr__()
Expand All @@ -550,7 +564,7 @@ <h2 id="attributes">Attributes</h2>

# convert var to string format we want
var_value = getattr(self, var_name)
print(&#34; %-27s: %s&#34; % (var_name, None if var_value is None else var_value))</code></pre>
print(&#34; %-24s: %s&#34; % (var_name, None if var_value is None else var_value))</code></pre>
</details>
<h3>Methods</h3>
<dl>
Expand Down Expand Up @@ -839,7 +853,7 @@ <h2 id="attributes">Attributes</h2>

# convert var to string format we want
var_value = getattr(self, var_name)
print(&#34; %-22s: %s&#34; % (var_name, None if var_value is None else var_value))</code></pre>
print(&#34; %-19s: %s&#34; % (var_name, None if var_value is None else var_value))</code></pre>
</details>
<h3>Methods</h3>
<dl>
Expand All @@ -853,7 +867,7 @@ <h3>Methods</h3>
</dd>
<dt id="pyaurorax.data.ucalgary.Skymap"><code class="flex name class">
<span>class <span class="ident">Skymap</span></span>
<span>(</span><span>filename: str,<br>project_uid: str,<br>site_uid: str,<br>imager_uid: str,<br>site_map_latitude: float,<br>site_map_longitude: float,<br>site_map_altitude: float,<br>full_elevation: numpy.ndarray,<br>full_azimuth: numpy.ndarray,<br>full_map_altitude: numpy.ndarray,<br>full_map_latitude: numpy.ndarray,<br>full_map_longitude: numpy.ndarray,<br>generation_info: pyucalgarysrs.data.classes.SkymapGenerationInfo,<br>version: str)</span>
<span>(</span><span>filename: str,<br>project_uid: str,<br>site_uid: str,<br>imager_uid: str,<br>site_map_latitude: float,<br>site_map_longitude: float,<br>site_map_altitude: float,<br>full_elevation: numpy.ndarray,<br>full_azimuth: numpy.ndarray | None,<br>full_map_altitude: numpy.ndarray,<br>full_map_latitude: numpy.ndarray,<br>full_map_longitude: numpy.ndarray,<br>generation_info: pyucalgarysrs.data.classes.SkymapGenerationInfo,<br>version: str)</span>
</code></dt>
<dd>
<div class="desc"><p>Representation for a skymap file.</p>
Expand All @@ -875,8 +889,8 @@ <h2 id="attributes">Attributes</h2>
<dd>Altitude of the instrument (in meters)</dd>
<dt><strong><code>full_elevation</code></strong> :&ensp;<code>ndarray</code></dt>
<dd>Elevation angle from horizon, for each image pixel (in degrees)</dd>
<dt><strong><code>full_azimuth</code></strong> :&ensp;<code>ndarray</code></dt>
<dd>Local azimuth angle from 0 degrees north, positive moving east (in degrees)</dd>
<dt><strong><code>full_azimuth</code></strong> :&ensp;<code>ndarray | None</code></dt>
<dd>Local azimuth angle from 0 degrees north, positive moving east (in degrees). None for TREx Spectrograph.</dd>
<dt><strong><code>full_map_altitude</code></strong> :&ensp;<code>ndarray</code></dt>
<dd>Altitudes that image coordinates are mapped to (in kilometers)</dd>
<dt><strong><code>full_map_latitude</code></strong> :&ensp;<code>ndarray</code></dt>
Expand Down Expand Up @@ -924,8 +938,8 @@ <h2 id="attributes">Attributes</h2>
full_elevation (ndarray):
Elevation angle from horizon, for each image pixel (in degrees)

full_azimuth (ndarray):
Local azimuth angle from 0 degrees north, positive moving east (in degrees)
full_azimuth (ndarray | None):
Local azimuth angle from 0 degrees north, positive moving east (in degrees). None for TREx Spectrograph.

full_map_altitude (ndarray):
Altitudes that image coordinates are mapped to (in kilometers)
Expand Down Expand Up @@ -953,7 +967,7 @@ <h2 id="attributes">Attributes</h2>
site_map_longitude: float
site_map_altitude: float
full_elevation: ndarray
full_azimuth: ndarray
full_azimuth: Union[ndarray, None]
full_map_altitude: ndarray
full_map_latitude: ndarray
full_map_longitude: ndarray
Expand All @@ -979,7 +993,7 @@ <h2 id="attributes">Attributes</h2>
print(&#34;Skymap:&#34;)
for var_name in dir(self):
# exclude methods
if (var_name.startswith(&#34;__&#34;) or var_name == &#34;pretty_print&#34;):
if (var_name.startswith(&#34;__&#34;) or var_name == &#34;pretty_print&#34; or var_name == &#34;get_precalculated_altitudes&#34;):
continue

# convert var to string format we want
Expand All @@ -994,7 +1008,7 @@ <h2 id="attributes">Attributes</h2>
var_str = str(var_value)

# print string for this var
print(&#34; %-23s: %s&#34; % (var_name, var_str))
print(&#34; %-20s: %s&#34; % (var_name, var_str))

def get_precalculated_altitudes(self):
&#34;&#34;&#34;
Expand All @@ -1009,7 +1023,7 @@ <h3>Class variables</h3>
<dd>
<div class="desc"></div>
</dd>
<dt id="pyaurorax.data.ucalgary.Skymap.full_azimuth"><code class="name">var <span class="ident">full_azimuth</span> : numpy.ndarray</code></dt>
<dt id="pyaurorax.data.ucalgary.Skymap.full_azimuth"><code class="name">var <span class="ident">full_azimuth</span> : numpy.ndarray | None</code></dt>
<dd>
<div class="desc"></div>
</dd>
Expand Down Expand Up @@ -1537,6 +1551,8 @@ <h3>Methods</h3>
n_parallel: int = 1,
first_record: bool = False,
no_metadata: bool = False,
start_time: Optional[datetime.datetime] = None,
end_time: Optional[datetime.datetime] = None,
quiet: bool = False) -&gt; Data:
&#34;&#34;&#34;
Read in data files for a given dataset. Note that only one type of dataset&#39;s data
Expand Down Expand Up @@ -1566,7 +1582,25 @@ <h3>Methods</h3>
no_metadata (bool):
Skip reading of metadata. This is a minor optimization if the metadata is not needed.
Default is `False`. This parameter is optional.


start_time (datetime.datetime):
The start timestamp to read data onwards from (inclusive). This can be utilized to
read a portion of a data file, and could be paired with the `end_time` parameter.
This tends to be utilized for datasets that are hour or day-long files where it is
possible to only read a smaller bit of that file. An example is the TREx Spectrograph
processed data (1 hour files), or the riometer data (1 day files). If not supplied,
it will assume the start time is the timestamp of the first record in the first
file supplied (ie. beginning of the supplied data). This parameter is optional.

end_time (datetime.datetime):
The end timestamp to read data up to (inclusive). This can be utilized to read a
portion of a data file, and could be paired with the `start_time` parameter. This
tends to be utilized for datasets that are hour or day-long files where it is possible
to only read a smaller bit of that file. An example is the TREx Spectrograph processed
data (1 hour files), or the riometer data (1 day files). If not supplied, it will
it will assume the end time is the timestamp of the last record in the last file
supplied (ie. end of the supplied data). This parameter is optional.

quiet (bool):
Do not print out errors while reading data files, if any are encountered. Any files
that encounter errors will be, as usual, accessible via the `problematic_files`
Expand Down Expand Up @@ -1597,6 +1631,8 @@ <h3>Methods</h3>
n_parallel=n_parallel,
first_record=first_record,
no_metadata=no_metadata,
start_time=start_time,
end_time=end_time,
quiet=quiet,
)

Expand Down Expand Up @@ -2254,7 +2290,7 @@ <h2 id="returns">Returns</h2>
<p>A list of the dataset names with file reading support.</p></div>
</dd>
<dt id="pyaurorax.data.ucalgary.UCalgaryManager.read"><code class="name flex">
<span>def <span class="ident">read</span></span>(<span>self,<br>dataset: pyucalgarysrs.data.classes.Dataset,<br>file_list: List[str] | List[pathlib.Path] | str | pathlib.Path,<br>n_parallel: int = 1,<br>first_record: bool = False,<br>no_metadata: bool = False,<br>quiet: bool = False) ‑> pyucalgarysrs.data.classes.Data</span>
<span>def <span class="ident">read</span></span>(<span>self,<br>dataset: pyucalgarysrs.data.classes.Dataset,<br>file_list: List[str] | List[pathlib.Path] | str | pathlib.Path,<br>n_parallel: int = 1,<br>first_record: bool = False,<br>no_metadata: bool = False,<br>start_time: datetime.datetime | None = None,<br>end_time: datetime.datetime | None = None,<br>quiet: bool = False) ‑> pyucalgarysrs.data.classes.Data</span>
</code></dt>
<dd>
<div class="desc"><p>Read in data files for a given dataset. Note that only one type of dataset's data
Expand All @@ -2280,6 +2316,22 @@ <h2 id="args">Args</h2>
<dt><strong><code>no_metadata</code></strong> :&ensp;<code>bool</code></dt>
<dd>Skip reading of metadata. This is a minor optimization if the metadata is not needed.
Default is <code>False</code>. This parameter is optional.</dd>
<dt><strong><code>start_time</code></strong> :&ensp;<code>datetime.datetime</code></dt>
<dd>The start timestamp to read data onwards from (inclusive). This can be utilized to
read a portion of a data file, and could be paired with the <code>end_time</code> parameter.
This tends to be utilized for datasets that are hour or day-long files where it is
possible to only read a smaller bit of that file. An example is the TREx Spectrograph
processed data (1 hour files), or the riometer data (1 day files). If not supplied,
it will assume the start time is the timestamp of the first record in the first
file supplied (ie. beginning of the supplied data). This parameter is optional.</dd>
<dt><strong><code>end_time</code></strong> :&ensp;<code>datetime.datetime</code></dt>
<dd>The end timestamp to read data up to (inclusive). This can be utilized to read a
portion of a data file, and could be paired with the <code>start_time</code> parameter. This
tends to be utilized for datasets that are hour or day-long files where it is possible
to only read a smaller bit of that file. An example is the TREx Spectrograph processed
data (1 hour files), or the riometer data (1 day files). If not supplied, it will
it will assume the end time is the timestamp of the last record in the last file
supplied (ie. end of the supplied data). This parameter is optional.</dd>
<dt><strong><code>quiet</code></strong> :&ensp;<code>bool</code></dt>
<dd>Do not print out errors while reading data files, if any are encountered. Any files
that encounter errors will be, as usual, accessible via the <code>problematic_files</code>
Expand Down
Loading

0 comments on commit 8032bfe

Please sign in to comment.