Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (4.4%) to scientific vocabulary
Repository
MERTIS python data reader
Basic Info
- Host: GitHub
- Owner: mariodamore
- License: mit
- Language: Jupyter Notebook
- Default Branch: master
- Homepage: https://mariodamore.github.io/mertisreader/
- Size: 2.75 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
install
mertisreader - Quick cheatsheet
Import Required Libraries
``` python import pathlib import rich import mertisreader as mr
print("Libraries imported successfully.") ```
Libraries imported successfully.
Initialize MERTISDataPackReader
``` python inputpath = pathlib.Path('../data/bcmertmallSTART-20200409T000000END-20200410T000000CRE-20240717T132010-ParamEventBootSciHK-short/cal') outputpath = pathlib.Path('/tmp/') loglevel = 'INFO'
if not inputpath.exists(): print(f"Input path {inputpath} does not exist.") else: print(f"Reading path {input_path}")
msreader = mr.MERTISDataPackReader(inputdir=inputpath, outputdir=outputpath, loglevel=log_level)
print(f'MERTISDataPackReader initialized with input directory: {msreader.inputdir}') print(f'Output directory: {msreader.outputdir}') print(f'Log level: {msreader.loglevel}') ```
2024-11-25 16:00:21,499|1472475|INFO|input_dir=PosixPath('../data/bcmer_tm_all_START-20200409T000000_END-20200410T000000_CRE-20240717T132010-ParamEventBootSciHK-short/cal')
Reading path ../data/bcmer_tm_all_START-20200409T000000_END-20200410T000000_CRE-20240717T132010-ParamEventBootSciHK-short/cal
MERTISDataPackReader initialized with input directory: ../data/bcmer_tm_all_START-20200409T000000_END-20200410T000000_CRE-20240717T132010-ParamEventBootSciHK-short/cal
Output directory: /tmp
Log level: INFO
Show Files in Input Directory
python
ms_reader.show_files()
All files in input_dir :
All files in input_dir matching \d{8}:
Counter({'.tdat': 1, '.dat': 2, '.fits': 1, '.xml': 3})
Counter({'mer_cal_sc_tis': 3, 'mer_cal_hk_extended': 2, 'mer_cal_hk_default': 2})
List File Types
python
ms_reader.listfiletypes()
{ 'hk_default': ['mer_cal_hk_default_20200409_20200409.dat'], 'hk_extended': ['mer_cal_hk_extended_20200409_20200409.dat'], 'sc_tis': ['mer_cal_sc_tis_20200409_20200409_1.fits'], 'sc_tir': [], 'sc_tis_ql': [], 'sc_tir_ql': [] }
{'hk_default': 1, 'hk_extended': 1, 'sc_tis': 1, 'sc_tir': 0, 'sc_tis_ql': 0, 'sc_tir_ql': 0}
Collect Data
``` python msreader.datacollector()
print(f'Collected data keys: {msreader.collectdata.keys()}') for key, value in msreader.collectdata.items(): print(f'{key}: {len(value)} files collected') ```
Reading filetype: hk_default from mer_cal_hk_default_20200409_20200409
Reading filetype: hk_extended from mer_cal_hk_extended_20200409_20200409
Reading filetype: tis from mer_cal_sc_tis_20200409_20200409_1
Collected data keys: dict_keys(['hk_default', 'hk_extended', 'tis'])
hk_default: 1 files collected
hk_extended: 1 files collected
tis: 1 files collected
Assemble Data
python
ms_reader.data_assembler(verbose=True)
Output()
Reading filetype: tis from ../data/bcmer_tm_all_START-20200409T000000_END-20200410T000000_CRE-20240717T132010-ParamEventBootSciHK-short/cal/me r_cal_sc_tis_20200409_20200409_1.fits
n_wav=40 # generic wavelengths : not precise enough for scientific analysis!
| | tis_stem | finite(geo) | geo.size |
|---:|:-----------------------------------|--------------:|-----------:|
| 0 | mer_cal_sc_tis_20200409_20200409_1 | 672 | 11000 |
Indices of measurements targets (HK_STAT_TIS_DATA_ACQ_TARGET):
space_index.shape=(21,)
bb7_index.shape=(0,)
bb3_index.shape=(1,)
planet_index.shape=(0,)
Collected data statistics:
Number of TIS files: 1
Number of HK files: 2
Number of TIR files: 0
Number of TIS QL files: 0
Number of TIR QL files: 0
Verify the Assembled Data
python
print(f'Geometry data keys: {ms_reader.geom_ls.keys()}')
print(f'Frames data keys: {ms_reader.frames.keys()}')
print(f'Wavelengths data keys: {ms_reader.wavelengths.keys()}')
print(f'MERTIS TIS metadata keys: {ms_reader.mertis_tis_metadata.keys()}')
print(f'Space index shape: {ms_reader.space_index.shape}')
print(f'BB7 index shape: {ms_reader.bb7_index.shape}')
print(f'BB3 index shape: {ms_reader.bb3_index.shape}')
print(f'Planet index shape: {ms_reader.planet_index.shape}')
Geometry data keys: dict_keys(['mer_cal_sc_tis_20200409_20200409_1'])
Frames data keys: dict_keys(['mer_cal_sc_tis_20200409_20200409_1'])
Wavelengths data keys: dict_keys(['mer_cal_sc_tis_20200409_20200409_1'])
MERTIS TIS metadata keys: dict_keys(['mer_cal_sc_tis_20200409_20200409_1'])
Space index shape: (21,)
BB7 index shape: (0,)
BB3 index shape: (1,)
Planet index shape: (0,)
Owner
- Login: mariodamore
- Kind: user
- Repositories: 1
- Profile: https://github.com/mariodamore
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: mertisreader
message: mertis readata library
type: software
authors:
- given-names: Mario
family-names: ' D''Amore'
email: mario.damore@dlr.de
affiliation: DLR
orcid: 'https://orcid.org/0000-0001-9325-6889'
abstract: mertis data reader
commit: xxxxxx
version: 0.0.1
date-released: '2024-11-25'
GitHub Events
Total
- Push event: 2
- Create event: 2
Last Year
- Push event: 2
- Create event: 2