Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
# Change Log

All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).

## [0.1.1] - 2024-XX-XX
## [0.1.1] - 2025-XX-XX

* Update metadata standards
* Update variable names to indicate which dosimeter is used
* Update setup instructions on readme file
* Removed chained indices for improved pandas 3.0 compatibility
* Disabled new multi-day tests inherited from pysat
* Update usage of pkg_resources to importlib

## [0.1.0] - 2023-07-23

* Improved metadata standards for SPDF compatibility
* New file naming convention for l1c data
* Added download function
* New script to check on files generated

## [0.0.1] - 2022-10-28

* Initial release
4 changes: 2 additions & 2 deletions ops_reach/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

"""

import importlib
import os
import pkg_resources

from ops_reach import instruments # noqa F401

# set version
__here__ = os.path.abspath(os.path.dirname(__file__))
__version__ = pkg_resources.get_distribution('ops_reach').version
__version__ = importlib.metadata.distribution('ops_reach').version
2 changes: 2 additions & 0 deletions ops_reach/instruments/aero_reach.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
# Only setting one inst_id to true since downloads all files.
_test_dates = {'105': {'l1b': dt.datetime(2017, 2, 24)}}
_test_download = {'105': {'l1b': True}}
# Disabling multi-day tests since this functionality is not used in this context
_new_tests = {'105': {'l1b': False}}


def init(self):
Expand Down
64 changes: 32 additions & 32 deletions ops_reach/instruments/methods/reach.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,60 +330,60 @@ def generate_metadata(header_data):
meta['gei_z'] = {meta.labels.units: 'RE',
meta.labels.min_val: -2.0,
meta.labels.max_val: 2.0}
meta['dose1'] = {meta.labels.name: 'Dose rate from Dosimeter 1',
meta['dose1'] = {meta.labels.name: 'Dosimeter 1 dose rate',
meta.labels.units: 'rad/s',
meta.labels.min_val: 0.0,
meta.labels.max_val: 1.0,
'SCALEMIN': 1.0e-5,
'SCALEMAX': 1.0,
'SCALETYP': 'log'}
meta['proton_flux1'] = {meta.labels.name: 'Proton flux from bowtie',
meta['proton_flux1'] = {meta.labels.name: 'Dosimeter 1 proton flux from bowtie',
meta.labels.units: '#/cm^2/sr/s',
meta.labels.min_val: 0.0,
meta.labels.max_val: 1.0e7,
'SCALEMIN': 1.0,
'SCALEMAX': 1.0e7,
'SCALETYP': 'log'}
meta['electron_flux1'] = {meta.labels.name: 'Electron flux from bowtie',
meta['electron_flux1'] = {meta.labels.name: 'Dosimeter 1 electron flux from bowtie',
meta.labels.units: '#/cm^2/sr/s',
meta.labels.min_val: 0.0,
meta.labels.max_val: 1.0e9,
'SCALEMIN': 1.0,
'SCALEMAX': 1.0e9,
'SCALETYP': 'log'}
meta['species1'] = {meta.labels.name: 'Most probable species',
meta.labels.notes: '; '.join(('0 (not currently used)',
'1-protons, 2-electrons',
'and 3-both / ambiguous')),
meta['species1'] = {meta.labels.name: 'Dosimeter 1 most probable species',
meta.labels.notes: '; '.join(('0 = (not currently used)',
'1 = protons; 2 = electrons',
'3 = both / ambiguous')),
meta.labels.units: 'unitless',
meta.labels.min_val: 0,
meta.labels.max_val: 3,
meta.labels.fill_val: -999}
meta['dose2'] = {meta.labels.name: 'Dose rate from Dosimeter 2',
meta['dose2'] = {meta.labels.name: 'Dosimeter 2 dose rate',
meta.labels.units: 'rad/s',
meta.labels.min_val: 0.0,
meta.labels.max_val: 1.0e9,
'SCALEMIN': 1.0,
'SCALEMAX': 1.0e9,
'SCALETYP': 'log'}
meta['proton_flux2'] = {meta.labels.name: 'Proton flux from bowtie',
meta['proton_flux2'] = {meta.labels.name: 'Dosimeter 2 proton flux from bowtie',
meta.labels.units: '#/cm^2/sr/s',
meta.labels.min_val: 0.0,
meta.labels.max_val: 1.0e10,
'SCALEMIN': 1.0,
'SCALEMAX': 1.0e10,
'SCALETYP': 'log'}
meta['electron_flux2'] = {meta.labels.name: 'Electron flux from bowtie',
meta['electron_flux2'] = {meta.labels.name: 'Dosimeter 2 electron flux from bowtie',
meta.labels.units: '#/cm^2/sr/s',
meta.labels.min_val: 0.0,
meta.labels.max_val: 1.0e11,
'SCALEMIN': 1.0,
'SCALEMAX': 1.0e11,
'SCALETYP': 'log'}
meta['species2'] = {meta.labels.name: 'Most probable species',
meta.labels.notes: '; '.join(('0 (not currently used)',
'1-protons, 2-electrons',
'and 3-both / ambiguous')),
meta['species2'] = {meta.labels.name: 'Dosimeter 2 most probable species',
meta.labels.notes: '; '.join(('0 = (not currently used)',
'1 = protons; 2 = electrons',
'3 = both / ambiguous')),
meta.labels.units: 'unitless',
meta.labels.min_val: 0,
meta.labels.max_val: 3,
Expand Down Expand Up @@ -446,41 +446,41 @@ def generate_metadata(header_data):
meta.labels.max_val: 90.0,
meta.labels.fill_val: -1.0e31}
meta['region_code'] = {
meta.labels.notes: '; '.join(('-4: Southern Polar Cap',
'-3: Outer Zone Untrapped',
'-2: Slot Untrapped',
'-1: Inner Zone Untrapped',
'0: Unknown',
'1: Inner Zone Trapped',
'2: Slot Trapped',
'3: Outer Zone Trapped',
'4: Northern Polar Cap')),
meta.labels.notes: '; '.join(('-4 = Southern Polar Cap',
'-3 = Outer Zone Untrapped',
'-2 = Slot Untrapped',
'-1 = Inner Zone Untrapped',
'0 = Unknown',
'1 = Inner Zone Trapped',
'2 = Slot Trapped',
'3 = Outer Zone Trapped',
'4 = Northern Polar Cap')),
meta.labels.units: 'unitless',
meta.labels.min_val: -4,
meta.labels.max_val: 4,
meta.labels.fill_val: -999}
meta['orbit_status'] = {meta.labels.units: 'unitless',
meta.labels.notes: '1=Northbound; 2=Southbound',
meta.labels.notes: '1 = Northbound; 2 = Southbound',
meta.labels.min_val: 1,
meta.labels.max_val: 2,
meta.labels.fill_val: -999}
meta['flag'] = {
meta.labels.notes: '; '.join((
'-1: no data',
'0: No known problems',
'1: Test Mode',
'2: Possible temperature-related self-counting in Dosimeter A.',
'4: Possible temperature-related self-counting in Dosimeter B.',
'8: Duplicate packets detected.',
'16: Unknown issue with VID 163/Dosimeter B')),
'-1 = no data',
'0 = No known problems',
'1 = Test Mode',
'2 = Possible temperature-related self-counting in Dosimeter A',
'4 = Possible temperature-related self-counting in Dosimeter B',
'8 = Duplicate packets detected',
'16 = Unknown issue with VID 163/Dosimeter B')),
meta.labels.units: 'unitless',
meta.labels.min_val: -1,
meta.labels.max_val: 16,
meta.labels.fill_val: -999}

# Set non-log SCALETYP to linear
ind = meta.data['SCALETYP'] == ''
meta.data['SCALETYP'][ind] = 'linear'
meta.data.loc[ind, 'SCALETYP'] = 'linear'

return meta

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ markers = [
"download",
"no_download",
"load_options",
"new_tests",
"first",
"second"
]