<jupyter_start><jupyter_text>SSJ Observation Example<jupyter_code>from LBH_to_eflux.observations.ssj import SSJDay
import datetime
import os
import numpy as np
from geospacepy.special_datetime import (doyarr2datetime,
                                        datetimearr2jd,
                                        datetime2jd,
                                        jd2datetime,
                                        datetime2doy,
                                        jdarr2datetime)

import matplotlib.pyplot as pp
from geospacepy.satplottools import draw_dialplot
from matplotlib.gridspec import GridSpec
from ssj_auroral_boundary.dmsp_spectrogram import dmsp_spectrogram
%matplotlib inline
dmsp = 16
hemisphere = 'S'
startdt = datetime.datetime(2014,2,18)
enddt = datetime.datetime(2014,2,18,2)

ssj_file = '/home/matsuo/Documents/tomokostuff/SSJcdfs_v2/20140218/dmsp-f16_ssj_precipitating-electrons-ions_20140218_v1.1.3_GLOWcond_v2.cdf'<jupyter_output><empty_output><jupyter_text>Import a day of SSJ data from DMSP F16<jupyter_code>ssj = SSJDay(16, 'N', ssj_file, read_spec = True )<jupyter_output>/home/matsuo/amgeo_dev/LBH_to_eflux/LBH_to_eflux/observations/ssj.py:123: RuntimeWarning: invalid value encountered in less_equal
  self['ele_diff_energy_flux'][self['ele_diff_energy_flux'] <= 0 | ~np.isfinite(self['ele_diff_energy_flux']) ] = np.nan
/home/matsuo/amgeo_dev/LBH_to_eflux/LBH_to_eflux/observations/ssj.py:124: RuntimeWarning: invalid value encountered in less_equal
  self['ion_diff_energy_flux'][self['ion_diff_energy_flux'] <= 0 | ~np.isfinite(self['ion_diff_energy_flux']) ] = np.nan<jupyter_text>Get the observations for the time fram efro the northern hemisphere<jupyter_code>ssj_first_pass = ssj.get_ingest_data(startdt,enddt,'S')
ssj_first_pass.keys()<jupyter_output><empty_output><jupyter_text>Plot the spectrogram<jupyter_code>f1 = pp.figure(figsize=(10,10*0.5),dpi=200)
gs = GridSpec(1,13)
a2 = f1.add_subplot(gs[0:11])
a2_cb = f1.add_subplot(gs[12])
dmsp_spectrogram(jdarr2datetime(ssj_first_pass['jds']), ssj_first_pass['ele_diff_energy_flux'],\
                 ax = a2, ax_cb = a2_cb, \
                 lat = ssj_first_pass['lats'], lt = ssj_first_pass['lons']/15)<jupyter_output>(1387,)
{'fraction_non_alphanumeric': 0.10337078651685393, 'fraction_numerical': 0.04, 'mean_word_length': 4.140877598152425, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '511733', 'license': 'MIT', 'n_tokens_mistral': 874, 'n_tokens_neox': 815, 'n_words': 117, 'path': 'notebooks/observation_tests/plot_ssj_file.ipynb', 'repo_name': 'jali7001/LBH_to_E_flux', 'size': '2225'}