content stringlengths 35 762k | sha1 stringlengths 40 40 | id int64 0 3.66M |
|---|---|---|
import time
def get_dist():
"""
Measures the distance of the obstacle from the rover.
Uses a time.sleep call to try to prevent issues with pin writing and
reading. (See official gopigo library)
Returns error strings in the cases of measurements of -1 and 0, as -1
indicates and error, and 0 seems to also indicate a failed reading.
:return: The distance of the obstacle. (cm)
:rtype: either[int, str]
"""
time.sleep(0.01)
dist = gopigo.us_dist(gopigo.USS)
if dist == -1:
return USS_ERROR
elif dist == 0 or dist == 1:
return NOTHING_FOUND
else:
return dist | a615d9938b117821d39b9acdce507f0171583c03 | 12,919 |
from typing import Callable
def map_filter(filter_function: Callable) -> Callable:
"""
returns a version of a function that automatically maps itself across all
elements of a collection
"""
def mapped_filter(arrays, *args, **kwargs):
return [filter_function(array, *args, **kwargs) for array in arrays]
return mapped_filter | a5f9f97d1a0d4acdaa39b9fb72a73b95a81553bb | 12,920 |
from typing import Literal
def compare_models(
champion_model: lightgbm.Booster,
challenger_model: lightgbm.Booster,
valid_df: pd.DataFrame,
comparison_metric: Literal["any", "all", "f1_score", "auc"] = "any"
) -> bool:
"""
A function to compare the performance of the Champion and Challenger models
on the validation dataset comparison metrics
"""
comparison_metrics_directions = {"f1-score": ModelDirection.HIGHER_BETTER,
"auc": ModelDirection.HIGHER_BETTER,
"accuracy": ModelDirection.HIGHER_BETTER}
# Prep datasets
features = valid_df.drop(['target', 'id'], axis=1, errors="ignore")
labels = np.array(valid_df['target'])
valid_dataset = lightgbm.Dataset(data=features, label=labels)
# Calculate Champion and Challenger metrics for each
champion_metrics = get_model_metrics(champion_model, valid_dataset, "Champion")
challenger_metrics = get_model_metrics(challenger_model, valid_dataset, "Challenger")
if comparison_metric not in ['any', 'all']:
logger.info(f"Champion performance for {comparison_metric}: {champion_metrics[comparison_metric]}")
logger.info(f"Challenger performance for {comparison_metric}: {challenger_metrics[comparison_metric]}")
register_model = challenger_metric_better(champ_metrics=champion_metrics,
challenger_metrics=challenger_metrics,
metric_name=comparison_metric,
direction=comparison_metrics_directions[comparison_metric])
else:
comparison_results = {metric: challenger_metric_better(champ_metrics=champion_metrics,
challenger_metrics=challenger_metrics,
metric_name=metric,
direction=comparison_metrics_directions[metric])
for metric in champion_metrics.keys()}
if comparison_metric == "any":
register_model = any(comparison_results.values())
if register_model:
positive_results = [metric for metric, result in comparison_results.items() if result]
for metric in positive_results:
logger.info(f"Challenger Model performed better for '{metric}' on validation data")
else:
logger.info("Champion model performed better for all metrics on validation data")
else:
register_model = all(comparison_results.values())
if register_model:
logger.info("Challenger model performed better on all metrics on validation data")
else:
negative_ressults = [metric for metric, result in comparison_results.items() if not result]
for metric in negative_ressults:
logger.info(f"Champion Model performed better for '{metric}' on validation data")
return register_model | 8f5f522375a4c274c3c80fcbfddad2e8cf450328 | 12,921 |
def check_additional_args(parsedArgs, op, continueWithWarning=False):
"""
Parse additional arguments (rotation, etc.) and validate
:param additionalArgs: user input list of additional parameters e.g. [rotation, 60...]
:param op: operation object (use software_loader.getOperation('operationname')
:return: dictionary containing parsed arguments e.g. {rotation: 60}
"""
# parse additional arguments (rotation, etc.)
# http://stackoverflow.com/questions/6900955/python-convert-list-to-dictionary
if op is None:
print 'Invalid Operation Name {}'.format(op)
return {}
missing = [param for param in op.mandatoryparameters.keys() if
(param not in parsedArgs or len(str(parsedArgs[param])) == 0) and
param != 'inputmaskname' and
('source' not in op.mandatoryparameters[param] or op.mandatoryparameters[param]['source'] == 'image')]
inputmasks = [param for param in op.optionalparameters.keys() if param == 'inputmaskname' and
'purpose' in parsedArgs and parsedArgs['purpose'] == 'clone']
if ('inputmaskname' in op.mandatoryparameters.keys() or 'inputmaskname' in inputmasks) and (
'inputmaskname' not in parsedArgs or parsedArgs['inputmaskname'] is None or len(parsedArgs['inputmaskname']) == 0):
missing.append('inputmaskname')
if missing:
for m in missing:
print 'Mandatory parameter ' + m + ' is missing'
if continueWithWarning is False:
sys.exit(0)
return parsedArgs | ab289271fe4a61ec77ed2b522687dd4df7cbd35c | 12,922 |
import re
def clean_text(text, language):
"""
text: a string
returns: modified initial string (deletes/modifies punctuation and symbols.)
"""
replace_by_blank_symbols = re.compile('\#|\u00bb|\u00a0|\u00d7|\u00a3|\u00eb|\u00fb|\u00fb|\u00f4|\u00c7|\u00ab|\u00a0\ude4c|\udf99|\udfc1|\ude1b|\ude22|\u200b|\u2b07|\uddd0|\ude02|\ud83d|\u2026|\u201c|\udfe2|\u2018|\ude2a|\ud83c|\u2018|\u201d|\u201c|\udc69|\udc97|\ud83e|\udd18|\udffb|\ude2d|\udc80|\ud83e|\udd2a|\ud83e|\udd26|\u200d|\u2642|\ufe0f|\u25b7|\u25c1|\ud83e|\udd26|\udffd|\u200d|\u2642|\ufe0f|\udd21|\ude12|\ud83e|\udd14|\ude03|\ude03|\ude03|\ude1c|\udd81|\ude03|\ude10|\u2728|\udf7f|\ude48|\udc4d|\udffb|\udc47|\ude11|\udd26|\udffe|\u200d|\u2642|\ufe0f|\udd37|\ude44|\udffb|\u200d|\u2640|\udd23|\u2764|\ufe0f|\udc93|\udffc|\u2800|\u275b|\u275c|\udd37|\udffd|\u200d|\u2640|\ufe0f|\u2764|\ude48|\u2728|\ude05|\udc40|\udf8a|\u203c|\u266a|\u203c|\u2744|\u2665|\u23f0|\udea2|\u26a1|\u2022|\u25e1|\uff3f|\u2665|\u270b|\u270a|\udca6|\u203c|\u270c|\u270b|\u270a|\ude14|\u263a|\udf08|\u2753|\udd28|\u20ac|\u266b|\ude35|\ude1a|\u2622|\u263a|\ude09|\udd20|\udd15|\ude08|\udd2c|\ude21|\ude2b|\ude18|\udd25|\udc83|\ude24|\udc3e|\udd95|\udc96|\ude0f|\udc46|\udc4a|\udc7b|\udca8|\udec5|\udca8|\udd94|\ude08|\udca3|\ude2b|\ude24|\ude23|\ude16|\udd8d|\ude06|\ude09|\udd2b|\ude00|\udd95|\ude0d|\udc9e|\udca9|\udf33|\udc0b|\ude21|\udde3|\ude37|\udd2c|\ude21|\ude09|\ude39|\ude42|\ude41|\udc96|\udd24|\udf4f|\ude2b|\ude4a|\udf69|\udd2e|\ude09|\ude01|\udcf7|\ude2f|\ude21|\ude28|\ude43|\udc4a|\uddfa|\uddf2|\udc4a|\ude95|\ude0d|\udf39|\udded|\uddf7|\udded|\udd2c|\udd4a|\udc48|\udc42|\udc41|\udc43|\udc4c|\udd11|\ude0f|\ude29|\ude15|\ude18|\ude01|\udd2d|\ude43|\udd1d|\ude2e|\ude29|\ude00|\ude1f|\udd71|\uddf8|\ude20|\udc4a|\udeab|\udd19|\ude29|\udd42|\udc4a|\udc96|\ude08|\ude0d|\udc43|\udff3|\udc13|\ude0f|\udc4f|\udff9|\udd1d|\udc4a|\udc95|\udcaf|\udd12|\udd95|\udd38|\ude01|\ude2c|\udc49|\ude01|\udf89|\udc36|\ude0f|\udfff|\udd29|\udc4f|\ude0a|\ude1e|\udd2d|\uff46|\uff41|\uff54|\uff45|\uffe3|\u300a|\u300b|\u2708|\u2044|\u25d5|\u273f|\udc8b|\udc8d|\udc51|\udd8b|\udd54|\udc81|\udd80|\uded1|\udd27|\udc4b|\udc8b|\udc51|\udd90|\ude0e')
replace_by_apostrophe_symbol = re.compile('\u2019')
replace_by_dash_symbol = re.compile('\u2014')
replace_by_u_symbols = re.compile('\u00fb|\u00f9')
replace_by_a_symbols = re.compile('\u00e2|\u00e0')
replace_by_c_symbols = re.compile('\u00e7')
replace_by_i_symbols = re.compile('\u00ee|\u00ef')
replace_by_o_symbols = re.compile('\u00f4')
replace_by_oe_symbols = re.compile('\u0153')
replace_by_e_symbols = re.compile('\u00e9|\u00ea|\u0117|\u00e8')
replace_by_blank_symbols_2 = re.compile('\/|\(|\)|\{|\}|\[|\]|\,|\;|\.|\!|\?|\:|&|\n')
text = replace_by_e_symbols.sub('e', text)
text = replace_by_a_symbols.sub('a', text)
text = replace_by_o_symbols.sub('o', text)
text = replace_by_oe_symbols.sub('oe', text)
text = replace_by_u_symbols.sub('e', text)
text = replace_by_i_symbols.sub('e', text)
text = replace_by_u_symbols.sub('e', text)
text = replace_by_apostrophe_symbol.sub("'", text)
text = replace_by_dash_symbol.sub("_", text)
text = replace_by_blank_symbols.sub('', text)
text = replace_by_blank_symbols_2.sub('', text)
#For English
#text = ''.join([c for c in text if ord(c) < 128])
text = text.replace("\\", "")
STOPWORDS = set(stopwords.words(language))#to be changed
text = text.lower() # lowercase text
text = ' '.join(word for word in text.split() if word not in STOPWORDS) # delete stopwors from text
return text | eaf22844fcd3528c20b34f16c276042810a672f5 | 12,923 |
def parameters():
"""
Dictionary of parameters defining geophysical acquisition systems
"""
return {
"AeroTEM (2007)": {
"type": "time",
"flag": "Zoff",
"channel_start_index": 1,
"channels": {
"[1]": 58.1e-6,
"[2]": 85.9e-6,
"[3]": 113.7e-6,
"[4]": 141.4e-6,
"[5]": 169.2e-6,
"[6]": 197.0e-6,
"[7]": 238.7e-6,
"[8]": 294.2e-6,
"[9]": 349.8e-6,
"[10]": 405.3e-6,
"[11]": 474.8e-6,
"[12]": 558.1e-6,
"[13]": 655.3e-6,
"[14]": 794.2e-6,
"[15]": 988.7e-6,
"[16]": 1280.3e-6,
"[17]": 1738.7e-6,
},
"uncertainty": [
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
],
"waveform": [
[-1.10e-03, 1e-8],
[-8.2500e-04, 5.0e-01],
[-5.50e-04, 1.0e00],
[-2.7500e-04, 5.0e-01],
[0.0e00, 0.0e00],
[2.50e-05, 0.0e00],
[5.0e-05, 0.0e00],
[7.50e-05, 0.0e00],
[1.0e-04, 0.0e00],
[1.2500e-04, 0.0e00],
[1.50e-04, 0.0e00],
[1.7500e-04, 0.0e00],
[2.0e-04, 0.0e00],
[2.2500e-04, 0.0e00],
[2.50e-04, 0.0e00],
[3.0550e-04, 0.0e00],
[3.6100e-04, 0.0e00],
[4.1650e-04, 0.0e00],
[4.7200e-04, 0.0e00],
[5.2750e-04, 0.0e00],
[6.0750e-04, 0.0e00],
[6.8750e-04, 0.0e00],
[7.6750e-04, 0.0e00],
[8.4750e-04, 0.0e00],
[9.2750e-04, 0.0e00],
[1.1275e-03, 0.0e00],
[1.3275e-03, 0.0e00],
[1.5275e-03, 0.0e00],
[1.7275e-03, 0.0e00],
[1.9275e-03, 0.0e00],
[2.1275e-03, 0.0e00],
],
"tx_offsets": [[0, 0, 0]],
"bird_offset": [0, 0, -40],
"comment": "normalization accounts for 2.5m radius loop * 8 turns * 69 A current, nanoTesla",
"normalization": [2.9e-4, 1e-9],
"tx_specs": {"type": "CircularLoop", "a": 1.0, "I": 1.0},
"data_type": "dBzdt",
},
"AeroTEM (2010)": {
"type": "time",
"flag": "Zoff",
"channel_start_index": 1,
"channels": {
"[1]": 67.8e-6,
"[2]": 95.6e-6,
"[3]": 123.4e-6,
"[4]": 151.2e-6,
"[5]": 178.9e-6,
"[6]": 206.7e-6,
"[7]": 262.3e-6,
"[8]": 345.6e-6,
"[9]": 428.9e-6,
"[10]": 512.3e-6,
"[11]": 623.4e-6,
"[12]": 762.3e-6,
"[13]": 928.9e-6,
"[14]": 1165.0e-6,
"[15]": 1526.2e-6,
"[16]": 2081.7e-6,
"[17]": 2942.8e-6,
},
"uncertainty": [
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
[0.05, 5e-0],
],
"waveform": [
[-1.10e-03, 1e-8],
[-8.2500e-04, 5.0e-01],
[-5.50e-04, 1.0e00],
[-2.7500e-04, 5.0e-01],
[0.0e00, 0.0e00],
[2.50e-05, 0.0e00],
[5.0e-05, 0.0e00],
[7.50e-05, 0.0e00],
[1.0e-04, 0.0e00],
[1.2500e-04, 0.0e00],
[1.50e-04, 0.0e00],
[1.7500e-04, 0.0e00],
[2.0e-04, 0.0e00],
[2.2500e-04, 0.0e00],
[2.50e-04, 0.0e00],
[3.0550e-04, 0.0e00],
[3.6100e-04, 0.0e00],
[4.1650e-04, 0.0e00],
[4.7200e-04, 0.0e00],
[5.2750e-04, 0.0e00],
[6.0750e-04, 0.0e00],
[6.8750e-04, 0.0e00],
[7.6750e-04, 0.0e00],
[8.4750e-04, 0.0e00],
[9.2750e-04, 0.0e00],
[1.1275e-03, 0.0e00],
[1.3275e-03, 0.0e00],
[1.5275e-03, 0.0e00],
[1.7275e-03, 0.0e00],
[1.9275e-03, 0.0e00],
[2.1275e-03, 0.0e00],
[2.3275e-03, 0.0e00],
[2.5275e-03, 0.0e00],
[2.7275e-03, 0.0e00],
[2.9275e-03, 0.0e00],
[3.1275e-03, 0.0e00],
],
"tx_offsets": [[0, 0, 0]],
"bird_offset": [0, 0, -40],
"comment": "normalization accounts for 2.5m radius loop, 8 turns * 69 A current, nanoTesla",
"normalization": [2.9e-4, 1e-9],
"tx_specs": {"type": "CircularLoop", "a": 1.0, "I": 1.0},
"data_type": "dBzdt",
},
"DIGHEM": {
"type": "frequency",
"flag": "CPI900",
"channel_start_index": 0,
"channels": {
"CPI900": 900,
"CPI7200": 7200,
"CPI56K": 56000,
"CPQ900": 900,
"CPQ7200": 7200,
"CPQ56K": 56000,
},
"components": {
"CPI900": "real",
"CPQ900": "imag",
"CPI7200": "real",
"CPQ7200": "imag",
"CPI56K": "real",
"CPQ56K": "imag",
},
"tx_offsets": [
[8, 0, 0],
[8, 0, 0],
[6.3, 0, 0],
[8, 0, 0],
[8, 0, 0],
[6.3, 0, 0],
],
"bird_offset": [0, 0, 0],
"uncertainty": [
[0.0, 2],
[0.0, 5],
[0.0, 10],
[0.0, 2],
[0.0, 5],
[0.0, 10],
],
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"normalization": "ppm",
},
"GENESIS (2014)": {
"type": "time",
"flag": "emz_step_final",
"channel_start_index": 1,
"channels": {
"0": 9e-6,
"1": 26e-6,
"2": 52.0e-6,
"3": 95e-6,
"4": 156e-6,
"5": 243e-6,
"6": 365e-6,
"7": 547e-6,
"8": 833e-6,
"9": 1259e-6,
"10": 1858e-6,
},
"uncertainty": [
[0.05, 100],
[0.05, 100],
[0.05, 100],
[0.05, 100],
[0.05, 100],
[0.05, 100],
[0.05, 2000],
[0.05, 100],
[0.05, 100],
[0.05, 100],
[0.05, 100],
],
"waveform": "stepoff",
"tx_offsets": [[-90, 0, -43]],
"bird_offset": [-90, 0, -43],
"comment": "normalization accounts for unit dipole moment at the tx_offset, in part-per-million",
"normalization": "ppm",
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"data_type": "Bz",
},
"GEOTEM 75 Hz - 2082 Pulse": {
"type": "time",
"flag": "EM_chan",
"channel_start_index": 5,
"channels": {
"1": -1953e-6,
"2": -1562e-6,
"3": -989e-6,
"4": -416e-6,
"5": 163e-6,
"6": 235e-6,
"7": 365e-6,
"8": 521e-6,
"9": 703e-6,
"10": 912e-6,
"11": 1146e-6,
"12": 1407e-6,
"13": 1693e-6,
"14": 2005e-6,
"15": 2344e-6,
"16": 2709e-6,
"17": 3073e-6,
"18": 3464e-6,
"19": 3880e-6,
"20": 4297e-6,
},
"uncertainty": [
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
[0.05, 40.0],
],
"waveform": [
[-2.08000000e-03, 1.22464680e-16],
[-1.83000000e-03, 3.68686212e-01],
[-1.58000000e-03, 6.85427422e-01],
[-1.33000000e-03, 9.05597273e-01],
[-1.08000000e-03, 9.98175554e-01],
[-8.30000000e-04, 9.50118712e-01],
[-5.80000000e-04, 7.68197578e-01],
[-3.30000000e-04, 4.78043417e-01],
[-8.00000000e-05, 1.20536680e-01],
[0.00000000e00, 0.00000000e00],
[1.00000000e-04, 0.00000000e00],
[2.00000000e-04, 0.00000000e00],
[3.00000000e-04, 0.00000000e00],
[4.00000000e-04, 0.00000000e00],
[5.00000000e-04, 0.00000000e00],
[6.00000000e-04, 0.00000000e00],
[7.00000000e-04, 0.00000000e00],
[8.00000000e-04, 0.00000000e00],
[9.00000000e-04, 0.00000000e00],
[1.00000000e-03, 0.00000000e00],
[1.10000000e-03, 0.00000000e00],
[1.20000000e-03, 0.00000000e00],
[1.30000000e-03, 0.00000000e00],
[1.40000000e-03, 0.00000000e00],
[1.50000000e-03, 0.00000000e00],
[1.60000000e-03, 0.00000000e00],
[1.70000000e-03, 0.00000000e00],
[1.80000000e-03, 0.00000000e00],
[1.90000000e-03, 0.00000000e00],
[2.00000000e-03, 0.00000000e00],
[2.10000000e-03, 0.00000000e00],
[2.20000000e-03, 0.00000000e00],
[2.30000000e-03, 0.00000000e00],
[2.40000000e-03, 0.00000000e00],
[2.50000000e-03, 0.00000000e00],
[2.60000000e-03, 0.00000000e00],
[2.70000000e-03, 0.00000000e00],
[2.80000000e-03, 0.00000000e00],
[2.90000000e-03, 0.00000000e00],
[3.00000000e-03, 0.00000000e00],
[3.10000000e-03, 0.00000000e00],
[3.20000000e-03, 0.00000000e00],
[3.30000000e-03, 0.00000000e00],
[3.40000000e-03, 0.00000000e00],
[3.50000000e-03, 0.00000000e00],
[3.60000000e-03, 0.00000000e00],
[3.70000000e-03, 0.00000000e00],
[3.80000000e-03, 0.00000000e00],
[3.90000000e-03, 0.00000000e00],
[4.00000000e-03, 0.00000000e00],
[4.10000000e-03, 0.00000000e00],
[4.20000000e-03, 0.00000000e00],
[4.30000000e-03, 0.00000000e00],
[4.40000000e-03, 0.00000000e00],
],
"tx_offsets": [[-123, 0, -56]],
"bird_offset": [-123, 0, -56],
"comment": "normalization accounts for unit dipole moment at the tx_offset, in part-per-million",
"normalization": "ppm",
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"data_type": "Bz",
},
"HELITEM (35C)": {
"type": "time",
"flag": "emz_db",
"channel_start_index": 5,
"channels": {
"[1]": -0.007772,
"[2]": -0.003654,
"[3]": -0.002678,
"[4]": -0.000122,
"[5]": 0.000228,
"[6]": 0.000269,
"[7]": 0.000326,
"[8]": 0.000399,
"[9]": 0.000488,
"[10]": 0.000594,
"[11]": 0.000716,
"[12]": 0.000854,
"[13]": 0.001009,
"[14]": 0.001196,
"[15]": 0.001424,
"[16]": 0.001693,
"[17]": 0.002018,
"[18]": 0.002417,
"[19]": 0.002905,
"[20]": 0.003499,
"[21]": 0.004215,
"[22]": 0.005078,
"[23]": 0.006128,
"[24]": 0.007406,
"[25]": 0.008952,
"[26]": 0.010824,
"[27]": 0.013094,
"[28]": 0.015845,
"[29]": 0.019173,
"[30]": 0.02321,
},
"uncertainty": [
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
[0.05, 2e-1],
],
"waveform": [
[-8.000e-03, 1.000e-03],
[-7.750e-03, 9.802e-02],
[-7.500e-03, 1.950e-01],
[-7.250e-03, 2.902e-01],
[-7.000e-03, 3.826e-01],
[-6.750e-03, 4.713e-01],
[-6.500e-03, 5.555e-01],
[-6.250e-03, 6.344e-01],
[-6.000e-03, 7.071e-01],
[-5.750e-03, 7.730e-01],
[-5.500e-03, 8.315e-01],
[-5.250e-03, 8.820e-01],
[-5.000e-03, 9.239e-01],
[-4.750e-03, 9.569e-01],
[-4.500e-03, 9.808e-01],
[-4.250e-03, 9.951e-01],
[-4.000e-03, 1.000e00],
[-3.750e-03, 9.951e-01],
[-3.500e-03, 9.808e-01],
[-3.250e-03, 9.569e-01],
[-3.000e-03, 9.239e-01],
[-2.750e-03, 8.820e-01],
[-2.500e-03, 8.315e-01],
[-2.250e-03, 7.730e-01],
[-2.000e-03, 7.071e-01],
[-1.750e-03, 6.344e-01],
[-1.500e-03, 5.555e-01],
[-1.250e-03, 4.713e-01],
[-1.000e-03, 3.826e-01],
[-7.500e-04, 2.902e-01],
[-5.000e-04, 1.950e-01],
[-2.500e-04, 9.802e-02],
[0.000e00, 0.000e00],
[5.000e-05, 0.000e00],
[1.000e-04, 0.000e00],
[1.500e-04, 0.000e00],
[2.000e-04, 0.000e00],
[2.500e-04, 0.000e00],
[3.000e-04, 0.000e00],
[3.500e-04, 0.000e00],
[4.000e-04, 0.000e00],
[4.500e-04, 0.000e00],
[5.000e-04, 0.000e00],
[5.500e-04, 0.000e00],
[6.000e-04, 0.000e00],
[6.500e-04, 0.000e00],
[7.000e-04, 0.000e00],
[7.500e-04, 0.000e00],
[8.000e-04, 0.000e00],
[8.500e-04, 0.000e00],
[9.000e-04, 0.000e00],
[9.500e-04, 0.000e00],
[1.000e-03, 0.000e00],
[1.050e-03, 0.000e00],
[1.100e-03, 0.000e00],
[1.150e-03, 0.000e00],
[1.200e-03, 0.000e00],
[1.225e-03, 0.000e00],
[1.475e-03, 0.000e00],
[1.725e-03, 0.000e00],
[1.975e-03, 0.000e00],
[2.225e-03, 0.000e00],
[2.475e-03, 0.000e00],
[2.725e-03, 0.000e00],
[2.975e-03, 0.000e00],
[3.225e-03, 0.000e00],
[3.475e-03, 0.000e00],
[3.725e-03, 0.000e00],
[3.975e-03, 0.000e00],
[4.225e-03, 0.000e00],
[4.475e-03, 0.000e00],
[4.725e-03, 0.000e00],
[4.975e-03, 0.000e00],
[5.225e-03, 0.000e00],
[5.475e-03, 0.000e00],
[5.725e-03, 0.000e00],
[5.975e-03, 0.000e00],
[6.225e-03, 0.000e00],
[6.475e-03, 0.000e00],
[6.725e-03, 0.000e00],
[6.975e-03, 0.000e00],
[7.225e-03, 0.000e00],
[7.475e-03, 0.000e00],
[7.725e-03, 0.000e00],
[7.975e-03, 0.000e00],
[8.225e-03, 0.000e00],
[8.475e-03, 0.000e00],
[8.500e-03, 0.000e00],
[9.250e-03, 0.000e00],
[1.000e-02, 0.000e00],
[1.075e-02, 0.000e00],
[1.150e-02, 0.000e00],
[1.225e-02, 0.000e00],
[1.300e-02, 0.000e00],
[1.375e-02, 0.000e00],
[1.450e-02, 0.000e00],
[1.525e-02, 0.000e00],
[1.600e-02, 0.000e00],
[1.675e-02, 0.000e00],
[1.750e-02, 0.000e00],
[1.825e-02, 0.000e00],
[1.900e-02, 0.000e00],
[1.975e-02, 0.000e00],
[2.050e-02, 0.000e00],
[2.125e-02, 0.000e00],
[2.200e-02, 0.000e00],
[2.275e-02, 0.000e00],
[2.350e-02, 0.000e00],
[2.425e-02, 0.000e00],
],
"tx_offsets": [[12.5, 0, 26.8]],
"bird_offset": [12.5, 0, 26.8],
"comment": "normalization accounts for a loop 961 m**2 area * 4 turns * 363 A current, nanoTesla",
"normalization": [7.167e-7, 1e-9],
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"data_type": "dBzdt",
},
"Hummingbird": {
"type": "frequency",
"flag": "CPI880",
"channel_start_index": 0,
"channels": {
"CPI880": 880,
"CPI6600": 6600,
"CPI34K": 34000,
"CPQ880": 880,
"CPQ6600": 6600,
"CPQ34K": 34000,
},
"components": {
"CPI880": "real",
"CPQ880": "imag",
"CPI6600": "real",
"CPQ6600": "imag",
"CPI34K": "real",
"CPQ34K": "imag",
},
"tx_offsets": [
[6.025, 0, 0],
[6.2, 0, 0],
[4.87, 0, 0],
[6.025, 0, 0],
[6.2, 0, 0],
[4.87, 0, 0],
],
"bird_offset": [0, 0, 0],
"uncertainty": [
[0.0, 2],
[0.0, 5],
[0.0, 10],
[0.0, 2],
[0.0, 5],
[0.0, 10],
],
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"normalization": "ppm",
},
"QUESTEM (1996)": {
"type": "time",
"flag": "EMX",
"channel_start_index": 3,
"channels": {
"[1]": 90.3e-6,
"[2]": 142.4e-6,
"[3]": 0.2466e-3,
"[4]": 0.3507e-3,
"[5]": 0.4549e-3,
"[6]": 0.5590e-3,
"[7]": 0.6632e-3,
"[8]": 0.8194e-3,
"[9]": 1.0278e-3,
"[10]": 1.2361e-3,
"[11]": 1.4965e-3,
"[12]": 1.7048e-3,
"[13]": 1.9652e-3,
"[14]": 2.2777e-3,
"[15]": 2.7464e-3,
"[16]": 3.2672e-3,
"[17]": 3.7880e-3,
"[18]": 4.2046e-3,
},
"uncertainty": [
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
[0.05, 50],
],
"waveform": [
[-2.00e-03, 1e-4],
[-1.95e-03, 7.80e-02],
[-1.90e-03, 1.56e-01],
[-1.85e-03, 2.33e-01],
[-1.80e-03, 3.09e-01],
[-1.75e-03, 3.83e-01],
[-1.70e-03, 4.54e-01],
[-1.65e-03, 5.22e-01],
[-1.60e-03, 5.88e-01],
[-1.55e-03, 6.49e-01],
[-1.50e-03, 7.07e-01],
[-1.45e-03, 7.60e-01],
[-1.40e-03, 8.09e-01],
[-1.35e-03, 8.53e-01],
[-1.30e-03, 8.91e-01],
[-1.25e-03, 9.24e-01],
[-1.20e-03, 9.51e-01],
[-1.15e-03, 9.72e-01],
[-1.10e-03, 9.88e-01],
[-1.05e-03, 9.97e-01],
[-1.00e-03, 1.00e00],
[-9.50e-04, 9.97e-01],
[-9.00e-04, 9.88e-01],
[-8.50e-04, 9.72e-01],
[-8.00e-04, 9.51e-01],
[-7.50e-04, 9.24e-01],
[-7.00e-04, 8.91e-01],
[-6.50e-04, 8.53e-01],
[-6.00e-04, 8.09e-01],
[-5.50e-04, 7.60e-01],
[-5.00e-04, 7.07e-01],
[-4.50e-04, 6.49e-01],
[-4.00e-04, 5.88e-01],
[-3.50e-04, 5.22e-01],
[-3.00e-04, 4.54e-01],
[-2.50e-04, 3.83e-01],
[-2.00e-04, 3.09e-01],
[-1.50e-04, 2.33e-01],
[-1.00e-04, 1.56e-01],
[-5.00e-05, 7.80e-02],
[0.00e00, 0.00e00],
[1.50e-04, 0.00e00],
[3.00e-04, 0.00e00],
[4.50e-04, 0.00e00],
[6.00e-04, 0.00e00],
[7.50e-04, 0.00e00],
[9.00e-04, 0.00e00],
[1.05e-03, 0.00e00],
[1.20e-03, 0.00e00],
[1.35e-03, 0.00e00],
[1.50e-03, 0.00e00],
[1.65e-03, 0.00e00],
[1.80e-03, 0.00e00],
[1.95e-03, 0.00e00],
[2.10e-03, 0.00e00],
[2.25e-03, 0.00e00],
[2.40e-03, 0.00e00],
[2.55e-03, 0.00e00],
[2.70e-03, 0.00e00],
[2.85e-03, 0.00e00],
[3.00e-03, 0.00e00],
[3.15e-03, 0.00e00],
[3.30e-03, 0.00e00],
[3.45e-03, 0.00e00],
[3.60e-03, 0.00e00],
[3.75e-03, 0.00e00],
[3.90e-03, 0.00e00],
[4.05e-03, 0.00e00],
[4.20e-03, 0.00e00],
[4.35e-03, 0.00e00],
],
"tx_offsets": [[127, 0, -75]],
"bird_offset": [127, 0, -75],
"comment": "normalization accounts for unit dipole moment at the tx_offset, in part-per-million",
"normalization": "ppm",
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"data_type": "Bz",
},
"Resolve": {
"type": "frequency",
"flag": "CPI400",
"channel_start_index": 0,
"channels": {
"CPI400": 385,
"CPI1800": 1790,
"CPI8200": 8208,
"CPI40K": 39840,
"CPI140K": 132660,
"CPQ400": 385,
"CPQ1800": 1790,
"CPQ8200": 8208,
"CPQ40K": 39840,
"CPQ140K": 132660,
},
"components": {
"CPI400": "real",
"CPQ400": "imag",
"CPI1800": "real",
"CPQ1800": "imag",
"CPI8200": "real",
"CPQ8200": "imag",
"CPI40K": "real",
"CPQ40K": "imag",
"CPI140K": "real",
"CPQ140K": "imag",
},
"tx_offsets": [
[7.86, 0, 0],
[7.86, 0, 0],
[7.86, 0, 0],
[7.86, 0, 0],
[7.86, 0, 0],
[7.86, 0, 0],
[7.86, 0, 0],
[7.86, 0, 0],
[7.86, 0, 0],
[7.86, 0, 0],
],
"bird_offset": [0, 0, 0],
"uncertainty": [
[0.0, 7.5],
[0.0, 25],
[0.0, 125],
[0.0, 350],
[0.0, 800],
[0.0, 15],
[0.0, 50],
[0.0, 200],
[0.0, 475],
[0.0, 350],
],
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"normalization": "ppm",
},
"SandersGFEM": {
"type": "frequency",
"flag": "P9",
"channel_start_index": 1,
"channels": {
"P912": 912,
"P3005": 3005,
"P11962": 11962,
"P24510": 24510,
"Q912": 912,
"Q3005": 3005,
"Q11962": 11962,
"Q24510": 24510,
},
"components": {
"P912": "real",
"P3005": "real",
"P11962": "real",
"P24510": "real",
"Q912": "imag",
"Q3005": "imag",
"Q11962": "imag",
"Q24510": "imag",
},
"tx_offsets": [
[21.35, 0, 0],
[21.35, 0, 0],
[21.38, 0, 0],
[21.38, 0, 0],
[21.35, 0, 0],
[21.35, 0, 0],
[21.38, 0, 0],
[21.38, 0, 0],
],
"bird_offset": [0, 0, 0],
"uncertainty": [
[0.0, 75],
[0.0, 150],
[0.0, 500],
[0.0, 800],
[0.0, 125],
[0.0, 300],
[0.0, 500],
[0.0, 500],
],
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"normalization": "ppm",
},
"Skytem 304M (HM)": {
"type": "time",
"flag": "HM",
"channel_start_index": 8,
"channels": {
"[1]": 0.43e-6,
"[2]": 1.43e-6,
"[3]": 3.43e-6,
"[4]": 5.43e-6,
"[5]": 7.43e-6,
"[6]": 9.43e-6,
"[7]": 11.43e-6,
"[8]": 13.43e-6,
"[9]": 16.43e-6,
"[10]": 20.43e-6,
"[11]": 25.43e-6,
"[12]": 31.43e-6,
"[13]": 39.43e-6,
"[14]": 49.43e-6,
"[15]": 62.43e-6,
"[16]": 78.43e-6,
"[17]": 98.43e-6,
"[18]": 123.43e-6,
"[19]": 154.43e-6,
"[20]": 194.43e-6,
"[21]": 245.43e-6,
"[22]": 308.43e-6,
"[23]": 389.43e-6,
"[24]": 490.43e-6,
"[25]": 617.43e-6,
"[26]": 778.43e-6,
"[27]": 980.43e-6,
"[28]": 1235.43e-6,
"[29]": 1557.43e-6,
"[30]": 1963.43e-6,
"[31]": 2474.43e-6,
"[32]": 3120.43e-6,
"[33]": 3912.43e-6,
"[34]": 4880.43e-6,
"[35]": 6065.43e-6,
"[36]": 7517.43e-6,
"[37]": 9293.43e-6,
"[38]": 11473.43e-6,
},
"uncertainty": [
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
],
"waveform": [
[-4.895e-03, 1.000e-05],
[-4.640e-03, 9.24906690e-01],
[-4.385e-03, 9.32202966e-01],
[-4.130e-03, 9.39232247e-01],
[-3.875e-03, 9.46198635e-01],
[-3.620e-03, 9.53165023e-01],
[-3.365e-03, 9.60131411e-01],
[-3.110e-03, 9.67097799e-01],
[-2.855e-03, 9.72342365e-01],
[-2.600e-03, 9.76662739e-01],
[-2.345e-03, 9.80880874e-01],
[-2.090e-03, 9.84342079e-01],
[-1.835e-03, 9.87803283e-01],
[-1.580e-03, 9.91264488e-01],
[-1.325e-03, 9.94371859e-01],
[-1.070e-03, 9.97464146e-01],
[-8.150e-04, 1.000e00],
[-5.600e-04, 1.000e00],
[-3.050e-04, 1.000e00],
[-5.000e-05, 1.000e00],
[-4.500e-05, 1.000e00],
[-4.000e-05, 9.57188199e-01],
[-3.500e-05, 8.40405552e-01],
[-3.000e-05, 7.19785772e-01],
[-2.500e-05, 5.99026151e-01],
[-2.000e-05, 4.77564967e-01],
[-1.500e-05, 3.56103783e-01],
[-1.000e-05, 2.34673120e-01],
[-5.000e-06, 1.13453783e-01],
[0.0, 0.0],
[5.000e-06, 0.0],
[1.000e-05, 0.0],
[1.500e-05, 0.0],
[2.000e-05, 0.0],
[2.500e-05, 0.0],
[3.000e-05, 0.0],
[3.500e-05, 0.0],
[4.000e-05, 0.0],
[4.500e-05, 0.0],
[5.000e-05, 0.0],
[5.500e-05, 0.0],
[6.000e-05, 0.0],
[6.500e-05, 0.0],
[7.000e-05, 0.0],
[7.500e-05, 0.0],
[8.000e-05, 0.0],
[8.500e-05, 0.0],
[9.000e-05, 0.0],
[9.500e-05, 0.0],
[1.000e-04, 0.0],
[1.050e-04, 0.0],
[1.100e-04, 0.0],
[1.150e-04, 0.0],
[1.200e-04, 0.0],
[1.250e-04, 0.0],
[1.750e-04, 0.0],
[2.250e-04, 0.0],
[2.750e-04, 0.0],
[3.250e-04, 0.0],
[3.750e-04, 0.0],
[4.250e-04, 0.0],
[4.750e-04, 0.0],
[5.250e-04, 0.0],
[5.750e-04, 0.0],
[6.250e-04, 0.0],
[6.750e-04, 0.0],
[7.250e-04, 0.0],
[7.750e-04, 0.0],
[8.250e-04, 0.0],
[8.750e-04, 0.0],
[9.250e-04, 0.0],
[9.750e-04, 0.0],
[1.025e-03, 0.0],
[1.075e-03, 0.0],
[1.125e-03, 0.0],
[1.175e-03, 0.0],
[1.225e-03, 0.0],
[1.275e-03, 0.0],
[1.325e-03, 0.0],
[1.375e-03, 0.0],
[1.425e-03, 0.0],
[1.475e-03, 0.0],
[1.775e-03, 0.0],
[2.075e-03, 0.0],
[2.375e-03, 0.0],
[2.675e-03, 0.0],
[2.975e-03, 0.0],
[3.275e-03, 0.0],
[3.575e-03, 0.0],
[3.875e-03, 0.0],
[4.175e-03, 0.0],
[4.475e-03, 0.0],
[4.775e-03, 0.0],
[5.075e-03, 0.0],
[5.375e-03, 0.0],
[5.675e-03, 0.0],
[5.975e-03, 0.0],
[6.275e-03, 0.0],
[6.575e-03, 0.0],
[6.875e-03, 0.0],
[7.175e-03, 0.0],
[7.475e-03, 0.0],
[7.775e-03, 0.0],
[8.075e-03, 0.0],
[8.375e-03, 0.0],
[8.675e-03, 0.0],
[8.975e-03, 0.0],
[9.275e-03, 0.0],
[9.575e-03, 0.0],
[9.875e-03, 0.0],
[1.0175e-02, 0.0],
[1.0475e-02, 0.0],
[1.0775e-02, 0.0],
[1.1075e-02, 0.0],
[1.1375e-02, 0.0],
[1.1675e-02, 0.0],
[1.1975e-02, 0.0],
],
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"tx_offsets": [[-13.25, 0, 2.0]],
"bird_offset": [-13.25, 0, 2.0],
"normalization": [1e-12],
"data_type": "dBzdt",
},
"Skytem 306HP (LM)": {
"type": "time",
"flag": "LM",
"channel_start_index": 16,
"channels": {
"[1]": 0.3e-6,
"[2]": 1.0e-6,
"[3]": 1.7e-6,
"[4]": 2.4e-6,
"[5]": 3.2e-6,
"[6]": 4.0e-6,
"[7]": 4.8e-6,
"[8]": 5.7e-6,
"[9]": 6.6e-6,
"[10]": 7.6e-6,
"[11]": 8.7e-6,
"[12]": 9.8e-6,
"[13]": 1.11e-5,
"[14]": 1.25e-5,
"[15]": 1.4e-5,
"[16]": 1.57e-5,
"[17]": 1.75e-5,
"[18]": 1.94e-5,
"[19]": 2.16e-5,
"[20]": 2.40e-5,
"[21]": 2.66e-5,
"[22]": 2.95e-5,
"[23]": 3.27e-5,
"[24]": 3.63e-5,
"[25]": 4.02e-5,
"[26]": 4.45e-5,
"[27]": 4.93e-5,
"[28]": 5.45e-5,
"[29]": 6.03e-5,
"[30]": 6.67e-5,
"[31]": 7.37e-5,
"[32]": 8.15e-5,
"[33]": 9.01e-5,
"[34]": 9.96e-5,
"[35]": 1.10e-4,
"[36]": 1.22e-4,
"[37]": 1.35e-4,
"[38]": 1.49e-4,
"[39]": 1.65e-4,
"[40]": 1.82e-4,
"[41]": 2.01e-4,
"[42]": 2.22e-4,
"[43]": 2.46e-5,
"[44]": 2.71e-4,
"[45]": 3.00e-4,
"[46]": 3.32e-4,
"[47]": 3.66e-4,
"[48]": 4.05e-4,
"[49]": 4.48e-4,
"[50]": 4.92e-4,
},
"uncertainty": [
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
],
"waveform": [
[-9.68000000e-04, 1e-4],
[-9.18000000e-04, 0.67193831],
[-8.68000000e-04, 0.83631068],
[-8.18000000e-04, 0.91287783],
[-7.68000000e-04, 0.95157844],
[-7.18000000e-04, 0.97608318],
[-6.68000000e-04, 0.98498653],
[-6.18000000e-04, 0.99388987],
[-5.68000000e-04, 0.99553716],
[-5.18000000e-04, 0.99593248],
[-4.68000000e-04, 0.99632781],
[-4.18000000e-04, 0.99672314],
[-3.68000000e-04, 0.99711847],
[-3.18000000e-04, 0.9975138],
[-2.68000000e-04, 0.99790913],
[-2.18000000e-04, 0.99830446],
[-1.68000000e-04, 0.99869978],
[-1.18000000e-04, 0.99909511],
[-6.80000000e-05, 0.99949044],
[-1.80000000e-05, 0.99988577],
[-1.60000000e-05, 0.99990158],
[-1.40000000e-05, 0.9999174],
[-1.20000000e-05, 0.99993321],
[-1.00000000e-05, 0.99994902],
[-8.00000000e-06, 0.99996484],
[-6.00000000e-06, 0.99998065],
[-4.00000000e-06, 0.99999646],
[-2.00000000e-06, 0.51096262],
[0.00000000e00, 0.00000000e00],
[2.00000000e-06, 0.00000000e00],
[1.20000000e-05, 0.00000000e00],
[2.20000000e-05, 0.00000000e00],
[3.20000000e-05, 0.00000000e00],
[4.20000000e-05, 0.00000000e00],
[5.20000000e-05, 0.00000000e00],
[6.20000000e-05, 0.00000000e00],
[7.20000000e-05, 0.00000000e00],
[8.20000000e-05, 0.00000000e00],
[9.20000000e-05, 0.00000000e00],
[1.02000000e-04, 0.00000000e00],
[1.12000000e-04, 0.00000000e00],
[1.22000000e-04, 0.00000000e00],
[1.32000000e-04, 0.00000000e00],
[1.42000000e-04, 0.00000000e00],
[1.52000000e-04, 0.00000000e00],
[1.62000000e-04, 0.00000000e00],
[1.72000000e-04, 0.00000000e00],
[1.82000000e-04, 0.00000000e00],
[1.92000000e-04, 0.00000000e00],
[2.02000000e-04, 0.00000000e00],
[2.52000000e-04, 0.00000000e00],
[3.02000000e-04, 0.00000000e00],
[3.52000000e-04, 0.00000000e00],
[4.02000000e-04, 0.00000000e00],
[4.52000000e-04, 0.00000000e00],
[5.02000000e-04, 0.00000000e00],
[5.52000000e-04, 0.00000000e00],
[6.02000000e-04, 0.00000000e00],
[6.52000000e-04, 0.00000000e00],
[7.02000000e-04, 0.00000000e00],
[7.52000000e-04, 0.00000000e00],
[8.02000000e-04, 0.00000000e00],
[8.52000000e-04, 0.00000000e00],
[9.02000000e-04, 0.00000000e00],
[9.52000000e-04, 0.00000000e00],
[1.00200000e-03, 0.00000000e00],
[1.05200000e-03, 0.00000000e00],
[1.10200000e-03, 0.00000000e00],
[1.15200000e-03, 0.00000000e00],
[1.20200000e-03, 0.00000000e00],
[1.25200000e-03, 0.00000000e00],
[1.30200000e-03, 0.00000000e00],
[1.35200000e-03, 0.00000000e00],
[1.40200000e-03, 0.00000000e00],
[1.45200000e-03, 0.00000000e00],
[1.50200000e-03, 0.00000000e00],
[1.55200000e-03, 0.00000000e00],
[1.60200000e-03, 0.00000000e00],
[1.65200000e-03, 0.00000000e00],
[1.70200000e-03, 0.00000000e00],
[1.75200000e-03, 0.00000000e00],
[1.80200000e-03, 0.00000000e00],
[1.85200000e-03, 0.00000000e00],
[1.90200000e-03, 0.00000000e00],
[1.95200000e-03, 0.00000000e00],
],
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"tx_offsets": [[-13.25, 0, 2.0]],
"bird_offset": [-13.25, 0, 2.0],
"normalization": [1e-12],
"data_type": "dBzdt",
},
"Skytem 306M HP (HM)": {
"type": "time",
"flag": "HM",
"channel_start_index": 15,
"channels": {
"[1]": 7.0e-7,
"[2]": 2.1e-5,
"[3]": 3.6e-5,
"[4]": 5.3e-5,
"[5]": 7.2e-5,
"[6]": 9.3e-5,
"[7]": 1.18e-5,
"[8]": 1.49e-5,
"[9]": 1.85e-5,
"[10]": 2.28e-5,
"[11]": 2.81e-5,
"[12]": 3.46e-5,
"[13]": 4.25e-5,
"[14]": 5.2e-5,
"[15]": 6.36e-5,
"[16]": 7.78e-5,
"[17]": 9.51e-5,
"[18]": 1.16e-4,
"[19]": 1.42e-4,
"[20]": 1.74e-4,
"[21]": 2.12e-4,
"[22]": 2.59e-4,
"[23]": 3.17e-4,
"[24]": 3.87e-4,
"[25]": 4.72e-4,
"[26]": 5.77e-4,
"[27]": 7.05e-4,
"[28]": 8.61e-4,
"[29]": 1.05e-3,
"[30]": 1.28e-3,
"[31]": 1.57e-3,
"[32]": 1.92e-3,
"[33]": 2.34e-3,
"[34]": 2.86e-3,
"[35]": 3.49e-3,
"[36]": 4.26e-3,
"[37]": 5.21e-3,
"[38]": 6.36e-3,
"[39]": 7.77e-3,
"[40]": 9.49e-3,
"[41]": 1.11e-2,
},
"uncertainty": [
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
],
"waveform": [
[-4.895e-03, 0.93336193],
[-4.640e-03, 0.93950274],
[-4.385e-03, 0.94564356],
[-4.130e-03, 0.95178438],
[-3.875e-03, 0.95792519],
[-3.620e-03, 0.96406601],
[-3.365e-03, 0.97020682],
[-3.110e-03, 0.97634764],
[-2.855e-03, 0.98248846],
[-2.600e-03, 0.98862927],
[-2.345e-03, 0.9908726],
[-2.090e-03, 0.99199595],
[-1.835e-03, 0.9931193],
[-1.580e-03, 0.99424264],
[-1.325e-03, 0.99536599],
[-1.070e-03, 0.99648934],
[-8.150e-04, 0.99761269],
[-5.600e-04, 0.99873604],
[-3.050e-04, 0.99985938],
[-5.000e-05, 0.17615372],
[-4.500e-05, 0.15743786],
[-4.000e-05, 0.13872199],
[-3.500e-05, 0.12000613],
[-3.000e-05, 0.10129026],
[-2.500e-05, 0.0825744],
[-2.000e-05, 0.06385853],
[-1.500e-05, 0.0451426],
[-1.000e-05, 0.00],
[-5.000e-06, 0.00],
[0.0, 0.0],
[5.000e-06, 0.0],
[1.000e-05, 0.0],
[1.500e-05, 0.0],
[2.000e-05, 0.0],
[2.500e-05, 0.0],
[3.000e-05, 0.0],
[3.500e-05, 0.0],
[4.000e-05, 0.0],
[4.500e-05, 0.0],
[5.000e-05, 0.0],
[5.500e-05, 0.0],
[6.000e-05, 0.0],
[6.500e-05, 0.0],
[7.000e-05, 0.0],
[7.500e-05, 0.0],
[8.000e-05, 0.0],
[8.500e-05, 0.0],
[9.000e-05, 0.0],
[9.500e-05, 0.0],
[1.000e-04, 0.0],
[1.050e-04, 0.0],
[1.100e-04, 0.0],
[1.150e-04, 0.0],
[1.200e-04, 0.0],
[1.250e-04, 0.0],
[1.750e-04, 0.0],
[2.250e-04, 0.0],
[2.750e-04, 0.0],
[3.250e-04, 0.0],
[3.750e-04, 0.0],
[4.250e-04, 0.0],
[4.750e-04, 0.0],
[5.250e-04, 0.0],
[5.750e-04, 0.0],
[6.250e-04, 0.0],
[6.750e-04, 0.0],
[7.250e-04, 0.0],
[7.750e-04, 0.0],
[8.250e-04, 0.0],
[8.750e-04, 0.0],
[9.250e-04, 0.0],
[9.750e-04, 0.0],
[1.025e-03, 0.0],
[1.075e-03, 0.0],
[1.125e-03, 0.0],
[1.175e-03, 0.0],
[1.225e-03, 0.0],
[1.275e-03, 0.0],
[1.325e-03, 0.0],
[1.375e-03, 0.0],
[1.425e-03, 0.0],
[1.475e-03, 0.0],
[1.775e-03, 0.0],
[2.075e-03, 0.0],
[2.375e-03, 0.0],
[2.675e-03, 0.0],
[2.975e-03, 0.0],
[3.275e-03, 0.0],
[3.575e-03, 0.0],
[3.875e-03, 0.0],
[4.175e-03, 0.0],
[4.475e-03, 0.0],
[4.775e-03, 0.0],
[5.075e-03, 0.0],
[5.375e-03, 0.0],
[5.675e-03, 0.0],
[5.975e-03, 0.0],
[6.275e-03, 0.0],
[6.575e-03, 0.0],
[6.875e-03, 0.0],
[7.175e-03, 0.0],
[7.475e-03, 0.0],
[7.775e-03, 0.0],
[8.075e-03, 0.0],
[8.375e-03, 0.0],
[8.675e-03, 0.0],
[8.975e-03, 0.0],
[9.275e-03, 0.0],
[9.575e-03, 0.0],
[9.875e-03, 0.0],
[1.0175e-02, 0.0],
[1.0475e-02, 0.0],
[1.0775e-02, 0.0],
[1.1075e-02, 0.0],
[1.1375e-02, 0.0],
[1.1675e-02, 0.0],
[1.1975e-02, 0.0],
],
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"tx_offsets": [[-13.25, 0, 2.0]],
"bird_offset": [-13.25, 0, 2.0],
"normalization": [1e-12],
"data_type": "dBzdt",
},
"Skytem 312HP (HM)": {
"type": "time",
"flag": "HM",
"channel_start_index": 10,
"channels": {
"[1]": -1.7850e-06,
"[2]": 2.850e-07,
"[3]": 1.7150e-06,
"[4]": 3.7150e-06,
"[5]": 5.7150e-06,
"[6]": 7.7150e-06,
"[7]": 9.7150e-06,
"[8]": 1.2215e-05,
"[9]": 1.5715e-05,
"[10]": 2.0215e-05,
"[11]": 2.5715e-05,
"[12]": 3.2715e-05,
"[13]": 4.1715e-05,
"[14]": 5.3215e-05,
"[15]": 6.7715e-05,
"[16]": 8.5715e-05,
"[17]": 1.082150e-04,
"[18]": 1.362150e-04,
"[19]": 1.717150e-04,
"[20]": 2.172150e-04,
"[21]": 2.742150e-04,
"[22]": 3.462150e-04,
"[23]": 4.372150e-04,
"[24]": 5.512150e-04,
"[25]": 6.952150e-04,
"[26]": 8.767150e-04,
"[27]": 1.1052150e-03,
"[28]": 1.3937150e-03,
"[29]": 1.7577150e-03,
"[30]": 2.2162150e-03,
"[31]": 2.7947150e-03,
"[32]": 3.5137150e-03,
"[33]": 4.3937150e-03,
"[34]": 5.4702150e-03,
"[35]": 6.7887150e-03,
"[36]": 8.4027150e-03,
"[37]": 1.0380715e-02,
},
"uncertainty": [
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
[0.05, 1e-2],
],
"waveform": [
[-4.0e-03, 1.0e-08],
[-3.90e-03, 1.11e-01],
[-3.80e-03, 2.22e-01],
[-3.70e-03, 3.33e-01],
[-3.60e-03, 4.44e-01],
[-3.50e-03, 5.55e-01],
[-3.40e-03, 6.66e-01],
[-3.30e-03, 7.77e-01],
[-3.20e-03, 8.88e-01],
[-3.10e-03, 1.0e00],
[-3.0e-03, 1.0e00],
[-2.90e-03, 1.0e00],
[-2.80e-03, 1.0e00],
[-2.70e-03, 1.0e00],
[-2.60e-03, 1.0e00],
[-2.50e-03, 1.0e00],
[-2.40e-03, 1.0e00],
[-2.30e-03, 1.0e00],
[-2.20e-03, 1.0e00],
[-2.10e-03, 1.0e00],
[-2.0e-03, 1.0e00],
[-1.90e-03, 1.0e00],
[-1.80e-03, 1.0e00],
[-1.70e-03, 1.0e00],
[-1.60e-03, 1.0e00],
[-1.50e-03, 1.0e00],
[-1.40e-03, 1.0e00],
[-1.30e-03, 1.0e00],
[-1.20e-03, 1.0e00],
[-1.10e-03, 1.0e00],
[-1.0e-03, 1.0e00],
[-9.0e-04, 9.0e-01],
[-8.0e-04, 8.0e-01],
[-7.0e-04, 7.0e-01],
[-6.0e-04, 6.0e-01],
[-5.0e-04, 5.0e-01],
[-4.0e-04, 4.0e-01],
[-3.0e-04, 3.0e-01],
[-2.0e-04, 2.0e-01],
[-1.0e-04, 1.0e-01],
[0.0e-00, 0.0e00],
[2.0e-05, 0.0e00],
[4.0e-05, 0.0e00],
[6.0e-05, 0.0e00],
[8.0e-05, 0.0e00],
[1.0e-04, 0.0e00],
[1.20e-04, 0.0e00],
[1.40e-04, 0.0e00],
[1.60e-04, 0.0e00],
[1.80e-04, 0.0e00],
[2.0e-04, 0.0e00],
[2.60e-04, 0.0e00],
[3.20e-04, 0.0e00],
[3.80e-04, 0.0e00],
[4.40e-04, 0.0e00],
[5.0e-04, 0.0e00],
[5.60e-04, 0.0e00],
[6.20e-04, 0.0e00],
[6.80e-04, 0.0e00],
[7.40e-04, 0.0e00],
[8.0e-04, 0.0e00],
[8.60e-04, 0.0e00],
[9.20e-04, 0.0e00],
[9.80e-04, 0.0e00],
[1.04e-03, 0.0e00],
[1.10e-03, 0.0e00],
[1.16e-03, 0.0e00],
[1.20e-03, 0.0e00],
[1.70e-03, 0.0e00],
[2.20e-03, 0.0e00],
[2.70e-03, 0.0e00],
[3.20e-03, 0.0e00],
[3.70e-03, 0.0e00],
[4.20e-03, 0.0e00],
[4.70e-03, 0.0e00],
[5.20e-03, 0.0e00],
[5.70e-03, 0.0e00],
[6.20e-03, 0.0e00],
[6.70e-03, 0.0e00],
[7.20e-03, 0.0e00],
[7.70e-03, 0.0e00],
[8.20e-03, 0.0e00],
[8.70e-03, 0.0e00],
[9.20e-03, 0.0e00],
[9.70e-03, 0.0e00],
[1.02e-02, 0.0e00],
[1.07e-02, 0.0e00],
],
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"tx_offsets": [[-13.25, 0, 2.0]],
"bird_offset": [-13.25, 0, 2.0],
"normalization": [1e-12],
"data_type": "dBzdt",
},
"Skytem 312HP v2 (HM)": {
"type": "time",
"flag": "HM",
"channel_start_index": 18,
"channels": {
"[1]": 3.0275e-5,
"[2]": 3.1775e-5,
"[3]": 3.3775e-5,
"[4]": 3.5776e-5,
"[5]": 3.7776e-5,
"[6]": 3.9770e-5,
"[7]": 4.1770e-5,
"[8]": 4.4270e-5,
"[9]": 4.7770e-5,
"[10]": 5.227e-5,
"[11]": 5.777e-5,
"[12]": 6.477e-5,
"[13]": 7.377e-5,
"[14]": 8.527e-5,
"[15]": 9.977e-5,
"[16]": 0.00011777,
"[17]": 0.00014026,
"[18]": 0.00016826,
"[19]": 0.00020376,
"[20]": 0.00024926,
"[21]": 0.00030626,
"[22]": 0.00037826,
"[23]": 0.00046926,
"[24]": 0.00058325,
"[25]": 0.00072726,
"[26]": 0.00090876,
"[27]": 0.00113656,
"[28]": 0.00142556,
"[29]": 0.00178956,
"[30]": 0.00224756,
"[31]": 0.00282656,
"[32]": 0.00354556,
"[33]": 0.00442556,
"[34]": 0.00550156,
"[35]": 0.00582056,
"[36]": 0.00843456,
"[37]": 0.01041256,
},
"uncertainty": [
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
],
"waveform": [
[-4.0e-03, 1.0e-08],
[-3.90e-03, 1.11e-01],
[-3.80e-03, 2.22e-01],
[-3.70e-03, 3.33e-01],
[-3.60e-03, 4.44e-01],
[-3.50e-03, 5.55e-01],
[-3.40e-03, 6.66e-01],
[-3.30e-03, 7.77e-01],
[-3.20e-03, 8.88e-01],
[-3.10e-03, 1.0e00],
[-3.0e-03, 1.0e00],
[-2.90e-03, 1.0e00],
[-2.80e-03, 1.0e00],
[-2.70e-03, 1.0e00],
[-2.60e-03, 1.0e00],
[-2.50e-03, 1.0e00],
[-2.40e-03, 1.0e00],
[-2.30e-03, 1.0e00],
[-2.20e-03, 1.0e00],
[-2.10e-03, 1.0e00],
[-2.0e-03, 1.0e00],
[-1.90e-03, 1.0e00],
[-1.80e-03, 1.0e00],
[-1.70e-03, 1.0e00],
[-1.60e-03, 1.0e00],
[-1.50e-03, 1.0e00],
[-1.40e-03, 1.0e00],
[-1.30e-03, 1.0e00],
[-1.20e-03, 1.0e00],
[-1.10e-03, 1.0e00],
[-1.0e-03, 1.0e00],
[-9.0e-04, 1.0e00],
[-8.0e-04, 1.0e00],
[-7.0e-04, 1.0e00],
[-6.0e-04, 1.0e00],
[-5.0e-04, 1.0e00],
[-4.0e-04, 1.0e00],
[-3.0e-04, 1.0e00],
[-2.0e-04, 6.66e-01],
[-1.0e-04, 3.33e-01],
[0.00e00, 0.00e00],
[5.00e-05, 0.00e00],
[1.00e-04, 0.00e00],
[1.50e-04, 0.00e00],
[2.00e-04, 0.00e00],
[2.50e-04, 0.00e00],
[3.00e-04, 0.00e00],
[3.50e-04, 0.00e00],
[4.00e-04, 0.00e00],
[4.50e-04, 0.00e00],
[5.00e-04, 0.00e00],
[5.50e-04, 0.00e00],
[6.00e-04, 0.00e00],
[6.50e-04, 0.00e00],
[7.00e-04, 0.00e00],
[7.50e-04, 0.00e00],
[8.00e-04, 0.00e00],
[8.50e-04, 0.00e00],
[9.00e-04, 0.00e00],
[9.50e-04, 0.00e00],
[1.00e-03, 0.00e00],
[1.05e-03, 0.00e00],
[1.10e-03, 0.00e00],
[1.15e-03, 0.00e00],
[1.20e-03, 0.00e00],
[1.70e-03, 0.00e00],
[2.20e-03, 0.00e00],
[2.70e-03, 0.00e00],
[3.20e-03, 0.00e00],
[3.70e-03, 0.00e00],
[4.20e-03, 0.00e00],
[4.70e-03, 0.00e00],
[5.20e-03, 0.00e00],
[5.70e-03, 0.00e00],
[6.20e-03, 0.00e00],
[6.70e-03, 0.00e00],
[7.20e-03, 0.00e00],
[7.70e-03, 0.00e00],
[8.20e-03, 0.00e00],
[8.70e-03, 0.00e00],
[9.20e-03, 0.00e00],
[9.70e-03, 0.00e00],
[1.02e-02, 0.00e00],
],
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"tx_offsets": [[-13.25, 0, 2.0]],
"bird_offset": [-13.25, 0, 2.0],
"normalization": [1e-12],
"data_type": "dBzdt",
},
"Skytem 312HP v3 (HM)": {
"type": "time",
"flag": "HM",
"channel_start_index": 18,
"channels": {
"[1]": 7.1499e-07,
"[2]": 2.2149e-06,
"[3]": 4.2149e-06,
"[4]": 6.2149e-06,
"[5]": 8.2149e-06,
"[6]": 1.02144e-05,
"[7]": 1.22144e-05,
"[8]": 1.47145e-05,
"[9]": 1.82149e-05,
"[10]": 2.2715e-05,
"[11]": 2.8215e-05,
"[12]": 3.5215e-05,
"[13]": 4.4215e-05,
"[14]": 5.57149e-05,
"[15]": 7.02149e-05,
"[16]": 8.82149e-05,
"[17]": 0.0001107149,
"[18]": 0.0001387149,
"[19]": 0.0001742150,
"[20]": 0.0002197150,
"[21]": 0.000276715,
"[22]": 0.000348715,
"[23]": 0.000439715,
"[24]": 0.000553715,
"[25]": 0.000697715,
"[26]": 0.000879215,
"[27]": 0.001107715,
"[28]": 0.001396215,
"[29]": 0.001760215,
"[30]": 0.002218715,
"[31]": 0.002797215,
"[32]": 0.003516215,
"[33]": 0.004396215,
"[34]": 0.005472715,
"[35]": 0.006791215,
"[36]": 0.008405215,
"[37]": 0.010383215,
},
"uncertainty": [
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
[0.1, 1e-2],
],
"waveform": [
[-4.0e-03, 1.0e-08],
[-3.90e-03, 1.11e-01],
[-3.80e-03, 2.22e-01],
[-3.70e-03, 3.33e-01],
[-3.60e-03, 4.44e-01],
[-3.50e-03, 5.55e-01],
[-3.40e-03, 6.66e-01],
[-3.30e-03, 7.77e-01],
[-3.20e-03, 8.88e-01],
[-3.10e-03, 1.0e00],
[-3.0e-03, 1.0e00],
[-2.90e-03, 1.0e00],
[-2.80e-03, 1.0e00],
[-2.70e-03, 1.0e00],
[-2.60e-03, 1.0e00],
[-2.50e-03, 1.0e00],
[-2.40e-03, 1.0e00],
[-2.30e-03, 1.0e00],
[-2.20e-03, 1.0e00],
[-2.10e-03, 1.0e00],
[-2.0e-03, 1.0e00],
[-1.90e-03, 1.0e00],
[-1.80e-03, 1.0e00],
[-1.70e-03, 1.0e00],
[-1.60e-03, 1.0e00],
[-1.50e-03, 1.0e00],
[-1.40e-03, 1.0e00],
[-1.30e-03, 1.0e00],
[-1.20e-03, 1.0e00],
[-1.10e-03, 1.0e00],
[-1.0e-03, 1.0e00],
[-9.0e-04, 1.0e00],
[-8.0e-04, 1.0e00],
[-7.0e-04, 1.0e00],
[-6.0e-04, 1.0e00],
[-5.0e-04, 1.0e00],
[-4.0e-04, 1.0e00],
[-3.0e-04, 1.0e00],
[-2.0e-04, 6.66e-01],
[-1.0e-04, 3.33e-01],
[0.00e00, 0.00e00],
[5.00e-05, 0.00e00],
[1.00e-04, 0.00e00],
[1.50e-04, 0.00e00],
[2.00e-04, 0.00e00],
[2.50e-04, 0.00e00],
[3.00e-04, 0.00e00],
[3.50e-04, 0.00e00],
[4.00e-04, 0.00e00],
[4.50e-04, 0.00e00],
[5.00e-04, 0.00e00],
[5.50e-04, 0.00e00],
[6.00e-04, 0.00e00],
[6.50e-04, 0.00e00],
[7.00e-04, 0.00e00],
[7.50e-04, 0.00e00],
[8.00e-04, 0.00e00],
[8.50e-04, 0.00e00],
[9.00e-04, 0.00e00],
[9.50e-04, 0.00e00],
[1.00e-03, 0.00e00],
[1.05e-03, 0.00e00],
[1.10e-03, 0.00e00],
[1.15e-03, 0.00e00],
[1.20e-03, 0.00e00],
[1.70e-03, 0.00e00],
[2.20e-03, 0.00e00],
[2.70e-03, 0.00e00],
[3.20e-03, 0.00e00],
[3.70e-03, 0.00e00],
[4.20e-03, 0.00e00],
[4.70e-03, 0.00e00],
[5.20e-03, 0.00e00],
[5.70e-03, 0.00e00],
[6.20e-03, 0.00e00],
[6.70e-03, 0.00e00],
[7.20e-03, 0.00e00],
[7.70e-03, 0.00e00],
[8.20e-03, 0.00e00],
[8.70e-03, 0.00e00],
[9.20e-03, 0.00e00],
[9.70e-03, 0.00e00],
[1.02e-02, 0.00e00],
],
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"tx_offsets": [[-13.25, 0, 2.0]],
"bird_offset": [-13.25, 0, 2.0],
"normalization": [1e-12],
"data_type": "dBzdt",
},
"Skytem 312HP v2 (LM)": {
"type": "time",
"flag": "LM",
"channel_start_index": 10,
"channels": {
"[1]": -1.73922e-05,
"[2]": -1.58923e-05,
"[3]": -1.38922e-05,
"[4]": -1.18912e-05,
"[5]": -9.891e-06,
"[6]": -7.897e-06,
"[7]": -5.897e-06,
"[8]": -3.397e-06,
"[9]": 1.03e-07,
"[10]": 4.603e-06,
"[11]": 1.0103e-05,
"[12]": 1.7103e-05,
"[13]": 2.6103e-05,
"[14]": 3.7603e-05,
"[15]": 5.2103e-05,
"[16]": 7.0103e-05,
"[17]": 9.2593e-05,
"[18]": 0.000120593,
"[19]": 0.000156093,
"[20]": 0.000201593,
"[21]": 0.000258593,
"[22]": 0.000330593,
"[23]": 0.000421593,
"[24]": 0.000535593,
"[25]": 0.000679593,
"[26]": 0.000861,
"[27]": 0.0011,
"[28]": 0.001377893,
"[29]": 0.001741893,
"[30]": 0.002199893,
"[31]": 0.002778893,
"[32]": 0.003497893,
"[33]": 0.004377893,
"[34]": 0.00545389,
"[35]": 0.005772893,
"[36]": 0.008386893,
"[37]": 0.010364893,
},
"uncertainty": [
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
],
"waveform": [
[-8.18000000e-04, 1.92433144e-04],
[-7.68000000e-04, 8.36713627e-02],
[-7.18000000e-04, 1.51880444e-01],
[-6.68000000e-04, 2.20089525e-01],
[-6.18000000e-04, 2.82624877e-01],
[-5.68000000e-04, 3.40805095e-01],
[-5.18000000e-04, 3.98985314e-01],
[-4.68000000e-04, 4.57165532e-01],
[-4.18000000e-04, 5.17091331e-01],
[-3.68000000e-04, 5.77759762e-01],
[-3.18000000e-04, 6.38428192e-01],
[-2.68000000e-04, 6.99096623e-01],
[-2.18000000e-04, 7.59765054e-01],
[-1.68000000e-04, 8.20433484e-01],
[-1.18000000e-04, 8.81101915e-01],
[-6.80000000e-05, 9.40674793e-01],
[-1.80000000e-05, 9.98704760e-01],
[-1.60000000e-05, 8.06732495e-01],
[-1.40000000e-05, 5.13343178e-01],
[-1.20000000e-05, 2.70179503e-01],
[-1.00000000e-05, 1.07502126e-01],
[-8.00000000e-06, 2.85859885e-02],
[-6.00000000e-06, 2.21551233e-02],
[-4.00000000e-06, 2.71962192e-02],
[-2.00000000e-06, 1.43181338e-02],
[0.00000000e00, 0.00000000e00],
[2.00000000e-06, 0.00000000e00],
[1.20000000e-05, 0.00000000e00],
[2.20000000e-05, 0.00000000e00],
[3.20000000e-05, 0.00000000e00],
[4.20000000e-05, 0.00000000e00],
[5.20000000e-05, 0.00000000e00],
[6.20000000e-05, 0.00000000e00],
[7.20000000e-05, 0.00000000e00],
[8.20000000e-05, 0.00000000e00],
[9.20000000e-05, 0.00000000e00],
[1.02000000e-04, 0.00000000e00],
[1.12000000e-04, 0.00000000e00],
[1.22000000e-04, 0.00000000e00],
[1.32000000e-04, 0.00000000e00],
[1.42000000e-04, 0.00000000e00],
[1.52000000e-04, 0.00000000e00],
[1.62000000e-04, 0.00000000e00],
[1.72000000e-04, 0.00000000e00],
[1.82000000e-04, 0.00000000e00],
[1.92000000e-04, 0.00000000e00],
[2.02000000e-04, 0.00000000e00],
[2.52000000e-04, 0.00000000e00],
[3.02000000e-04, 0.00000000e00],
[3.52000000e-04, 0.00000000e00],
[4.02000000e-04, 0.00000000e00],
[4.52000000e-04, 0.00000000e00],
[5.02000000e-04, 0.00000000e00],
[5.52000000e-04, 0.00000000e00],
[6.02000000e-04, 0.00000000e00],
[6.52000000e-04, 0.00000000e00],
[7.02000000e-04, 0.00000000e00],
[7.52000000e-04, 0.00000000e00],
[8.02000000e-04, 0.00000000e00],
[8.52000000e-04, 0.00000000e00],
[9.02000000e-04, 0.00000000e00],
[9.52000000e-04, 0.00000000e00],
[1.00200000e-03, 0.00000000e00],
[1.05200000e-03, 0.00000000e00],
[1.10200000e-03, 0.00000000e00],
[1.15200000e-03, 0.00000000e00],
[1.20200000e-03, 0.00000000e00],
[1.25200000e-03, 0.00000000e00],
[1.30200000e-03, 0.00000000e00],
[1.35200000e-03, 0.00000000e00],
[1.40200000e-03, 0.00000000e00],
[1.45200000e-03, 0.00000000e00],
[1.50200000e-03, 0.00000000e00],
[1.55200000e-03, 0.00000000e00],
[1.60200000e-03, 0.00000000e00],
[1.65200000e-03, 0.00000000e00],
[1.70200000e-03, 0.00000000e00],
[1.75200000e-03, 0.00000000e00],
[1.80200000e-03, 0.00000000e00],
[1.85200000e-03, 0.00000000e00],
[1.90200000e-03, 0.00000000e00],
[1.95200000e-03, 0.00000000e00],
],
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"tx_offsets": [[-13.25, 0, 2.0]],
"bird_offset": [-13.25, 0, 2.0],
"normalization": [1e-12],
"data_type": "dBzdt",
},
"Skytem 312HP v3 (LM)": {
"type": "time",
"flag": "LM",
"channel_start_index": 8,
"channels": {
"[1]": -1.1485e-05,
"[2]": -9.985998e-06,
"[3]": -7.985999e-06,
"[4]": -5.9859994e-06,
"[5]": -3.985999e-06,
"[6]": -1.985999e-06,
"[7]": 1.5e-08,
"[8]": 2.515e-06,
"[9]": 6.015e-06,
"[10]": 1.0515e-05,
"[11]": 1.6015998e-05,
"[12]": 2.3015e-05,
"[13]": 3.2015e-05,
"[14]": 4.3515e-05,
"[15]": 5.8015e-05,
"[16]": 7.6015e-05,
"[17]": 9.8515e-05,
"[18]": 0.000126515,
"[19]": 0.000162015,
"[20]": 0.000207515,
"[21]": 0.000264515,
"[22]": 0.00033651596,
"[23]": 0.00042751595,
"[24]": 0.000541515,
"[25]": 0.0006855159,
"[26]": 0.000867015,
"[27]": 0.0010955158,
"[28]": 0.0013840157,
},
"uncertainty": [
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
[0.1, 1e-1],
],
"waveform": [
[-8.18000000e-04, 1.92433144e-04],
[-7.68000000e-04, 8.36713627e-02],
[-7.18000000e-04, 1.51880444e-01],
[-6.68000000e-04, 2.20089525e-01],
[-6.18000000e-04, 2.82624877e-01],
[-5.68000000e-04, 3.40805095e-01],
[-5.18000000e-04, 3.98985314e-01],
[-4.68000000e-04, 4.57165532e-01],
[-4.18000000e-04, 5.17091331e-01],
[-3.68000000e-04, 5.77759762e-01],
[-3.18000000e-04, 6.38428192e-01],
[-2.68000000e-04, 6.99096623e-01],
[-2.18000000e-04, 7.59765054e-01],
[-1.68000000e-04, 8.20433484e-01],
[-1.18000000e-04, 8.81101915e-01],
[-6.80000000e-05, 9.40674793e-01],
[-1.80000000e-05, 9.98704760e-01],
[-1.60000000e-05, 8.06732495e-01],
[-1.40000000e-05, 5.13343178e-01],
[-1.20000000e-05, 2.70179503e-01],
[-1.00000000e-05, 1.07502126e-01],
[-8.00000000e-06, 2.85859885e-02],
[-6.00000000e-06, 2.21551233e-02],
[-4.00000000e-06, 2.71962192e-02],
[-2.00000000e-06, 1.43181338e-02],
[0.00000000e00, 0.00000000e00],
[2.00000000e-06, 0.00000000e00],
[4.00000000e-06, 0.00000000e00],
[6.00000000e-06, 0.00000000e00],
[8.00000000e-06, 0.00000000e00],
[1.00000000e-05, 0.00000000e00],
[1.20000000e-05, 0.00000000e00],
[2.20000000e-05, 0.00000000e00],
[3.20000000e-05, 0.00000000e00],
[4.20000000e-05, 0.00000000e00],
[5.20000000e-05, 0.00000000e00],
[6.20000000e-05, 0.00000000e00],
[7.20000000e-05, 0.00000000e00],
[8.20000000e-05, 0.00000000e00],
[9.20000000e-05, 0.00000000e00],
[1.02000000e-04, 0.00000000e00],
[1.12000000e-04, 0.00000000e00],
[1.22000000e-04, 0.00000000e00],
[1.32000000e-04, 0.00000000e00],
[1.42000000e-04, 0.00000000e00],
[1.52000000e-04, 0.00000000e00],
[1.62000000e-04, 0.00000000e00],
[1.72000000e-04, 0.00000000e00],
[1.82000000e-04, 0.00000000e00],
[1.92000000e-04, 0.00000000e00],
[2.02000000e-04, 0.00000000e00],
[2.52000000e-04, 0.00000000e00],
[3.02000000e-04, 0.00000000e00],
[3.52000000e-04, 0.00000000e00],
[4.02000000e-04, 0.00000000e00],
[4.52000000e-04, 0.00000000e00],
[5.02000000e-04, 0.00000000e00],
[5.52000000e-04, 0.00000000e00],
[6.02000000e-04, 0.00000000e00],
[6.52000000e-04, 0.00000000e00],
[7.02000000e-04, 0.00000000e00],
[7.52000000e-04, 0.00000000e00],
[8.02000000e-04, 0.00000000e00],
[8.52000000e-04, 0.00000000e00],
[9.02000000e-04, 0.00000000e00],
[9.52000000e-04, 0.00000000e00],
[1.00200000e-03, 0.00000000e00],
[1.05200000e-03, 0.00000000e00],
[1.10200000e-03, 0.00000000e00],
[1.15200000e-03, 0.00000000e00],
[1.20200000e-03, 0.00000000e00],
[1.25200000e-03, 0.00000000e00],
[1.30200000e-03, 0.00000000e00],
[1.35200000e-03, 0.00000000e00],
[1.40200000e-03, 0.00000000e00],
[1.45200000e-03, 0.00000000e00],
[1.50200000e-03, 0.00000000e00],
[1.55200000e-03, 0.00000000e00],
[1.60200000e-03, 0.00000000e00],
[1.65200000e-03, 0.00000000e00],
[1.70200000e-03, 0.00000000e00],
[1.75200000e-03, 0.00000000e00],
[1.80200000e-03, 0.00000000e00],
[1.85200000e-03, 0.00000000e00],
[1.90200000e-03, 0.00000000e00],
[1.95200000e-03, 0.00000000e00],
],
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"tx_offsets": [[-13.25, 0, 2.0]],
"bird_offset": [-13.25, 0, 2.0],
"normalization": [1e-12],
"data_type": "dBzdt",
},
"Skytem 516M (HM)": {
"type": "time",
"flag": "HM",
"channel_start_index": 20,
"channels": {
"[1]": 1.2148000e-05,
"[2]": 1.3648000e-05,
"[3]": 1.5648000e-05,
"[4]": 1.7648000e-05,
"[5]": 1.9648000e-05,
"[6]": 2.1648000e-05,
"[7]": 2.3648000e-05,
"[8]": 2.6148000e-05,
"[9]": 2.9648000e-05,
"[10]": 3.4148000e-05,
"[11]": 3.9648000e-05,
"[12]": 4.6648000e-05,
"[13]": 5.5648000e-05,
"[14]": 6.7148000e-05,
"[15]": 8.1648000e-05,
"[16]": 9.9648000e-05,
"[17]": 1.2214800e-04,
"[18]": 1.5014800e-04,
"[19]": 1.8564800e-04,
"[20]": 2.3114800e-04,
"[21]": 2.8814800e-04,
"[22]": 3.6014800e-04,
"[23]": 4.5114800e-04,
"[24]": 5.6514800e-04,
"[25]": 7.0914800e-04,
"[26]": 8.9064800e-04,
"[27]": 1.1136480e-03,
"[28]": 1.3826480e-03,
"[29]": 1.7041480e-03,
"[30]": 2.0836480e-03,
"[31]": 2.5276480e-03,
"[32]": 3.0421480e-03,
"[33]": 3.6316480e-03,
"[34]": 4.3191480e-03,
"[35]": 5.1371480e-03,
"[36]": 6.1106480e-03,
"[37]": 7.2696480e-03,
"[38]": 8.6486480e-03,
"[39]": 1.0288648e-02,
},
"uncertainty": [
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
[0.1, 1.0e-3],
],
"waveform": [
[-3.650e-03, 1e-8],
[-3.400e-03, 1.000e00],
[-3.150e-03, 1.000e00],
[-2.900e-03, 1.000e00],
[-2.650e-03, 1.000e00],
[-2.400e-03, 1.000e00],
[-2.150e-03, 1.000e00],
[-1.900e-03, 1.000e00],
[-1.650e-03, 1.000e00],
[-1.400e-03, 1.000e00],
[-1.150e-03, 1.000e00],
[-9.000e-04, 1.000e00],
[-8.500e-04, 1.000e00],
[-8.000e-04, 1.000],
[-7.500e-04, 1.00],
[-7.000e-04, 0.93],
[-6.500e-04, 0.86],
[-6.000e-04, 0.80],
[-5.500e-04, 0.73],
[-5.000e-04, 0.66],
[-4.500e-04, 0.60],
[-4.000e-04, 0.53],
[-3.500e-04, 0.46],
[-3.000e-04, 0.40],
[-2.500e-04, 0.33],
[-2.000e-04, 0.26],
[-1.500e-04, 0.20],
[-1.000e-04, 0.13],
[-5.000e-05, 0.06],
[0.00000e00, 0.00],
[2.000e-06, 0.000e00],
[4.000e-06, 0.000e00],
[6.000e-06, 0.000e00],
[8.000e-06, 0.000e00],
[1.000e-05, 0.000e00],
[1.200e-05, 0.000e00],
[1.400e-05, 0.000e00],
[1.600e-05, 0.000e00],
[1.800e-05, 0.000e00],
[2.000e-05, 0.000e00],
[2.200e-05, 0.000e00],
[2.400e-05, 0.000e00],
[2.600e-05, 0.000e00],
[3.100e-05, 0.000e00],
[3.600e-05, 0.000e00],
[4.100e-05, 0.000e00],
[4.600e-05, 0.000e00],
[5.100e-05, 0.000e00],
[5.600e-05, 0.000e00],
[6.100e-05, 0.000e00],
[6.600e-05, 0.000e00],
[7.100e-05, 0.000e00],
[7.600e-05, 0.000e00],
[8.100e-05, 0.000e00],
[8.600e-05, 0.000e00],
[9.100e-05, 0.000e00],
[9.600e-05, 0.000e00],
[1.010e-04, 0.000e00],
[1.060e-04, 0.000e00],
[1.110e-04, 0.000e00],
[1.160e-04, 0.000e00],
[1.210e-04, 0.000e00],
[1.260e-04, 0.000e00],
[1.310e-04, 0.000e00],
[1.360e-04, 0.000e00],
[1.410e-04, 0.000e00],
[1.460e-04, 0.000e00],
[1.510e-04, 0.000e00],
[2.010e-04, 0.000e00],
[2.510e-04, 0.000e00],
[3.010e-04, 0.000e00],
[3.510e-04, 0.000e00],
[4.010e-04, 0.000e00],
[4.510e-04, 0.000e00],
[5.010e-04, 0.000e00],
[5.510e-04, 0.000e00],
[6.010e-04, 0.000e00],
[6.510e-04, 0.000e00],
[7.010e-04, 0.000e00],
[7.510e-04, 0.000e00],
[8.010e-04, 0.000e00],
[8.510e-04, 0.000e00],
[9.010e-04, 0.000e00],
[9.510e-04, 0.000e00],
[1.001e-03, 0.000e00],
[1.051e-03, 0.000e00],
[1.101e-03, 0.000e00],
[1.151e-03, 0.000e00],
[1.201e-03, 0.000e00],
[1.251e-03, 0.000e00],
[1.301e-03, 0.000e00],
[1.351e-03, 0.000e00],
[1.401e-03, 0.000e00],
[1.451e-03, 0.000e00],
[1.501e-03, 0.000e00],
[1.551e-03, 0.000e00],
[1.601e-03, 0.000e00],
[1.651e-03, 0.000e00],
[1.701e-03, 0.000e00],
[1.751e-03, 0.000e00],
],
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"tx_offsets": [[-16.7, 0, 2.0]],
"bird_offset": [-16.7, 0, 2.0],
"normalization": [1e-12],
"data_type": "dBzdt",
},
"Spectrem (2000)": {
"type": "time",
"flag": "EM_Z",
"channel_start_index": 1,
"channels": {
"[1]": 10.85e-6,
"[2]": 54.25e-6,
"[3]": 119.35e-6,
"[4]": 249.55e-6,
"[5]": 509.96e-6,
"[6]": 1030.82e-6,
"[7]": 2072.49e-6,
"[8]": 4155.82e-6,
},
"uncertainty": [
[0.1, 32.0],
[0.1, 16.0],
[0.1, 8.0],
[0.1, 4.0],
[0.1, 2.0],
[0.1, 1.0],
[0.1, 0.25],
[0.1, 0.1],
],
"waveform": "stepoff",
"tx_offsets": [[-136, 0, -39]],
"bird_offset": [-136, 0, -39],
"comment": "normalization accounts for unit dipole moment at the tx_offset, in part-per-2000",
"normalization": "pp2t",
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"data_type": "Bz",
},
"Spectrem Plus": {
"type": "time",
"flag": "em_z",
"channel_start_index": 1,
"channels": {
"[1]": 6.5e-6,
"[2]": 26e-6,
"[3]": 52.1e-6,
"[4]": 104.2e-6,
"[5]": 208.3e-6,
"[6]": 416.7e-6,
"[7]": 833.3e-6,
"[8]": 1666.7e-6,
"[9]": 3333.3e-6,
"[10]": 6666.7e-6,
"[11]": 13333.3e-6,
},
"uncertainty": [
[0.05, 2000.0],
[0.05, 2000.0],
[0.05, 2000.0],
[0.05, 2000.0],
[0.05, 2000.0],
[0.05, 2000.0],
[0.05, 2000],
[0.05, 2000.0],
[0.05, 2000.0],
[0.05, 2000.0],
[0.05, 2000],
],
"waveform": "stepoff",
"tx_offsets": [[-131, 0, -36]],
"bird_offset": [-131, 0, -36],
"comment": "normalization accounts for unit dipole moment at the tx_offset, in part-per-million",
"normalization": "ppm",
"tx_specs": {"type": "VMD", "a": 1.0, "I": 1.0},
"data_type": "Bz",
},
"VTEM (2007)": {
"type": "time",
"flag": "Sf",
"channel_start_index": 9,
"channels": {
"[1]": 0e1,
"[2]": 0e1,
"[3]": 0e1,
"[4]": 0e1,
"[5]": 0e1,
"[6]": 0e1,
"[7]": 0e1,
"[8]": 0e1,
"[9]": 99e-6,
"[10]": 120e-6,
"[11]": 141e-6,
"[12]": 167e-6,
"[13]": 198e-6,
"[14]": 234e-6,
"[15]": 281e-6,
"[16]": 339e-6,
"[17]": 406e-6,
"[18]": 484e-6,
"[19]": 573e-6,
"[20]": 682e-6,
"[21]": 818e-6,
"[22]": 974e-6,
"[23]": 1151e-6,
"[24]": 1370e-6,
"[25]": 1641e-6,
"[26]": 1953e-6,
"[27]": 2307e-6,
"[28]": 2745e-6,
"[29]": 3286e-6,
"[30]": 3911e-6,
"[31]": 4620e-6,
"[32]": 5495e-6,
"[33]": 6578e-6,
"[34]": 7828e-6,
"[35]": 9245e-6,
},
"uncertainty": [
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
[0.1, 5e-4],
],
"waveform": [
[-4.30e-03, 1.0e-08],
[-4.20e-03, 3.34253e-02],
[-4.10e-03, 1.16092e-01],
[-4.0e-03, 1.97080e-01],
[-3.90e-03, 2.75748e-01],
[-3.80e-03, 3.51544e-01],
[-3.70e-03, 4.23928e-01],
[-3.60e-03, 4.92386e-01],
[-3.50e-03, 5.56438e-01],
[-3.40e-03, 6.15645e-01],
[-3.30e-03, 6.69603e-01],
[-3.20e-03, 7.17955e-01],
[-3.10e-03, 7.60389e-01],
[-3.0e-03, 7.96642e-01],
[-2.90e-03, 8.26499e-01],
[-2.80e-03, 8.49796e-01],
[-2.70e-03, 8.66421e-01],
[-2.60e-03, 8.78934e-01],
[-2.50e-03, 8.91465e-01],
[-2.40e-03, 9.03901e-01],
[-2.30e-03, 9.16161e-01],
[-2.20e-03, 9.28239e-01],
[-2.10e-03, 9.40151e-01],
[-2.0e-03, 9.51908e-01],
[-1.90e-03, 9.63509e-01],
[-1.80e-03, 9.74953e-01],
[-1.70e-03, 9.86240e-01],
[-1.60e-03, 9.97372e-01],
[-1.50e-03, 1.0e00],
[-1.40e-03, 9.65225e-01],
[-1.30e-03, 9.23590e-01],
[-1.20e-03, 8.75348e-01],
[-1.10e-03, 8.20965e-01],
[-1.0e-03, 7.60913e-01],
[-9.0e-04, 6.95697e-01],
[-8.0e-04, 6.25858e-01],
[-7.0e-04, 5.51972e-01],
[-6.0e-04, 4.74644e-01],
[-5.0e-04, 3.94497e-01],
[-4.0e-04, 3.12171e-01],
[-3.0e-04, 2.28318e-01],
[-2.0e-04, 1.43599e-01],
[-1.0e-04, 5.86805e-02],
[0.0e00, 0.0e00],
[2.0e-05, 0.0e00],
[4.0e-05, 0.0e00],
[6.0e-05, 0.0e00],
[8.0e-05, 0.0e00],
[1.0e-04, 0.0e00],
[1.20e-04, 0.0e00],
[1.40e-04, 0.0e00],
[1.60e-04, 0.0e00],
[1.80e-04, 0.0e00],
[2.0e-04, 0.0e00],
[2.20e-04, 0.0e00],
[2.40e-04, 0.0e00],
[2.60e-04, 0.0e00],
[2.80e-04, 0.0e00],
[3.0e-04, 0.0e00],
[3.90e-04, 0.0e00],
[4.70e-04, 0.0e00],
[5.50e-04, 0.0e00],
[6.30e-04, 0.0e00],
[7.10e-04, 0.0e00],
[7.90e-04, 0.0e00],
[8.70e-04, 0.0e00],
[9.50e-04, 0.0e00],
[1.03e-03, 0.0e00],
[1.11e-03, 0.0e00],
[1.19e-03, 0.0e00],
[1.27e-03, 0.0e00],
[1.35e-03, 0.0e00],
[1.43e-03, 0.0e00],
[1.51e-03, 0.0e00],
[1.59e-03, 0.0e00],
[1.67e-03, 0.0e00],
[1.75e-03, 0.0e00],
[1.83e-03, 0.0e00],
[1.91e-03, 0.0e00],
[1.99e-03, 0.0e00],
[2.07e-03, 0.0e00],
[2.15e-03, 0.0e00],
[2.23e-03, 0.0e00],
[2.31e-03, 0.0e00],
[2.35e-03, 0.0e00],
[2.65e-03, 0.0e00],
[2.95e-03, 0.0e00],
[3.25e-03, 0.0e00],
[3.55e-03, 0.0e00],
[3.85e-03, 0.0e00],
[4.15e-03, 0.0e00],
[4.45e-03, 0.0e00],
[4.75e-03, 0.0e00],
[5.05e-03, 0.0e00],
[5.35e-03, 0.0e00],
[5.65e-03, 0.0e00],
[5.95e-03, 0.0e00],
[6.25e-03, 0.0e00],
[6.55e-03, 0.0e00],
[6.85e-03, 0.0e00],
[7.15e-03, 0.0e00],
[7.45e-03, 0.0e00],
[7.75e-03, 0.0e00],
[8.05e-03, 0.0e00],
[8.35e-03, 0.0e00],
[8.65e-03, 0.0e00],
[8.95e-03, 0.0e00],
[9.25e-03, 0.0e00],
[9.55e-03, 0.0e00],
[9.85e-03, 0.0e00],
[1.0150e-02, 0.0e00],
[1.0450e-02, 0.0e00],
[1.0750e-02, 0.0e00],
],
"tx_offsets": [[0, 0, 0]],
"bird_offset": [0, 0, 0],
"normalization": [531, 1e-12],
"tx_specs": {"type": "CircularLoop", "a": 13.0, "I": 1.0},
"data_type": "dBzdt",
},
"VTEM Plus": {
"type": "time",
"flag": "SFz",
"channel_start_index": 14,
"channels": {
"[1]": 0e1,
"[2]": 0e1,
"[3]": 0e1,
"[4]": 21e-6,
"[5]": 26e-6,
"[6]": 31e-6,
"[7]": 36e-6,
"[8]": 42e-6,
"[9]": 48e-6,
"[10]": 55e-6,
"[11]": 63e-6,
"[12]": 73e-6,
"[13]": 83e-6,
"[14]": 96e-6,
"[15]": 110e-6,
"[16]": 126e-6,
"[17]": 145e-6,
"[18]": 167e-6,
"[19]": 192e-6,
"[20]": 220e-6,
"[21]": 253e-6,
"[22]": 290e-6,
"[23]": 333e-6,
"[24]": 383e-6,
"[25]": 440e-6,
"[26]": 505e-6,
"[27]": 580e-6,
"[28]": 667e-6,
"[29]": 766e-6,
"[30]": 880e-6,
"[31]": 1010e-6,
"[32]": 1161e-6,
"[33]": 1333e-6,
"[34]": 1531e-6,
"[35]": 1760e-6,
"[36]": 2021e-6,
"[37]": 2323e-6,
"[38]": 2667e-6,
"[39]": 3063e-6,
"[40]": 3521e-6,
"[41]": 4042e-6,
"[42]": 4641e-6,
"[43]": 5333e-6,
"[44]": 6125e-6,
"[45]": 7036e-6,
"[46]": 8083e-6,
},
"uncertainty": [
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
],
"waveform": [
[-6.90000000e-03, 1.65109034e-01],
[-6.80000000e-03, 2.38693737e-01],
[-6.70000000e-03, 3.10076270e-01],
[-6.60000000e-03, 3.81995918e-01],
[-6.50000000e-03, 3.96712859e-01],
[-6.40000000e-03, 3.93651305e-01],
[-6.30000000e-03, 3.91771404e-01],
[-6.20000000e-03, 4.42206467e-01],
[-6.10000000e-03, 5.04189494e-01],
[-6.00000000e-03, 5.65259426e-01],
[-5.90000000e-03, 6.19078311e-01],
[-5.80000000e-03, 6.68385433e-01],
[-5.70000000e-03, 6.94328070e-01],
[-5.60000000e-03, 6.89547749e-01],
[-5.50000000e-03, 6.84230315e-01],
[-5.40000000e-03, 7.04586959e-01],
[-5.30000000e-03, 7.41540445e-01],
[-5.20000000e-03, 7.75539800e-01],
[-5.10000000e-03, 8.04221721e-01],
[-5.00000000e-03, 8.28499302e-01],
[-4.90000000e-03, 8.43699646e-01],
[-4.80000000e-03, 8.38489634e-01],
[-4.70000000e-03, 8.32420238e-01],
[-4.60000000e-03, 8.29788377e-01],
[-4.50000000e-03, 8.41658610e-01],
[-4.40000000e-03, 8.54119669e-01],
[-4.30000000e-03, 8.65775056e-01],
[-4.20000000e-03, 8.77376732e-01],
[-4.10000000e-03, 8.88172736e-01],
[-4.00000000e-03, 8.86829950e-01],
[-3.90000000e-03, 8.80491997e-01],
[-3.80000000e-03, 8.74315179e-01],
[-3.70000000e-03, 8.81888495e-01],
[-3.60000000e-03, 8.93221613e-01],
[-3.50000000e-03, 9.05038135e-01],
[-3.40000000e-03, 9.16156408e-01],
[-3.30000000e-03, 9.27704372e-01],
[-3.20000000e-03, 9.31249329e-01],
[-3.10000000e-03, 9.24642819e-01],
[-3.00000000e-03, 9.17660329e-01],
[-2.90000000e-03, 9.20023633e-01],
[-2.80000000e-03, 9.30336234e-01],
[-2.70000000e-03, 9.41669352e-01],
[-2.60000000e-03, 9.51767107e-01],
[-2.50000000e-03, 9.62885380e-01],
[-2.40000000e-03, 9.71479214e-01],
[-2.30000000e-03, 9.65248684e-01],
[-2.20000000e-03, 9.58373617e-01],
[-2.10000000e-03, 9.54291546e-01],
[-2.00000000e-03, 9.64443012e-01],
[-1.90000000e-03, 9.74809324e-01],
[-1.80000000e-03, 9.85068214e-01],
[-1.70000000e-03, 9.95219680e-01],
[-1.60000000e-03, 1.00000000e00],
[-1.50000000e-03, 9.70136427e-01],
[-1.40000000e-03, 9.32753250e-01],
[-1.30000000e-03, 8.93651305e-01],
[-1.20000000e-03, 8.44505317e-01],
[-1.10000000e-03, 7.92512622e-01],
[-1.00000000e-03, 7.35900741e-01],
[-9.00000000e-04, 6.74938232e-01],
[-8.00000000e-04, 6.10108497e-01],
[-7.00000000e-04, 5.41894940e-01],
[-6.00000000e-04, 4.70727253e-01],
[-5.00000000e-04, 3.89300677e-01],
[-4.00000000e-04, 3.17595875e-01],
[-3.00000000e-04, 2.36491567e-01],
[-2.00000000e-04, 1.62638307e-01],
[-1.00000000e-04, 8.43807068e-02],
[-0.00000000e00, 0.00000000e00],
[5.00000000e-06, 0.00000000e00],
[1.00000000e-05, 0.00000000e00],
[1.50000000e-05, 0.00000000e00],
[2.00000000e-05, 0.00000000e00],
[2.50000000e-05, 0.00000000e00],
[3.00000000e-05, 0.00000000e00],
[3.50000000e-05, 0.00000000e00],
[4.00000000e-05, 0.00000000e00],
[4.50000000e-05, 0.00000000e00],
[5.00000000e-05, 0.00000000e00],
[5.50000000e-05, 0.00000000e00],
[6.00000000e-05, 0.00000000e00],
[6.50000000e-05, 0.00000000e00],
[7.00000000e-05, 0.00000000e00],
[7.50000000e-05, 0.00000000e00],
[8.00000000e-05, 0.00000000e00],
[8.50000000e-05, 0.00000000e00],
[9.00000000e-05, 0.00000000e00],
[9.50000000e-05, 0.00000000e00],
[1.00000000e-04, 0.00000000e00],
[1.05000000e-04, 0.00000000e00],
[1.10000000e-04, 0.00000000e00],
[1.20000000e-04, 0.00000000e00],
[1.30000000e-04, 0.00000000e00],
[1.40000000e-04, 0.00000000e00],
[1.50000000e-04, 0.00000000e00],
[1.60000000e-04, 0.00000000e00],
[1.70000000e-04, 0.00000000e00],
[1.80000000e-04, 0.00000000e00],
[1.90000000e-04, 0.00000000e00],
[2.00000000e-04, 0.00000000e00],
[2.10000000e-04, 0.00000000e00],
[2.20000000e-04, 0.00000000e00],
[2.30000000e-04, 0.00000000e00],
[2.40000000e-04, 0.00000000e00],
[2.50000000e-04, 0.00000000e00],
[2.60000000e-04, 0.00000000e00],
[2.70000000e-04, 0.00000000e00],
[2.80000000e-04, 0.00000000e00],
[2.90000000e-04, 0.00000000e00],
[3.00000000e-04, 0.00000000e00],
[3.50000000e-04, 0.00000000e00],
[4.00000000e-04, 0.00000000e00],
[4.50000000e-04, 0.00000000e00],
[5.00000000e-04, 0.00000000e00],
[5.50000000e-04, 0.00000000e00],
[6.00000000e-04, 0.00000000e00],
[6.50000000e-04, 0.00000000e00],
[7.00000000e-04, 0.00000000e00],
[7.50000000e-04, 0.00000000e00],
[8.00000000e-04, 0.00000000e00],
[8.50000000e-04, 0.00000000e00],
[9.00000000e-04, 0.00000000e00],
[9.50000000e-04, 0.00000000e00],
[1.00000000e-03, 0.00000000e00],
[1.05000000e-03, 0.00000000e00],
[1.10000000e-03, 0.00000000e00],
[1.15000000e-03, 0.00000000e00],
[1.20000000e-03, 0.00000000e00],
[1.25000000e-03, 0.00000000e00],
[1.30000000e-03, 0.00000000e00],
[1.35000000e-03, 0.00000000e00],
[1.40000000e-03, 0.00000000e00],
[1.65000000e-03, 0.00000000e00],
[1.90000000e-03, 0.00000000e00],
[2.15000000e-03, 0.00000000e00],
[2.40000000e-03, 0.00000000e00],
[2.65000000e-03, 0.00000000e00],
[2.90000000e-03, 0.00000000e00],
[3.15000000e-03, 0.00000000e00],
[3.40000000e-03, 0.00000000e00],
[3.65000000e-03, 0.00000000e00],
[3.90000000e-03, 0.00000000e00],
[4.15000000e-03, 0.00000000e00],
[4.40000000e-03, 0.00000000e00],
[4.65000000e-03, 0.00000000e00],
[4.90000000e-03, 0.00000000e00],
[5.15000000e-03, 0.00000000e00],
[5.40000000e-03, 0.00000000e00],
[5.65000000e-03, 0.00000000e00],
[5.90000000e-03, 0.00000000e00],
[6.15000000e-03, 0.00000000e00],
[6.40000000e-03, 0.00000000e00],
[6.65000000e-03, 0.00000000e00],
[6.90000000e-03, 0.00000000e00],
[7.15000000e-03, 0.00000000e00],
[7.40000000e-03, 0.00000000e00],
[7.65000000e-03, 0.00000000e00],
[7.90000000e-03, 0.00000000e00],
[8.15000000e-03, 0.00000000e00],
[8.40000000e-03, 0.00000000e00],
],
"tx_offsets": [[0, 0, 0]],
"bird_offset": [-25, 0, -34],
"normalization": [3.1416, 1e-12],
"tx_specs": {"type": "CircularLoop", "a": 1.0, "I": 1.0},
"data_type": "dBzdt",
},
"VTEM Max": {
"type": "time",
"flag": "SFz",
"channel_start_index": 14,
"channels": {
"[1]": 0e1,
"[2]": 0e1,
"[3]": 0e1,
"[4]": 21e-6,
"[5]": 26e-6,
"[6]": 31e-6,
"[7]": 36e-6,
"[8]": 42e-6,
"[9]": 48e-6,
"[10]": 55e-6,
"[11]": 63e-6,
"[12]": 73e-6,
"[13]": 83e-6,
"[14]": 96e-6,
"[15]": 110e-6,
"[16]": 126e-6,
"[17]": 145e-6,
"[18]": 167e-6,
"[19]": 192e-6,
"[20]": 220e-6,
"[21]": 253e-6,
"[22]": 290e-6,
"[23]": 333e-6,
"[24]": 383e-6,
"[25]": 440e-6,
"[26]": 505e-6,
"[27]": 580e-6,
"[28]": 667e-6,
"[29]": 766e-6,
"[30]": 880e-6,
"[31]": 1010e-6,
"[32]": 1161e-6,
"[33]": 1333e-6,
"[34]": 1531e-6,
"[35]": 1760e-6,
"[36]": 2021e-6,
"[37]": 2323e-6,
"[38]": 2667e-6,
"[39]": 3063e-6,
"[40]": 3521e-6,
"[41]": 4042e-6,
"[42]": 4641e-6,
"[43]": 5333e-6,
"[44]": 6125e-6,
"[45]": 7036e-6,
"[46]": 8083e-6,
},
"uncertainty": [
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
],
"waveform": [
[-6.90000000e-03, 1.65109034e-01],
[-6.80000000e-03, 2.38693737e-01],
[-6.70000000e-03, 3.10076270e-01],
[-6.60000000e-03, 3.81995918e-01],
[-6.50000000e-03, 3.96712859e-01],
[-6.40000000e-03, 3.93651305e-01],
[-6.30000000e-03, 3.91771404e-01],
[-6.20000000e-03, 4.42206467e-01],
[-6.10000000e-03, 5.04189494e-01],
[-6.00000000e-03, 5.65259426e-01],
[-5.90000000e-03, 6.19078311e-01],
[-5.80000000e-03, 6.68385433e-01],
[-5.70000000e-03, 6.94328070e-01],
[-5.60000000e-03, 6.89547749e-01],
[-5.50000000e-03, 6.84230315e-01],
[-5.40000000e-03, 7.04586959e-01],
[-5.30000000e-03, 7.41540445e-01],
[-5.20000000e-03, 7.75539800e-01],
[-5.10000000e-03, 8.04221721e-01],
[-5.00000000e-03, 8.28499302e-01],
[-4.90000000e-03, 8.43699646e-01],
[-4.80000000e-03, 8.38489634e-01],
[-4.70000000e-03, 8.32420238e-01],
[-4.60000000e-03, 8.29788377e-01],
[-4.50000000e-03, 8.41658610e-01],
[-4.40000000e-03, 8.54119669e-01],
[-4.30000000e-03, 8.65775056e-01],
[-4.20000000e-03, 8.77376732e-01],
[-4.10000000e-03, 8.88172736e-01],
[-4.00000000e-03, 8.86829950e-01],
[-3.90000000e-03, 8.80491997e-01],
[-3.80000000e-03, 8.74315179e-01],
[-3.70000000e-03, 8.81888495e-01],
[-3.60000000e-03, 8.93221613e-01],
[-3.50000000e-03, 9.05038135e-01],
[-3.40000000e-03, 9.16156408e-01],
[-3.30000000e-03, 9.27704372e-01],
[-3.20000000e-03, 9.31249329e-01],
[-3.10000000e-03, 9.24642819e-01],
[-3.00000000e-03, 9.17660329e-01],
[-2.90000000e-03, 9.20023633e-01],
[-2.80000000e-03, 9.30336234e-01],
[-2.70000000e-03, 9.41669352e-01],
[-2.60000000e-03, 9.51767107e-01],
[-2.50000000e-03, 9.62885380e-01],
[-2.40000000e-03, 9.71479214e-01],
[-2.30000000e-03, 9.65248684e-01],
[-2.20000000e-03, 9.58373617e-01],
[-2.10000000e-03, 9.54291546e-01],
[-2.00000000e-03, 9.64443012e-01],
[-1.90000000e-03, 9.74809324e-01],
[-1.80000000e-03, 9.85068214e-01],
[-1.70000000e-03, 9.95219680e-01],
[-1.60000000e-03, 1.00000000e00],
[-1.50000000e-03, 9.70136427e-01],
[-1.40000000e-03, 9.32753250e-01],
[-1.30000000e-03, 8.93651305e-01],
[-1.20000000e-03, 8.44505317e-01],
[-1.10000000e-03, 7.92512622e-01],
[-1.00000000e-03, 7.35900741e-01],
[-9.00000000e-04, 6.74938232e-01],
[-8.00000000e-04, 6.10108497e-01],
[-7.00000000e-04, 5.41894940e-01],
[-6.00000000e-04, 4.70727253e-01],
[-5.00000000e-04, 3.89300677e-01],
[-4.00000000e-04, 3.17595875e-01],
[-3.00000000e-04, 2.36491567e-01],
[-2.00000000e-04, 1.62638307e-01],
[-1.00000000e-04, 8.43807068e-02],
[-0.00000000e00, 0.00000000e00],
[5.00000000e-06, 0.00000000e00],
[1.00000000e-05, 0.00000000e00],
[1.50000000e-05, 0.00000000e00],
[2.00000000e-05, 0.00000000e00],
[2.50000000e-05, 0.00000000e00],
[3.00000000e-05, 0.00000000e00],
[3.50000000e-05, 0.00000000e00],
[4.00000000e-05, 0.00000000e00],
[4.50000000e-05, 0.00000000e00],
[5.00000000e-05, 0.00000000e00],
[5.50000000e-05, 0.00000000e00],
[6.00000000e-05, 0.00000000e00],
[6.50000000e-05, 0.00000000e00],
[7.00000000e-05, 0.00000000e00],
[7.50000000e-05, 0.00000000e00],
[8.00000000e-05, 0.00000000e00],
[8.50000000e-05, 0.00000000e00],
[9.00000000e-05, 0.00000000e00],
[9.50000000e-05, 0.00000000e00],
[1.00000000e-04, 0.00000000e00],
[1.05000000e-04, 0.00000000e00],
[1.10000000e-04, 0.00000000e00],
[1.20000000e-04, 0.00000000e00],
[1.30000000e-04, 0.00000000e00],
[1.40000000e-04, 0.00000000e00],
[1.50000000e-04, 0.00000000e00],
[1.60000000e-04, 0.00000000e00],
[1.70000000e-04, 0.00000000e00],
[1.80000000e-04, 0.00000000e00],
[1.90000000e-04, 0.00000000e00],
[2.00000000e-04, 0.00000000e00],
[2.10000000e-04, 0.00000000e00],
[2.20000000e-04, 0.00000000e00],
[2.30000000e-04, 0.00000000e00],
[2.40000000e-04, 0.00000000e00],
[2.50000000e-04, 0.00000000e00],
[2.60000000e-04, 0.00000000e00],
[2.70000000e-04, 0.00000000e00],
[2.80000000e-04, 0.00000000e00],
[2.90000000e-04, 0.00000000e00],
[3.00000000e-04, 0.00000000e00],
[3.50000000e-04, 0.00000000e00],
[4.00000000e-04, 0.00000000e00],
[4.50000000e-04, 0.00000000e00],
[5.00000000e-04, 0.00000000e00],
[5.50000000e-04, 0.00000000e00],
[6.00000000e-04, 0.00000000e00],
[6.50000000e-04, 0.00000000e00],
[7.00000000e-04, 0.00000000e00],
[7.50000000e-04, 0.00000000e00],
[8.00000000e-04, 0.00000000e00],
[8.50000000e-04, 0.00000000e00],
[9.00000000e-04, 0.00000000e00],
[9.50000000e-04, 0.00000000e00],
[1.00000000e-03, 0.00000000e00],
[1.05000000e-03, 0.00000000e00],
[1.10000000e-03, 0.00000000e00],
[1.15000000e-03, 0.00000000e00],
[1.20000000e-03, 0.00000000e00],
[1.25000000e-03, 0.00000000e00],
[1.30000000e-03, 0.00000000e00],
[1.35000000e-03, 0.00000000e00],
[1.40000000e-03, 0.00000000e00],
[1.65000000e-03, 0.00000000e00],
[1.90000000e-03, 0.00000000e00],
[2.15000000e-03, 0.00000000e00],
[2.40000000e-03, 0.00000000e00],
[2.65000000e-03, 0.00000000e00],
[2.90000000e-03, 0.00000000e00],
[3.15000000e-03, 0.00000000e00],
[3.40000000e-03, 0.00000000e00],
[3.65000000e-03, 0.00000000e00],
[3.90000000e-03, 0.00000000e00],
[4.15000000e-03, 0.00000000e00],
[4.40000000e-03, 0.00000000e00],
[4.65000000e-03, 0.00000000e00],
[4.90000000e-03, 0.00000000e00],
[5.15000000e-03, 0.00000000e00],
[5.40000000e-03, 0.00000000e00],
[5.65000000e-03, 0.00000000e00],
[5.90000000e-03, 0.00000000e00],
[6.15000000e-03, 0.00000000e00],
[6.40000000e-03, 0.00000000e00],
[6.65000000e-03, 0.00000000e00],
[6.90000000e-03, 0.00000000e00],
[7.15000000e-03, 0.00000000e00],
[7.40000000e-03, 0.00000000e00],
[7.65000000e-03, 0.00000000e00],
[7.90000000e-03, 0.00000000e00],
[8.15000000e-03, 0.00000000e00],
[8.40000000e-03, 0.00000000e00],
],
"tx_offsets": [[0, 0, 0]],
"bird_offset": [-27, 0, -44],
"normalization": [3.1416, 1e-12],
"tx_specs": {"type": "CircularLoop", "a": 1.0, "I": 1.0},
"data_type": "dBzdt",
},
"Xcite": {
"type": "time",
"flag": "dBdt_Z_F",
"channel_start_index": 7,
"channels": {
"[1]": 6.40000e-03,
"[2]": 1.28000e-02,
"[3]": 1.92000e-02,
"[4]": 2.56000e-02,
"[5]": 3.20000e-02,
"[6]": 3.84000e-02,
"[7]": 4.48000e-02,
"[8]": 5.12000e-02,
"[9]": 5.76000e-02,
"[10]": 6.40000e-02,
"[11]": 7.04000e-02,
"[12]": 7.68000e-02,
"[13]": 8.32000e-02,
"[14]": 9.28000e-02,
"[15]": 1.05600e-01,
"[16]": 1.18400e-01,
"[17]": 1.34400e-01,
"[18]": 1.53600e-01,
"[19]": 1.76000e-01,
"[20]": 2.01600e-01,
"[21]": 2.30400e-01,
"[22]": 2.62400e-01,
"[23]": 2.97600e-01,
"[24]": 3.39200e-01,
"[25]": 3.87200e-01,
"[26]": 4.41600e-01,
"[27]": 5.05600e-01,
"[28]": 5.82400e-01,
"[29]": 6.72000e-01,
"[30]": 7.74400e-01,
"[31]": 8.89600e-01,
"[32]": 1.02080e00,
"[33]": 1.17120e00,
"[34]": 1.34400e00,
"[35]": 1.54560e00,
"[36]": 1.77920e00,
"[37]": 2.04480e00,
"[38]": 2.34560e00,
"[39]": 2.69120e00,
"[40]": 3.08800e00,
"[41]": 3.54240e00,
"[42]": 4.06720e00,
"[43]": 4.67200e00,
"[44]": 5.36640e00,
"[45]": 6.16320e00,
"[46]": 7.07840e00,
"[47]": 8.13120e00,
"[48]": 9.33760e00,
"[49]": 1.07232e01,
"[50]": 1.24896e01,
},
"uncertainty": [
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
[0.05, 1e-3],
],
"waveform": [
[-5.50e00, 1.00000000e-08],
[-5.20e00, 5.00000000e-01],
[-4.90e00, 9.40112151e-01],
[-4.60e00, 9.40178855e-01],
[-4.30e00, 9.40245558e-01],
[-4.00e00, 9.40312262e-01],
[-3.70e00, 9.40378966e-01],
[-3.40e00, 9.40445670e-01],
[-3.10e00, 9.40512373e-01],
[-2.80e00, 9.40579077e-01],
[-2.50e00, 9.40645781e-01],
[-2.20e00, 9.40712484e-01],
[-1.90e00, 9.40779188e-01],
[-1.60e00, 9.40845892e-01],
[-1.30e00, 9.40912595e-01],
[-1.00e00, 9.40979299e-01],
[-7.00e-01, 9.41046003e-01],
[-4.00e-01, 9.41112706e-01],
[-3.50e-01, 9.41123824e-01],
[-3.00e-01, 8.98234294e-01],
[-2.50e-01, 7.89179185e-01],
[-2.00e-01, 6.47911463e-01],
[-1.50e-01, 4.80782576e-01],
[-1.00e-01, 2.95120400e-01],
[-5.00e-02, 9.92697471e-02],
[0.00e-00, 3.68628739e-18],
[5.00e-03, 0.00000000e00],
[1.00e-02, 0.00000000e00],
[1.50e-02, 0.00000000e00],
[2.00e-02, 0.00000000e00],
[2.50e-02, 0.00000000e00],
[3.00e-02, 0.00000000e00],
[3.50e-02, 0.00000000e00],
[4.00e-02, 0.00000000e00],
[4.50e-02, 0.00000000e00],
[5.00e-02, 0.00000000e00],
[5.50e-02, 0.00000000e00],
[6.00e-02, 0.00000000e00],
[6.50e-02, 0.00000000e00],
[7.00e-02, 0.00000000e00],
[7.50e-02, 0.00000000e00],
[8.00e-02, 0.00000000e00],
[8.50e-02, 0.00000000e00],
[9.00e-02, 0.00000000e00],
[9.50e-02, 0.00000000e00],
[1.00e-01, 0.00000000e00],
[1.10e-01, 0.00000000e00],
[1.20e-01, 0.00000000e00],
[1.30e-01, 0.00000000e00],
[1.40e-01, 0.00000000e00],
[1.50e-01, 0.00000000e00],
[1.60e-01, 0.00000000e00],
[1.70e-01, 0.00000000e00],
[1.80e-01, 0.00000000e00],
[1.90e-01, 0.00000000e00],
[2.00e-01, 0.00000000e00],
[2.10e-01, 0.00000000e00],
[2.20e-01, 0.00000000e00],
[2.30e-01, 0.00000000e00],
[2.40e-01, 0.00000000e00],
[2.50e-01, 0.00000000e00],
[2.60e-01, 0.00000000e00],
[2.70e-01, 0.00000000e00],
[2.80e-01, 0.00000000e00],
[2.90e-01, 0.00000000e00],
[3.00e-01, 0.00000000e00],
[3.25e-01, 0.00000000e00],
[3.50e-01, 0.00000000e00],
[3.75e-01, 0.00000000e00],
[4.00e-01, 0.00000000e00],
[4.25e-01, 0.00000000e00],
[4.50e-01, 0.00000000e00],
[4.75e-01, 0.00000000e00],
[5.00e-01, 0.00000000e00],
[5.25e-01, 0.00000000e00],
[5.50e-01, 0.00000000e00],
[5.75e-01, 0.00000000e00],
[6.00e-01, 0.00000000e00],
[7.50e-01, 0.00000000e00],
[9.00e-01, 0.00000000e00],
[1.05e00, 0.00000000e00],
[1.20e00, 0.00000000e00],
[1.35e00, 0.00000000e00],
[1.50e00, 0.00000000e00],
[1.65e00, 0.00000000e00],
[1.80e00, 0.00000000e00],
[1.95e00, 0.00000000e00],
[2.10e00, 0.00000000e00],
[2.25e00, 0.00000000e00],
[2.40e00, 0.00000000e00],
[2.55e00, 0.00000000e00],
[2.70e00, 0.00000000e00],
[2.85e00, 0.00000000e00],
[3.00e00, 0.00000000e00],
[3.15e00, 0.00000000e00],
[3.30e00, 0.00000000e00],
[3.45e00, 0.00000000e00],
[3.60e00, 0.00000000e00],
[3.75e00, 0.00000000e00],
[3.90e00, 0.00000000e00],
[4.00e00, 0.00000000e00],
[4.50e00, 0.00000000e00],
[5.00e00, 0.00000000e00],
[5.50e00, 0.00000000e00],
[6.00e00, 0.00000000e00],
[6.50e00, 0.00000000e00],
[7.00e00, 0.00000000e00],
[7.50e00, 0.00000000e00],
[8.00e00, 0.00000000e00],
[8.50e00, 0.00000000e00],
[9.00e00, 0.00000000e00],
[9.50e00, 0.00000000e00],
[1.00e01, 0.00000000e00],
[1.05e01, 0.00000000e00],
[1.10e01, 0.00000000e00],
[1.15e01, 0.00000000e00],
[1.20e01, 0.00000000e00],
[1.25e01, 0.00000000e00],
],
"tx_offsets": [[0, 0, 0]],
"bird_offset": [0, 0, 0],
"normalization": [3.1416, 1e-12],
"tx_specs": {"type": "CircularLoop", "a": 1.0, "I": 1.0},
"data_type": "dBzdt",
},
} | 5ae2626c2c8a5445457169f3f2866bf8233ee7f3 | 12,924 |
import binascii
def generate_ngrams_and_hashit(tokens, n=3):
"""The function generates and hashes ngrams
which gets from the tokens sequence.
@param tokens - list of tokens
@param n - count of elements in sequences
"""
return [binascii.crc32(bytearray(tokens[i:i + n]))
for i in range(len(tokens) - n + 1)] | eb627add56f51a533c773e0dfea029bfcdb808ee | 12,925 |
from typing import List
def generate_fingerprints(args: Namespace, logger: Logger = None) -> List[List[float]]:
"""
Generate the fingerprints.
:param logger:
:param args: Arguments.
:return: A list of lists of target fingerprints.
"""
# import pdb; pdb.set_trace()
checkpoint_path = args.checkpoint_paths[0]
if logger is None:
logger = create_logger('fingerprints', quiet=False)
print('Loading data')
test_data = get_data(path=args.data_path,
args=args,
use_compound_names=False,
max_data_size=float("inf"),
skip_invalid_smiles=False)
test_data = MoleculeDataset(test_data)
####
test_df = test_data.get_smiles_df()
####
logger.info(f'Total size = {len(test_data):,}')
logger.info(f'Generating...')
# Load model
# import pdb; pdb.set_trace()
model = load_checkpoint(checkpoint_path, cuda=args.cuda, current_args=args, logger=logger)
model_preds = do_generate(
model=model,
data=test_data,
args=args
)
####
test_df["fps"] = model_preds
####
return test_df | aac2b9f342306be7dc79a029c8433dd5f2147d0e | 12,926 |
def transform_xlogx(mat):
"""
Args:
mat(np.array): A two-dimensional array
Returns:
np.array: Let UsV^† be the SVD of mat. Returns
Uf(s)V^†, where f(x) = -2xlogx
"""
U, s, Vd = np.linalg.svd(mat, full_matrices=False)
return (U * (-2.0*s * np.log(s))) @ Vd | f4cf18a8ae9f7a298ffd6b6400a33a9cad5fabbd | 12,927 |
from datetime import datetime
def get_clip_name_from_unix_time(source_guid, current_clip_start_time):
"""
"""
# convert unix time to
readable_datetime = datetime.fromtimestamp(int(current_clip_start_time)).strftime('%Y_%m_%d_%H_%M_%S')
clipname = source_guid + "_" + readable_datetime
return clipname, readable_datetime | 0a212a76a69507ae3020c1e05ec354a927ad3dae | 12,929 |
def extract_pc_in_box3d(pc, box3d):
"""Extract point cloud in box3d.
Args:
pc (np.ndarray): [N, 3] Point cloud.
box3d (np.ndarray): [8,3] 3d box.
Returns:
np.ndarray: Selected point cloud.
np.ndarray: Indices of selected point cloud.
"""
box3d_roi_inds = in_hull(pc[:, 0:3], box3d)
return pc[box3d_roi_inds, :], box3d_roi_inds | 2d9cb9089631e357ed8ec5ee454203d5eaec1c1d | 12,930 |
import typing
def get_list_as_str(list_to_convert: typing.List[str]) -> str:
"""Convert list into comma separated string, with each element enclosed in single quotes"""
return ", ".join(["'{}'".format(list_item) for list_item in list_to_convert]) | 6b565c3d63d9887f05d5369511b8453c406f7b72 | 12,931 |
def normalize_sides(sides):
"""
Description: Squares the sides of the rectangles and averages the points
so that they fit together
Input:
- sides - Six vertex sets representing the sides of a drawing
Returns:
- norm_sides - Squared and fit sides list
"""
sides_list = []
# Average side vertices and make perfect rectangles
def square_sides(sides):
# Find the min/max x and y values
x = []
y = []
for vert in sides:
x.append(vert[0][0])
y.append(vert[0][1])
minx = 0
miny = 0
maxx = max(x)-min(x)
maxy = max(y)-min(y)
# Construct new squared vertex set with format |1 2|
# |3 4|
squared_side = [[minx,miny],[maxx,miny],[maxx,maxy],[minx,maxy]]
#squared_side = [[minx, maxy], [maxx, maxy], [minx, miny], [maxx, miny]]
return squared_side
squared_right = square_sides(sides[0])
squared_left = square_sides(sides[1])
squared_top = square_sides(sides[2])
squared_back = square_sides(sides[3])
squared_front = square_sides(sides[4])
squared_bottom = square_sides(sides[5])
return squared_front,squared_left,squared_back,squared_right,squared_top,squared_bottom | 855fcc45d14db2eede9fd7ec2fa6bf2f6854950d | 12,932 |
def GetFieldInfo(column: Schema.Column,
force_nested_types: bool = False,
nested_prefix: str = 'Nested_') -> FieldInfo:
"""Returns the corresponding information for provided column.
Args:
column: the column for which to generate the dataclass FieldInfo.
force_nested_types: when True, a nested subclass is generated always,
even for known dataclass types.
nested_prefix: name prefix for nested dataclasses.
Returns:
The corresponding `FieldInfo` class for column.
"""
column.validate()
info = FieldInfo(column.info.name)
nested_name = f'{nested_prefix}{column.info.name}'
sub_nested_name = f'{nested_name}_'
if column.info.column_type in _TYPE_INFO:
info.type_info = _TYPE_INFO[column.info.column_type].copy()
_ApplyLabel(column, info)
elif column.info.column_type == Schema_pb2.ColumnInfo.TYPE_NESTED:
if column.info.message_name and not force_nested_types:
info.type_info = TypeInfo(column.info.message_name)
else:
info.type_info = TypeInfo(nested_name)
nested = NestedType(info.type_info.name)
nested.fields = [
GetFieldInfo(sub_column, force_nested_types, sub_nested_name)
for sub_column in column.fields
]
info.nested.append(nested)
_ApplyLabel(column, info)
elif column.info.column_type in (Schema_pb2.ColumnInfo.TYPE_ARRAY,
Schema_pb2.ColumnInfo.TYPE_SET):
element_info = GetFieldInfo(column.fields[0], force_nested_types,
sub_nested_name)
if column.info.column_type == Schema_pb2.ColumnInfo.TYPE_ARRAY:
name = 'typing.List'
else:
name = 'typing.Set'
info.type_info = TypeInfo(name, None, {'typing'},
[element_info.type_info])
info.nested.extend(element_info.nested)
elif column.info.column_type == Schema_pb2.ColumnInfo.TYPE_MAP:
key_info = GetFieldInfo(column.fields[0], force_nested_types,
sub_nested_name)
value_info = GetFieldInfo(column.fields[1], force_nested_types,
sub_nested_name)
info.type_info = TypeInfo('typing.Dict', None, {'typing'},
[key_info.type_info, value_info.type_info])
info.nested.extend(key_info.nested)
info.nested.extend(value_info.nested)
else:
raise ValueError(f'Unsupported type `{column.info.column_type}` '
f'for field `{column.name()}`')
info.type_info.add_annotations(_GetColumnAnnotations(column))
return info | e788ef090bb8fd8150f2effe42d2db4e8c3fdde6 | 12,933 |
def get_session():
"""
Get the current session.
:return: the session
:raises OutsideUnitOfWorkError: if this method is called from outside a UOW
"""
global Session
if Session is None or not Session.registry.has():
raise OutsideUnitOfWorkError
return Session() | 8a1bfb7afff2cc1a843eaa01e59eabea5e083339 | 12,934 |
import functools
import torch
def create_sgd_optimizers_fn(datasets, model, learning_rate, momentum=0.9, weight_decay=0, nesterov=False, scheduler_fn=None, per_step_scheduler_fn=None):
"""
Create a Stochastic gradient descent optimizer for each of the dataset with optional scheduler
Args:
datasets: a dictionary of dataset
model: a model to optimize
learning_rate: the initial learning rate
scheduler_fn: a scheduler, or `None`
momentum: the momentum of the SGD
weight_decay: the weight decay
nesterov: enables Nesterov momentum
per_step_scheduler_fn: the functor to instantiate scheduler to be run per-step (batch)
Returns:
An optimizer
"""
optimizer_fn = functools.partial(
torch.optim.SGD,
lr=learning_rate,
momentum=momentum,
weight_decay=weight_decay,
nesterov=nesterov)
return create_optimizers_fn(datasets, model,
optimizer_fn=optimizer_fn,
scheduler_fn=scheduler_fn,
per_step_scheduler_fn=per_step_scheduler_fn) | 6d76d5dfc0f633a324d7ee9fe347f1bc68bf0492 | 12,935 |
def equalize(img):
"""
Equalize the histogram of input PIL image.
Args:
img (PIL image): Image to be equalized
Returns:
img (PIL image), Equalized image.
"""
if not is_pil(img):
raise TypeError('img should be PIL image. Got {}'.format(type(img)))
return ImageOps.equalize(img) | d31d3590ba7927518475053911bdb4251381815d | 12,936 |
def ratingRange(app):
""" Get the rating range of an app. """
rating = 'Unknown'
r = app['rating']
if r >= 0 and r <= 1:
rating = '0-1'
elif r > 1 and r <= 2:
rating = '1-2'
elif r > 2 and r <= 3:
rating = '2-3'
elif r > 3 and r <= 4:
rating = '3-4'
elif r > 4 and r <= 5:
rating = '4-5'
return rating | 69056c367a87e331cd3b606423540250b20f6485 | 12,938 |
def immediate_sister(graph, node1, node2):
"""
is node2 an immediate sister of node1?
"""
return (node2 in sister_nodes(graph, node1) and is_following(graph, node1, node2)) | cb1cdc13e8aceb88e72781a547c9ef1eb2079cb0 | 12,939 |
def get_topic_link(text: str) -> str:
"""
Generate a topic link.
A markdown link, text split with dash.
Args:
text {str} The text value to parse
Returns:
{str} The parsed text
"""
return f"{text.lower().replace(' ', '-')}" | 445afc9358f98323934e0e2788ed52658c7040cb | 12,940 |
def load_data(datapath):
"""Loads data from CSV data file.
Args:
datapath: Location of the training file
Returns:
summary dataframe containing RFM data for btyd models
actuals_df containing additional data columns for calculating error
"""
# Does not used the summary_data_from_transaction_data from the Lifetimes
# library as it wouldn't scale as well. The pre-processing done in BQ instead.
tf.logging.info('Loading data...')
ft_file = '{0}/{1}'.format(datapath, TRAINING_DATA_FILE)
#[START prob_selec]
df_ft = pd.read_csv(ft_file)
# Extracts relevant dataframes for RFM:
# - summary has aggregated values before the threshold date
# - actual_df has values of the overall period.
summary = df_ft[['customer_id', 'frequency_btyd', 'recency', 'T',
'monetary_btyd']]
#[END prob_selec]
summary.columns = ['customer_id', 'frequency', 'recency', 'T',
'monetary_value']
summary = summary.set_index('customer_id')
# additional columns needed for calculating error
actual_df = df_ft[['customer_id', 'frequency_btyd', 'monetary_dnn',
'target_monetary']]
actual_df.columns = ['customer_id', 'train_frequency', 'train_monetary',
'act_target_monetary']
tf.logging.info('Data loaded.')
return summary, actual_df | d7efe25303fa7839a9842d7b04bcdb1f749a4830 | 12,941 |
def rms(a, axis=None):
"""
Calculates the RMS of an array.
Args:
a (ndarray). A sequence of numbers to apply the RMS to.
axis (int). The axis along which to compute. If not given or None,
the RMS for the whole array is computed.
Returns:
ndarray: The RMS of the array along the desired axis or axes.
"""
a = np.array(a)
if axis is None:
div = a.size
else:
div = a.shape[axis]
ms = np.sum(a**2.0, axis=axis) / div
return np.sqrt(ms) | 1b4a2989f8dd06956ae87a2991ef75ca0c6037fc | 12,942 |
def event_message(iden, event):
"""Return an event message."""
return {
'id': iden,
'type': TYPE_EVENT,
'event': event.as_dict(),
} | 3b30f3f697d0615a55b3b494f73d01c8df5dcb0e | 12,944 |
def logout():
"""Logout."""
logout_user()
flash(lazy_gettext("You are logged out."), "info")
return redirect(url_for("public.home")) | 2e65faed65671e881594a9a3c990bc6151417575 | 12,945 |
import json
def predicate_to_str(predicate: dict) -> str:
"""
谓词转文本
:param predicate: 谓词数据
:return: 文本
"""
result = ""
if "block" in predicate:
result += "检查方块\n\n"
block = predicate["block"]
if "nbt" in block:
result += f"检查nbt:\n``` json\n{try_pretty_json_str(block['nbt'])}\n```\n"
elif "item" in predicate:
result += "检查物品:" + try_translate(minecraft_lang, get_translate_str("item",
predicate["item"].split(':')[0],
predicate["item"].split(':')[-1:][
0])) + "\n\n"
elif "items" in predicate:
result += "检查下列物品:\n"
for item in predicate['items']:
result += " - " + try_translate(minecraft_lang, get_translate_str("item",
item.split(':')[0],
item.split(':')[-1:][
0])) + "\n"
elif "enchantments" in predicate:
result += "检查附魔\n\n"
enchantments = predicate["enchantments"]
for enchantment in enchantments:
result += enchantment_to_str(enchantment) + "\n\n"
elif "nbt" in predicate:
result += f"检查nbt:\n``` json\n{try_pretty_json_str(predicate['nbt'])}\n```\n"
elif "flags" in predicate:
flags = predicate["flags"]
if "is_on_fire" in flags:
if flags["is_on_fire"]:
result += "着火\n"
else:
result += "没有着火\n"
elif "biome" in predicate:
result += "检查生物群系:" + try_translate(minecraft_lang, get_translate_str("biome",
predicate["biome"].split(':')[0],
predicate["biome"].split(':')[-1:][
0])) + "\n"
else:
result += f"(未知的谓词)\n``` json\n{json.dumps(predicate)}\n```"
return result | 799f3fe66fe5ca78635c9d9b3f3a33a11ee63912 | 12,946 |
from typing import Optional
async def get_postcode(postcode_like: PostCodeLike) -> Optional[Postcode]:
"""
Gets the postcode object for a given postcode string.
Acts as a middleware between us and the API, caching results.
:param postcode_like: The either a string postcode or PostCode object.
:return: The PostCode object else None if the postcode does not exist..
:raises CachingError: When the postcode is not in cache, and the API is unreachable.
"""
if isinstance(postcode_like, Postcode):
return postcode_like
postcode_like = postcode_like.replace(" ", "").upper()
try:
postcode = Postcode.get(Postcode.postcode == postcode_like)
except DoesNotExist:
logger.info(f"Postcode {postcode_like} not cached, fetching from API")
try:
postcode = await fetch_postcode_from_string(postcode_like)
except (ApiError, CircuitBreakerError):
raise CachingError(f"Requested postcode is not cached, and can't be retrieved.")
if postcode is not None:
postcode.save()
return postcode | c0123b52dca8892c2f399892bee8f6ee2d5ada60 | 12,948 |
def get_ebv(path, specs=range(10)):
"""Lookup the EBV value for all targets from the CFRAME fibermap.
Return the median of all non-zero values.
"""
ebvs = []
for (CFRAME,), camera, spec in iterspecs(path, 'cframe', specs=specs, cameras='b'):
ebvs.append(CFRAME['FIBERMAP'].read(columns=['EBV'])['EBV'].astype(np.float32))
ebvs = np.stack(ebvs).reshape(-1)
nonzero = ebvs > 0
ebvs = ebvs[nonzero]
return np.nanmedian(ebvs) | f27fc781109eed9e4e8102c88396f33a735742e9 | 12,950 |
def create_pipeline(pipeline_name: Text, pipeline_root: Text, data_root: Text,
beam_pipeline_args: Text) -> pipeline.Pipeline:
"""Custom component demo pipeline."""
examples = external_input(data_root)
# Brings data into the pipeline or otherwise joins/converts training data.
example_gen = CsvExampleGen(input=examples)
hello = component.HelloComponent(
input_data=example_gen.outputs['examples'], name=u'HelloWorld')
# Computes statistics over data for visualization and example validation.
statistics_gen = StatisticsGen(examples=hello.outputs['output_data'])
return pipeline.Pipeline(
pipeline_name=pipeline_name,
pipeline_root=pipeline_root,
components=[example_gen, hello, statistics_gen],
enable_cache=True,
beam_pipeline_args=beam_pipeline_args
) | 7804df79d4e1ac969df5ef5a2399d841b52d4683 | 12,952 |
def toggleAction(*args, **kwargs):
"""A decorator which identifies a class method as a toggle action. """
return ActionFactory(ToggleAction, *args, **kwargs) | c9bc47a1f62ccac95ace344a4def7bd81064793e | 12,953 |
def getHistograph(dataset = {}, variable = ""):
"""
Calculates a histogram-like summary on a variable in a dataset
and returns a dictionary. The keys in the dictionary are unique items
for the selected variable. The values of each dictionary key, is the number
of times the unique item occured in the data set
"""
data = getDatalist(dataGraph = dataset['DATA'], varGraph = dataset['VARIABLES'], variable = variable)
return histograph(data) | e07c0d1b3e9ba8507402189057b186ee0f8dee3c | 12,954 |
def _get_client_by_settings(
client_cls, # type: Type[BaseClient]
bk_app_code=None, # type: Optional[str]
bk_app_secret=None, # type: Optional[str]
accept_language=None, # type: Optional[str]
**kwargs
):
"""Returns a client according to the django settings"""
client = client_cls(**kwargs)
client.update_bkapi_authorization(
bk_app_code=bk_app_code or settings.get(SettingKeys.APP_CODE),
bk_app_secret=bk_app_secret or settings.get(SettingKeys.APP_SECRET),
)
# disable global https verify
if settings.get(SettingKeys.BK_API_CLIENT_ENABLE_SSL_VERIFY):
client.disable_ssl_verify()
if accept_language:
client.session.set_accept_language(accept_language)
return client | efbb42d7795f7e0939d33f2427470e202d6580c9 | 12,955 |
from controllers import sites
import jinja2
def create_and_configure_jinja_environment(
dirs, autoescape=True, handler=None, default_locale='en_US'):
"""Sets up an environment and gets jinja template."""
# Defer to avoid circular import.
locale = None
app_context = sites.get_course_for_current_request()
if app_context:
locale = app_context.get_current_locale()
if not locale:
locale = app_context.default_locale
if not locale:
locale = default_locale
jinja_environment = create_jinja_environment(
jinja2.FileSystemLoader(dirs), locale=locale, autoescape=autoescape)
jinja_environment.filters['gcb_tags'] = get_gcb_tags_filter(handler)
return jinja_environment | 88d285cd436b5af0848c2ca1e45caa3e28a8e074 | 12,956 |
import numpy
def bootstrap_cost(target_values, class_probability_matrix, cost_function,
num_replicates):
"""Bootstraps cost for one set of examples.
E = number of examples
K = number of classes
B = number of bootstrap replicates
:param target_values: length-E numpy array of target values (integers in
range 0...[K - 1]).
:param class_probability_matrix: E-by-K numpy array of predicted
probabilities.
:param cost_function: Cost function, used to evaluate predicted
probabilities. Must be negatively oriented (so that lower values are
better), with the following inputs and outputs.
Input: target_values: Same as input to this method.
Input: class_probability_matrix: Same as input to this method.
Output: cost: Scalar value.
:param num_replicates: Number of bootstrap replicates.
:return: cost_values: length-B numpy array of cost values.
"""
error_checking.assert_is_integer(num_replicates)
error_checking.assert_is_geq(num_replicates, 1)
cost_values = numpy.full(num_replicates, numpy.nan)
if num_replicates == 1:
cost_values[0] = cost_function(target_values,
class_probability_matrix)
else:
for k in range(num_replicates):
_, these_indices = bootstrapping.draw_sample(target_values)
cost_values[k] = cost_function(
target_values[these_indices],
class_probability_matrix[these_indices, ...]
)
print('Average cost = {0:.4f}'.format(numpy.mean(cost_values)))
return cost_values | ba76e9b9614407a4c0d49c16e3b9ab9f0974a820 | 12,957 |
def jdeblend_bob(src_fm, bobbed):
"""
Stronger version of jdeblend() that uses a bobbed clip to deblend.
Parameters:
clip src_fm: Source after field matching, must have field=3 and low cthresh.
clip src: Bobbed source.
Example:
src =
from havsfunc import QTGMC
qtg = QTGMC(src, TFF=True, SourceMatch=3)
vfm = src.vivtc.VFM(order=1, field=3, cthresh=3)
dblend = jdeblend_bob(vfm, qtg)
dblend = jdeblend_kf(dblend, vfm)
"""
bob0 = bobbed.std.SelectEvery(2, 0)
bob1 = bobbed.std.SelectEvery(2, 1)
ab0, bc0, c0 = bob0, bob0[1:] + bob0[-1], bob0[2:] + bob0[-2]
a1, ab1, bc1 = bob1[0] + bob1[:-1], bob1, bob1[1:] + bob1[-1]
dbd = core.std.Expr([a1, ab1, ab0, bc1, bc0, c0], 'y x - z + b c - a + + 2 /')
dbd = core.std.ShufflePlanes([bc0, dbd], [0, 1, 2], vs.YUV)
select_src = [src_fm.std.SelectEvery(5, i) for i in range(5)]
select_dbd = [dbd.std.SelectEvery(5, i) for i in range(5)]
inters = _inter_pattern(select_src, select_dbd)
return core.std.FrameEval(src_fm, partial(_jdeblend_eval, src=src_fm, inters=inters), [src_fm, src_fm[0]+src_fm[:-1]]) | d5e79710d7346a2376656ccfaf9c43a70fa8bc36 | 12,958 |
import optparse
def ParseArgs():
"""Parse the command line options, returning an options object."""
usage = 'Usage: %prog [options] LIST|GET|LATEST'
option_parser = optparse.OptionParser(usage)
AddCommandLineOptions(option_parser)
log_helper.AddCommandLineOptions(option_parser)
options, args = option_parser.parse_args()
if not options.repo_url:
option_parser.error('--repo-url is required')
if len(args) == 1:
action = args[0].lower()
if action in ('list', 'latest', 'get'):
return options, action
option_parser.error(
'A single repository action (LIST, GET, or LATEST) is required') | cfef602975011d4b04e7797a9e1426293f0d0b7b | 12,959 |
import io
def generate_table_definition(schema_and_table, column_info,
primary_key=None, foreign_keys=None,
diststyle=None, distkey=None, sortkey=None):
"""Return a CREATE TABLE statement as a string."""
if not column_info:
raise Exception('No columns specified for {}'.format(schema_and_table))
out = io.StringIO()
out.write('CREATE TABLE {} (\n'.format(schema_and_table))
columns_count = len(column_info)
for i, (column, type_) in enumerate(column_info):
out.write(' "{}" {}'.format(column, type_))
if (i < columns_count - 1) or primary_key or foreign_keys:
out.write(',')
out.write('\n')
if primary_key:
out.write(' PRIMARY KEY({})'.format(primary_key))
if foreign_keys:
out.write(',')
out.write('\n')
foreign_keys = foreign_keys or []
foreign_keys_count = len(foreign_keys)
for i, (key, reftable, refcolumn) in enumerate(foreign_keys):
out.write(' FOREIGN KEY({}) REFERENCES {}({})'.format(
key, reftable, refcolumn
))
if i < foreign_keys_count - 1:
out.write(',')
out.write('\n')
out.write(')\n')
if diststyle:
out.write('DISTSTYLE {}\n'.format(diststyle))
if distkey:
out.write('DISTKEY({})\n'.format(distkey))
if sortkey:
if isinstance(sortkey, str):
out.write('SORTKEY({})\n'.format(sortkey))
elif len(sortkey) == 1:
out.write('SORTKEY({})\n'.format(sortkey[0]))
else:
out.write('COMPOUND SORTKEY({})\n'.format(', '.join(sortkey)))
return out.getvalue() | 383cdc8ed13fbaa45adadec26f31ad0f5ac52fbc | 12,960 |
def gradient_descent_update(x, gradx, learning_rate):
"""
Performs a gradient descent update.
"""
# Return the new value for x
return x - learning_rate * gradx | db5ec512883352f473990eca124c8ad302ec3564 | 12,961 |
def nth_permutation(n, size=0):
"""nth permutation of 0..size-1
where n is from 0 to size! - 1
"""
lehmer = int_to_lehmer(n, size)
return lehmer_to_permutation(lehmer) | b79bb639cbf23296879562fa718218beee86f378 | 12,962 |
def signin(request):
"""
Method for log in of the user
"""
if request.user.is_authenticated:
return_var = render(request, '/')
if request.method == 'POST':
username = request.POST['username']
password = request.POST['password']
user = authenticate(request, username=username, password=password)
if user is not None:
login(request, user)
return_var = redirect('/')
else:
form = AuthenticationForm(request.POST)
return_var = render(request, 'registration/login.html', {'form': form})
else:
form = AuthenticationForm()
return_var = render(request, 'registration/login.html', {'form': form})
return return_var | aadab619cca9d71e3f255f910af7b8d1dd59b8f4 | 12,963 |
def compare_features(f1, f2):
"""Comparison method for feature sorting."""
def get_prefix(feature):
if feature.startswith('e1-'): return 'e1'
if feature.startswith('e2-'): return 'e2'
if feature.startswith('e-'): return 'e'
if feature.startswith('t-'): return 't'
return 'x'
prefixes = {'e': 1, 't': 2, 'e1': 3, 'e2': 4}
p1 = get_prefix(f1)
p2 = get_prefix(f2)
prefix_comparison = cmp(p1, p2)
return cmp(f1, f2) if prefix_comparison == 0 else prefix_comparison | 2b93e2c6b6a9993d13964d726efe855d57f72448 | 12,964 |
def localized_index(lang):
"""
Example view demonstrating rendering a simple HTML page.
"""
context = make_context()
context['lang'] = lang
context['content'] = context['COPY']['content-%s' % lang]
context['form'] = context['COPY']['form-%s' % lang]
context['share'] = context['COPY']['share-%s' % lang]
context['calendar'] = context['COPY']['calendar-%s' % lang]
context['initial_card'] = context['COPY']['config']['initial_card'].__unicode__()
context['cards'] = _make_card_list(lang)
context['us_states'] = us.states.STATES
return make_response(render_template('index.html', **context)) | 7d6878f30270c735a2d97353b813cdf632043b92 | 12,965 |
def build_output_unit_vqa(q_encoding, m_last, num_choices, apply_dropout,
scope='output_unit', reuse=None):
"""
Apply a 2-layer fully-connected network to predict answers. Apply dropout
if specified.
Input:
q_encoding: [N, d], tf.float32
m_last: [N, d], tf.float32
Return:
vqa_scores: [N, num_choices], tf.float32
"""
output_dim = cfg.MODEL.VQA_OUTPUT_DIM
with tf.variable_scope(scope, reuse=reuse):
if cfg.MODEL.VQA_OUTPUT_USE_QUESTION:
fc1 = fc_elu(
'fc1', tf.concat([q_encoding, m_last], axis=1),
output_dim=output_dim)
else:
fc1 = fc_elu('fc1_wo_q', m_last, output_dim=output_dim)
if apply_dropout:
fc1 = tf.nn.dropout(fc1, cfg.TRAIN.DROPOUT_KEEP_PROB)
fc2 = fc('fc2', fc1, output_dim=num_choices,
biases_initializer=tf.constant_initializer(
cfg.TRAIN.VQA_SCORE_INIT))
vqa_scores = fc2
return vqa_scores | 2fc8d0c9246cbb3350af9d20a85964c9f3967618 | 12,966 |
def coding_problem_16(length):
"""
You run a sneaker website and want to record the last N order ids in a log. Implement a data structure to
accomplish this, with the following API:
record(order_id): adds the order_id to the log
get_last(i): gets the ith last element from the log. i is guaranteed to be smaller than or equal to N.
You should be as efficient with time and space as possible.
Example:
>>> log = coding_problem_16(10)
>>> for id in xrange(20):
... log.record(id)
>>> log.get_last(0)
[]
>>> log.get_last(1)
[19]
>>> log.get_last(5)
[15, 16, 17, 18, 19]
>>> log.record(20)
>>> log.record(21)
>>> log.get_last(1)
[21]
>>> log.get_last(3)
[19, 20, 21]
"""
class OrdersLog(object):
def __init__(self, num):
self.circular_buffer = [None] * num
self.current_index = 0
def record(self, order_id):
self.circular_buffer[self.current_index] = order_id
self.current_index += 1
if self.current_index == len(self.circular_buffer):
self.current_index = 0
def get_last(self, num):
start_index = self.current_index - num
if start_index < 0: # wrap around
return self.circular_buffer[start_index:] + self.circular_buffer[:self.current_index]
else: # no wrapping required
return self.circular_buffer[start_index:self.current_index]
return OrdersLog(length) | 5c1b3e6be920ce826f7c8e8b0fc8fd27cd398079 | 12,967 |
def _check_dimensions(n_grobs, nrow = None, ncol = None):
"""
Internal function to provide non-Null nrow and ncol numbers
given a n_number of images and potentially some information about the
desired nrow/ncols.
Arguments:
----------
n_grobs: int, number of images to be organized
nrow: int, number of rows user wants (Default is None)
ncol: int, number of columns user wants (Default is None)
Returns:
--------
(nrow, ncol) tuple that meets user desires or errors if cannot meet
users expectation
"""
if nrow is None and ncol is None:
nrow = int(np.ceil(np.sqrt(n_grobs)))
ncol = int(np.ceil(n_grobs/nrow))
if nrow is None:
nrow = int(np.ceil(n_grobs/ncol))
if ncol is None:
ncol = int(np.ceil(n_grobs/nrow))
assert n_grobs <= nrow * ncol, \
"nrow * ncol < the number of grobs, please correct"
return nrow, ncol | 20531024ecabc4b4b7b5ce1d8a20774cf2b568ac | 12,968 |
import re
def year_parse(s: str) -> int:
"""Parses a year from a string."""
regex = r"((?:19|20)\d{2})(?:$|[-/]\d{2}[-/]\d{2})"
try:
year = int(re.findall(regex, str(s))[0])
except IndexError:
year = None
return year | f52449aefcba52106fe8c7c03355c237a94775e1 | 12,969 |
import random
def sampleDistribution(d):
"""
Expects d to be a list of tuples
The first element should be the probability
If the tuples are of length 2 then it returns the second element
Otherwise it returns the suffix tuple
"""
# {{{
z = float(sum(t[0] for t in d))
if z == 0.0:
eprint("sampleDistribution: z = 0")
eprint(d)
r = random.random()
u = 0.0
for index, t in enumerate(d):
p = t[0] / z
# This extra condition is needed for floating-point bullshit
if r <= u + p or index == len(d) - 1:
if len(t) <= 2:
return t[1]
else:
return t[1:]
u += p
assert False | 4e47b3dead1e9cc42bf152e6854cbd7cdb255438 | 12,970 |
def logout():
"""
`/register` endpoint
Logs out a user and redirects to the index page.
"""
logout_user()
flash("You are logged out.", "info")
return redirect(url_for("main.index")) | 7054a11253b02522178c528197071c1ae9c3ae81 | 12,971 |
import requests
def players_season_totals(season_end_year, playoffs=False, skip_totals=False,
output_type=None, output_file_path=None, output_write_option=None, json_options=None):
"""
scrape the "Totals" stats of all players from a single year
Args:
season_end_year (int): year in which the season ends, e.g. 2019 for 2018-2019 season
playoffs (bool): whether to grab the playoffs (True) or regular season (False) table
skip_totals (bool): whether (True) or not (False) to skip the rows representing for
the complete year of a player that is traded (no effect for the playoffs)
output_type (str): either csv or json, if you want to save that type of file
output_file_path (str): file you want to save to
output_write_option (str): whether to write (default) or append
json_options (dict): dictionary of options to pass to the json writer
Returns:
a list of rows; each row is a dictionary with items named from COLUMN_RENAMER
"""
try:
values = http_client.players_season_totals(season_end_year,
skip_totals=skip_totals, playoffs=playoffs)
except requests.exceptions.HTTPError as http_error:
if http_error.response.status_code == requests.codes.not_found:
raise InvalidSeason(season_end_year=season_end_year)
else:
raise http_error
return output.output(
values=values,
output_type=output_type,
output_file_path=output_file_path,
output_write_option=output_write_option,
csv_writer=output.players_season_totals_to_csv,
encoder=BasketballReferenceJSONEncoder,
json_options=json_options,
) | ea0fa62e9b7ec644404d7968f2b11b14781b4c37 | 12,972 |
import random
def array_shuffle(x,axis = 0, random_state = 2020):
"""
对多维度数组,在任意轴打乱顺序
:param x: ndarray
:param axis: 打乱的轴
:return:打乱后的数组
"""
new_index = list(range(x.shape[axis]))
random.seed(random_state)
random.shuffle(new_index)
x_new = np.transpose(x, ([axis]+[i for i in list(range(len(x.shape))) if i is not axis]))
x_new = x_new[new_index][:]
new_dim = list(np.array(range(axis))+1)+[0]+list(np.array(range(len(x.shape)-axis-1))+axis+1)
x_new = np.transpose(x_new, tuple(new_dim))
return x_new | df6ff3e9fd1d94ff6a6e633451a88815b16f1e83 | 12,973 |
import time
def get_recent_activity_rows(chase_driver):
"""Return the 25 most recent CC transactions, plus any pending
transactions.
Returns:
A list of lists containing the columns of the Chase transaction list.
"""
_goto_link(chase_driver, "See activity")
time.sleep(10)
rows = chase_driver.find_elements_by_css_selector("tr.summary")
trans_list = []
for row in rows:
tds = row.find_elements_by_tag_name('td')
tds = tds[1:] # skip the link in first cell
trans_list.append([td.text for td in tds])
return trans_list | 2ac3d6de1cac0e28d2dd9a9d170cef7f1facf007 | 12,975 |
def loglikelihood(x, mean, var, pi):
"""
式(9.28)
"""
lkh = []
for mean_k, var_k, pi_k in zip(mean, var, pi):
lkh.append(pi_k * gaussian_pdf(x, mean_k, var_k))
return np.sum(np.log(np.sum(lkh, 0))) | d2355334b305f1bf2084efea3baee78daf06cc35 | 12,976 |
def calc_E_ST_GJ(E_star_ST):
"""基準一次エネルギー消費量(GJ/年)の計算 (2)
Args:
E_star_ST(float): 基準一次エネルギー消費量(J/年)
Returns:
float: 基準一次エネルギー消費量(GJ/年)
"""
# 小数点以下一位未満の端数があるときはこれを切り上げる
return ceil(E_star_ST / 100) / 10 | 06d7ade15d91c205bd9662dd41d218d8b7867a2f | 12,977 |
def next_line(grd_file):
"""
next_line
Function returns the next line in the file
that is not a blank line, unless the line is
'', which is a typical EOF marker.
"""
done = False
while not done:
line = grd_file.readline()
if line == '':
return line, False
elif line.strip():
return line, True | 337f188930a03142bae59cdb378b09f1ac5e2ecb | 12,978 |
def get_proto(proto):
"""
Returns a protocol number (in the /etc/protocols sense, e.g. 6 for
TCP) for the given input value. For the protocols that have
PROTO_xxx constants defined, this can be provided textually and
case-insensitively, otherwise the provided value gets converted to
an integer and returned.
Returns None if this conversion failed.
"""
protos = {
"ICMP": PROTO_ICMP,
"ICMP6": PROTO_ICMP6,
"SCTP": PROTO_SCTP,
"TCP": PROTO_TCP,
"UDP": PROTO_UDP,
}
try:
return protos[proto.upper()]
except (KeyError, AttributeError):
pass
try:
return int(proto)
except ValueError:
pass
return None | a3632e0731e4227020eb75d5ea27d211e27e188a | 12,980 |
def f5_update_policy_cookie_command(client: Client, policy_md5: str, cookie_id: str,
cookie_name: str,
perform_staging: bool, parameter_type: str,
enforcement_type: str,
attack_signatures_check: bool) -> CommandResults:
"""
Update a given cookie of a specific policy
Args:
client (Client): f5 client.
policy_md5 (str): MD5 hash of the policy.
cookie_id (str): ID of the cookie.
cookie_name (str): The new cookie name to add.
perform_staging (bool): Indicates if the user wishes the new file type to be at staging.
parameter_type (str): Type of the new parameter.
enforcement_type (str): Enforcement type.
attack_signatures_check (bool): Should attack signatures be checked. If enforcement type
is set to 'enforce', this field will not get any value.
"""
result = client.update_policy_cookie(policy_md5, cookie_id, cookie_name, perform_staging,
parameter_type, enforcement_type, attack_signatures_check)
outputs, headers = build_output(OBJECT_FIELDS, result)
readable_output = tableToMarkdown('f5 data for updating cookie:',
outputs, headers, removeNull=True)
command_results = CommandResults(
outputs_prefix='f5.Cookies',
outputs_key_field='id',
readable_output=readable_output,
outputs=remove_empty_elements(outputs),
raw_response=result
)
return command_results | 633015c3dc3c478e17975ea540a6e6ab46b710e1 | 12,981 |
def ping():
"""
Determine if the container is working and healthy. In this sample container, we declare
it healthy if we can load the model successfully.
:return:
"""
health = False
try:
health = model is not None # You can insert a health check here
except:
pass
status = 200 if health else 404
return flask.Response(response='\n', status=status, mimetype='application/json') | 96cc202cf4cf25dd6fb91ae29cac66667ed13d27 | 12,982 |
from .coo import COO
def random(
shape,
density=0.01,
random_state=None,
data_rvs=None,
format='coo'
):
""" Generate a random sparse multidimensional array
Parameters
----------
shape: Tuple[int]
Shape of the array
density: float, optional
Density of the generated array.
random_state : Union[numpy.random.RandomState, int], optional
Random number generator or random seed. If not given, the
singleton numpy.random will be used. This random state will be used
for sampling the sparsity structure, but not necessarily for sampling
the values of the structurally nonzero entries of the matrix.
data_rvs : Callable
Data generation callback. Must accept one single parameter: number of
:code:`nnz` elements, and return one single NumPy array of exactly
that length.
format: str
The format to return the output array in.
Returns
-------
SparseArray
The generated random matrix.
See Also
--------
:obj:`scipy.sparse.rand`
Equivalent Scipy function.
:obj:`numpy.random.rand`
Similar Numpy function.
Examples
--------
>>> from sparse import random
>>> from scipy import stats
>>> rvs = lambda x: stats.poisson(25, loc=10).rvs(x, random_state=np.random.RandomState(1))
>>> s = random((2, 3, 4), density=0.25, random_state=np.random.RandomState(1), data_rvs=rvs)
>>> s.todense() # doctest: +NORMALIZE_WHITESPACE
array([[[ 0, 0, 0, 0],
[ 0, 34, 0, 0],
[33, 34, 0, 29]],
<BLANKLINE>
[[30, 0, 0, 34],
[ 0, 0, 0, 0],
[ 0, 0, 0, 0]]])
"""
# Copied, in large part, from scipy.sparse.random
# See https://github.com/scipy/scipy/blob/master/LICENSE.txt
elements = np.prod(shape)
nnz = int(elements * density)
if random_state is None:
random_state = np.random
elif isinstance(random_state, Integral):
random_state = np.random.RandomState(random_state)
if data_rvs is None:
data_rvs = random_state.rand
# Use the algorithm from python's random.sample for k < mn/3.
if elements < 3 * nnz:
ind = random_state.choice(elements, size=nnz, replace=False)
else:
ind = np.empty(nnz, dtype=np.min_scalar_type(elements - 1))
selected = set()
for i in range(nnz):
j = random_state.randint(elements)
while j in selected:
j = random_state.randint(elements)
selected.add(j)
ind[i] = j
data = data_rvs(nnz)
ar = COO(ind[None, :], data, shape=nnz).reshape(shape)
return ar.asformat(format) | f62ba3afc168bf39734897291d094d43bd1ee7f1 | 12,983 |
from pathlib import Path
import hashlib
def file_md5_is_valid(fasta_file: Path, checksum: str) -> bool:
"""
Checks if the FASTA file matches the MD5 checksum argument.
Returns True if it matches and False otherwise.
:param fasta_file: Path object for the FASTA file.
:param checksum: MD5 checksum string.
:return: boolean indicating if the file validates.
"""
md5_hash = hashlib.md5()
with fasta_file.open(mode="rb") as fh:
# Read in small chunks to avoid memory overflow with large files.
while chunk := fh.read(8192):
md5_hash.update(chunk)
return md5_hash.hexdigest() == checksum | ec400afbe29d940d0638a581da7f2ee001b9e985 | 12,984 |
def combine_to_int(values):
"""Combine several byte values to an integer"""
multibyte_value = 0
for byte_id, byte in enumerate(values):
multibyte_value += 2**(4 * byte_id) * byte
return multibyte_value | 58ff7cbee356cdcbe5b26e973de16c5b1cc40afc | 12,985 |
import torch
def loss_fn(x, results, is_valtest=False, **kwargs):
"""
Loss weight (MCAE):
- sni: snippet reconstruction loss
- seg: segment reconstruction loss
- cont: smooth regularization
- reg: sparsity regularization
- con: constrastive loss
- cls: auxilliary classification loss <not used for MCAE-MP>
Loss weight (joint):
- skcon: contrastive loss on the concatenated representation of all joints
- skcls: auxilliary classification loss
"""
default_lsw = dict.fromkeys(
[
'sni', 'seg', 'cont', 'reg', 'con', 'skcon', 'skcls'
], 1.0)
loss_weights = kwargs.get('loss_weights', default_lsw)
losses = {}
mcae_losses = []
sk_pres = results['sk_pres']
sk_lgts = results['sk_lgts']
sk_y = kwargs.get('y', None)
if 'mcae' in results.keys():
mcae_results = results['mcae']
for r in mcae_results:
mcae_losses.append(
mcae_loss(r['x'], r, loss_weights=loss_weights, is_valtest=is_valtest))
for key in loss_weights.keys():
losses[key] = 0
if key in mcae_losses[0][0].keys():
for i in range(len(mcae_results)):
losses[key] += mcae_losses[i][0][key]
else:
losses.pop(key)
elif 'mcae_3d' in results.keys():
r = results['mcae_3d']
mcae_loss_ = mcae_loss(r['x'], r, loss_weights=loss_weights, is_valtest=is_valtest)[0]
for key in loss_weights.keys():
losses[key] = 0
if key in mcae_loss_.keys():
losses[key] += mcae_loss_[key]
else:
losses.pop(key)
if loss_weights.get('skcon', 0) > 0 and not is_valtest:
B = sk_pres.shape[0]
_L = int(B/2)
tau = 0.1
trj_pres = sk_pres.reshape(B, -1)
ori, aug = trj_pres.split(_L, 0)
dist_grid = 1 - cosine_distance(ori, aug)
dist_grid_exp = torch.exp(dist_grid/tau)
losses['skcon'] = -torch.log(
torch.diag(dist_grid_exp) / dist_grid_exp.sum(1)).mean()
if loss_weights.get('skcls', 0) > 0:
losses['skcls'] = F.nll_loss(F.log_softmax(sk_lgts, -1), sk_y)
return losses, default_lsw | ef5953c3350952a1083aabaa8f656834a32ae17c | 12,986 |
def _as_uint32(x: int) -> QVariant:
"""Convert the given int to an uint32 for DBus."""
variant = QVariant(x)
successful = variant.convert(QVariant.UInt)
assert successful
return variant | 08de1fccf4625485fab82c2569932ffd3e006541 | 12,987 |
def svcs_tang_u(Xcp,Ycp,Zcp,gamma_t,R,m,Xcyl,Ycyl,Zcyl,ntheta=180, Ground=False):
"""
Computes the velocity field for nCyl*nr cylinders, extending along z:
nCyl: number of main cylinders
nr : number of concentric cylinders within a main cylinder
INPUTS:
Xcp,Ycp,Zcp: cartesian coordinates of control points where the velocity field is not be computed
gamma_t: array of size (nCyl,nr), distribution of gamma for each cylinder as function of radius
R : array of size (nCyl,nr),
m : array of size (nCyl,nr),
Xcyl,Ycyl,Zcyl: array of size nCyl) giving the center of the rotor
Ground: boolean, True if ground effect is to be accounted for
All inputs (except Ground) should be numpy arrays
"""
Xcp=np.asarray(Xcp)
Ycp=np.asarray(Ycp)
Zcp=np.asarray(Zcp)
ux = np.zeros(Xcp.shape)
uy = np.zeros(Xcp.shape)
uz = np.zeros(Xcp.shape)
nCyl,nr = R.shape
print('Tang. (skewed) ',end='')
for i in np.arange(nCyl):
Xcp0,Ycp0,Zcp0=Xcp-Xcyl[i],Ycp-Ycyl[i],Zcp-Zcyl[i]
if Ground:
YcpMirror = Ycp0+2*Ycyl[i]
Ylist = [Ycp0,YcpMirror]
else:
Ylist = [Ycp0]
for iy,Y in enumerate(Ylist):
for j in np.arange(nr):
if iy==0:
print('.',end='')
else:
print('m',end='')
if np.abs(gamma_t[i,j]) > 0:
ux1,uy1,uz1 = svc_tang_u(Xcp0,Y,Zcp0,gamma_t[i,j],R[i,j],m[i,j],ntheta=ntheta,polar_out=False)
ux = ux + ux1
uy = uy + uy1
uz = uz + uz1
print('')
return ux,uy,uz | f5ee6309a01c493f930086a92db44c93cb33cbba | 12,988 |
def np_to_o3d_images(images):
"""Convert numpy image list to open3d image list
Parameters
----------
images : list[numpy.ndarray]
Returns
o3d_images : list[open3d.open3d.geometry.Image]
-------
"""
o3d_images = []
for image in images:
image = np_to_o3d_image(image)
o3d_images.append(image)
return o3d_images | 419f59c47cba9c22595c8d16ca0d35f105ec4882 | 12,989 |
def compute_mse(y_true, y_pred):
"""ignore zero terms prior to comparing the mse"""
mask = np.nonzero(y_true)
mse = mean_squared_error(y_true[mask], y_pred[mask])
return mse | 3c594c4105f99d8088665b4c0a7345807a667e55 | 12,990 |
def image2d(math_engine, batch_len, batch_width, height, width, channels, dtype="float32"):
"""Creates a blob with two-dimensional multi-channel images.
:param neoml.MathEngine.MathEngine math_engine: the math engine that works with this blob.
:param batch_len: the **BatchLength** dimension of the new blob.
:type batch_len: int, > 0
:param batch_width: the **BatchWidth** dimension of the new blob.
:type batch_width: int, > 0
:param height: the image height.
:type height: int, > 0
:param width: the image width.
:type width: int, > 0
:param channels: the number of channels in the image format.
:type channels: int, > 0
:param dtype: the type of data in the blob.
:type dtype: str, {"float32", "int32"}, default="float32"
"""
if dtype != "float32" and dtype != "int32":
raise ValueError('The `dtype` must be one of {`float32`, `int32`}.')
if batch_len < 1:
raise ValueError('The `batch_len` must be > 0.')
if batch_width < 1:
raise ValueError('The `batch_width` must be > 0.')
if height < 1:
raise ValueError('The `height` must be > 0.')
if width < 1:
raise ValueError('The `width` must be > 0.')
if channels < 1:
raise ValueError('The `channels` must be > 0.')
shape = np.array((batch_len, batch_width, 1, height, width, 1, channels), dtype=np.int32, copy=False)
return Blob(PythonWrapper.tensor(math_engine._internal, shape, dtype)) | d816388f619ac1e09e2bfc705ddab75a490ec023 | 12,991 |
def error_response(error, message):
"""
returns error response
"""
data = {
"status": "error",
"error": error,
"message": message
}
return data | f3e52ea42cb48378f08ecb65f58d2291960e6488 | 12,992 |
import tqdm
def graph_to_text(
graph: MultiDiGraph, quoting: bool = True, verbose: bool = True
) -> str:
"""Turns a graph into
its text representation.
Parameters
----------
graph : MultiDiGraph
Graph to text.
quoting : bool
If true, quotes will be added.
verbose : bool
If true, a progress bar will be displayed.
Examples
--------
>>> import cfpq_data
>>> g = cfpq_data.labeled_cycle_graph(2, edge_label="a", verbose=False)
>>> cfpq_data.graph_to_text(g, verbose=False)
"'0' 'a' '1'\\n'1' 'a' '0'\\n"
>>> cfpq_data.graph_to_text(g, quoting=False, verbose=False)
'0 a 1\\n1 a 0\\n'
Returns
-------
text : str
Graph text representation.
"""
text = ""
for u, v, edge_labels in tqdm(
graph.edges(data=True), disable=not verbose, desc="Generation..."
):
if len(edge_labels.values()) > 0:
for label in edge_labels.values():
if quoting:
text += f"'{u}' '{label}' '{v}'\n"
else:
text += f"{u} {label} {v}\n"
else:
if quoting:
text += f"'{u}' '{v}'\n"
else:
text += f"{u} {v}\n"
return text | a3ccf008f1ebcc62cfe1c8e6620923c665de8768 | 12,993 |
def test_has_valid_dir_structure():
"""Check if the specified dir structure is valid"""
def recurse_contents(contents):
if contents is None:
return None
else:
for key, value in contents.items():
assert(isinstance(key, str))
if value is None:
return None
elif "dir" in value:
recurse_contents(value["dir"])
elif "file" in value:
assert(value["file"] is None or isinstance(value["file"], str) or callable(value["file"]))
if callable(value["file"]):
generator = value["file"]
assert(isinstance(generator("test"), str))
else:
raise Exception("""
Every entry in the directory structure must be
either a directory or a file.
""")
recurse_contents(skeleton.dir_structure) | f2dc8dcb38dc5873dea8500391a1733f9f8a18d1 | 12,994 |
def getFBA(fba):
"""AC factory.
reads a fileobject and creates a dictionary for easy insertation
into a postgresdatabase. Uses Ohlbergs routines to read the files (ACfile)
"""
word = fba.getSpectrumHead()
while word is not None:
stw = fba.stw
mech = fba.Type(word)
datadict = {
'stw': stw,
'mech_type': mech,
}
return datadict
raise EOFError | e5c5f52fe831938400eec5ae15c043ecbf8cf7d1 | 12,995 |
def logtimestamp():
"""
returns a formatted datetime object with the curren year, DOY, and UT
"""
return DT.datetime.utcnow().strftime("%Y-%j-%H:%M:%S") | 71b204c473d8e6a4868d966877dd61909252e891 | 12,996 |
def get_most_common_non_ascii_char(file_path: str) -> str:
"""Return first most common non ascii char"""
with open(file_path, encoding="raw_unicode_escape") as f:
non_ascii = {}
for line in f:
for char in line:
if not char.isascii():
if char in non_ascii:
non_ascii[char] += 1
else:
non_ascii[char] = 1
if non_ascii:
return max(non_ascii, key=non_ascii.get)
else:
return "No non ascii chars in the file" | 5280b637206964d6b386478ddbaeb6ad69f92c8c | 12,997 |
def compute_noise_from_target_epsilon(
target_epsilon,
target_delta,
epochs,
batch_size,
dataset_size,
alphas=None,
approx_ratio=0.01,
):
"""
Takes a target epsilon (eps) and some hyperparameters.
Returns a noise scale that gives an epsilon in [0.99 eps, eps].
The approximation ratio can be tuned.
If alphas is None, we'll explore orders.
"""
steps = compute_steps(epochs, batch_size, dataset_size)
sampling_rate = batch_size / dataset_size
if alphas is None:
alphas = ALPHAS
def get_eps(noise):
rdp = privacy_analysis.compute_rdp(sampling_rate, noise, steps, alphas)
epsilon, order = privacy_analysis.get_privacy_spent(
alphas, rdp, delta=target_delta
)
return epsilon
# Binary search bounds
noise_min = MIN_NOISE
noise_max = MAX_NOISE
# Start with the smallest epsilon possible with reasonable noise
candidate_noise = noise_max
candidate_eps = get_eps(candidate_noise)
if candidate_eps > target_epsilon:
raise ("Cannot reach target eps. Try to increase MAX_NOISE.")
# Search up to approx ratio
while (
candidate_eps < (1 - approx_ratio) * target_epsilon
or candidate_eps > target_epsilon
):
if candidate_eps < (1 - approx_ratio) * target_epsilon:
noise_max = candidate_noise
else:
noise_min = candidate_noise
candidate_noise = (noise_max + noise_min) / 2
candidate_eps = get_eps(candidate_noise)
print("Use noise {} for epsilon {}".format(candidate_noise, candidate_eps))
return candidate_noise | 60bddeaca8e772fa15582fe87516f4e5c5284b75 | 12,998 |
def cart2pol(x, y):
"""
author : Dr. Schaeffer
"""
rho = np.sqrt(x**2 + y**2)
phi = np.arctan2(y, x)
return(rho, phi) | 490e839b9a7c7e369643c27df3bbf4a6cd6779ba | 12,999 |
def requires_site(site):
"""Skip test based on where it is being run"""
skip_it = bool(site != SITE)
return pytest.mark.skipif(skip_it,
reason='SITE is not %s.' % site) | b436e6390828af2ffdca6e972b5a55fccafed64b | 13,000 |
def iou(bbox_1, bbox_2):
"""Computes intersection over union between two bounding boxes.
Parameters
----------
bbox_1 : np.ndarray
First bounding box, of the form (x_min, y_min, x_max, y_max).
bbox_2 : np.ndarray
Second bounding box, of the form (x_min, y_min, x_max, y_max).
Returns
-------
float
Intersection over union value between both bounding boxes.
"""
x_min = np.maximum(bbox_1[0], bbox_2[0])
y_min = np.maximum(bbox_1[1], bbox_2[1])
x_max = np.minimum(bbox_1[2], bbox_2[2])
y_max = np.minimum(bbox_1[3], bbox_2[3])
width = np.maximum(0.0, x_max - x_min)
height = np.maximum(0.0, y_max - y_min)
intersection = width * height
return (
intersection
) / (
(bbox_1[2] - bbox_1[0]) * (bbox_1[3] - bbox_1[1])
+ (bbox_2[2] - bbox_2[0]) * (bbox_2[3] - bbox_2[1])
- intersection
) | c076290d386a2c6740f7cd6aaee18a42f9c850ce | 13,002 |
def GetIntensityArray(videofile, threshold, scale_percent):
"""Finds pixel coordinates within a videofile (.tif, .mp4) for pixels
that are above a brightness threshold, then accumulates the
brightness event intensities for each coordinate,
outputting it as a 2-D array in the same size as the video frames
Input:
-videofile: file containing an image stack of fluorescent events
-threshold: minimum brightness for detection
-scale_percent: helps resize image for faster computing speeds
Output: 2-d Array of accumulated intensity values for each pixel above
a calculated brightness threshold in the video"""
# Reading video file and convert to grayscale
ret, img = cv2.imreadmulti(videofile, flags=cv2.IMREAD_GRAYSCALE)
# Setting Resizing Dimensions
width = int(img[0].shape[1] * scale_percent / 100)
height = int(img[0].shape[0] * scale_percent / 100)
dim = (width, height)
img_resized = cv2.resize(img[0], dim, interpolation=cv2.INTER_AREA)
# Creating empty array to add intensity values to
int_array = np.zeros(np.shape(img_resized))
for frame in range(len(img)):
# Resize Frame
frame_resized = cv2.resize(img[frame],
dim, interpolation=cv2.INTER_AREA)
intensity = GetIntensityValues(frame_resized, threshold)
if len(np.where(intensity >= 1)) > 0:
# Get coordinates of the single pixel counts
row, col = np.where(intensity >= 1)
for i in range(len(row)):
for j in range(len(col)):
# Add single count to freq_array in location of event
int_array[row[i], col[j]] += intensity[row[i], col[j]]
else:
pass
return int_array | 720b50da3eb04698c62b2afa67ca3cd7b4f3661d | 13,003 |
def _check_data(handler, data):
"""Check the data."""
if 'latitude' not in data or 'longitude' not in data:
handler.write_text("Latitude and longitude not specified.",
HTTP_UNPROCESSABLE_ENTITY)
_LOGGER.error("Latitude and longitude not specified.")
return False
if 'device' not in data:
handler.write_text("Device id not specified.",
HTTP_UNPROCESSABLE_ENTITY)
_LOGGER.error("Device id not specified.")
return False
if 'id' not in data:
handler.write_text("Location id not specified.",
HTTP_UNPROCESSABLE_ENTITY)
_LOGGER.error("Location id not specified.")
return False
if 'trigger' not in data:
handler.write_text("Trigger is not specified.",
HTTP_UNPROCESSABLE_ENTITY)
_LOGGER.error("Trigger is not specified.")
return False
return True | 829681db92b0b7a6368ca143b6c656b46c972430 | 13,004 |
import requests
from bs4 import BeautifulSoup
def get_soup(page_url):
""" Returns BeautifulSoup object of the url provided """
try:
req = requests.get(page_url)
except Exception:
print('Failed to establish a connection with the website')
return
if req.status_code == 404:
print('Page not found')
return
content = req.content
soup = BeautifulSoup(content, 'html.parser')
return soup | d837e3b6aa6184285857428b2c796172379f3a1f | 13,005 |
def foreign_key_constraint_sql(table):
"""Return the SQL to add foreign key constraints to a given table"""
sql = ''
fk_names = list(table.foreign_keys.keys())
for fk_name in sorted(fk_names):
foreign_key = table.foreign_keys[fk_name]
sql += "FOREIGN KEY({fn}) REFERENCES {tn}({kc}), ".format(
fn=foreign_key.from_col,
tn=foreign_key.to_table.name,
kc=foreign_key.to_col
)
return sql | 0883050d2b9d302ab9099ef27abd400e4d4fe69e | 13,006 |
from typing import Optional
def expandDimConst(term: AST.PPTerm,
ntId: int) -> Optional[AST.PPTerm]:
"""
Expand dimension constant to integer constants (Required for fold zeros)
"""
nt = ASTUtils.getNthNT(term, ntId)
if type(nt.sort) != AST.PPDimConst:
return None
subTerm = AST.PPIntConst(nt.sort.value)
termExpanded = ReprUtils.replaceNthNT(term, ntId, subTerm)
return termExpanded | b048d8ed0ec743a88c17a1f120a57d5e548e7d69 | 13,007 |
from scipy.optimize import minimize_scalar
def _fit_amplitude_scipy(counts, background, model, optimizer='Brent'):
"""
Fit amplitude using scipy.optimize.
Parameters
----------
counts : `~numpy.ndarray`
Slice of count map.
background : `~numpy.ndarray`
Slice of background map.
model : `~numpy.ndarray`
Model template to fit.
flux : float
Starting value for the fit.
Returns
-------
amplitude : float
Fitted flux amplitude.
niter : int
Number of function evaluations needed for the fit.
"""
args = (counts, background, model)
amplitude_min, amplitude_max = _amplitude_bounds_cython(counts, background, model)
try:
result = minimize_scalar(f_cash, bracket=(amplitude_min, amplitude_max),
args=args, method=optimizer, tol=10)
return result.x, result.nfev
except ValueError:
result = minimize_scalar(f_cash, args=args, method=optimizer, tol=0.1)
return result.x, result.nfev | 51faafd7a81ff70196075bacac6b36db6b7e09f8 | 13,008 |
from pathlib import Path
def get_world_paths() -> list:
"""
Returns a list of paths to the worlds on the server.
"""
server_dir = Path(__file__).resolve().parents[1]
world_paths = []
for p in server_dir.iterdir():
if p.is_dir and (p / "level.dat").is_file():
world_paths.append(p.absolute())
return world_paths | bf1c23c6a1c928dc66470db2e11b49ad2fc9e5d9 | 13,010 |
def derivative_p(α_L, α_G, ρ_G, v_L, v_G): # (1)
"""
Calculates pressure spatial derivative to be pluged into the expression for
pressure at the next spatial step (see first equation of the model). It
returns the value of pressure spatial derivative at the current time step
and, hence, takes as arguments volume fractions, velocities, and gas density
at the current spatial step.
Args:
α_L (float) - liquid phase volume fraction. Can assume any value
from 0 to 1.
α_G (float) - gaseous phase volume fraction. Can assume any value
from 0 to 1.
ρ_G (float) - gaseous phase density. Can assume any positive value.
v_L (float) - liquid phase velocity. Can assume either positive or
negative values.
v_G (float) - gaseous phase velocity. Can assume any positive value.
Returns:
float: the return value (pressure derivative at the current spatial
step). Can assume any value from negative infinity to 0.
"""
derivative_p = (-1)*(ρ_L*α_L + ρ_G*α_G) \
* ( g + (2*f/D) * (α_L*v_L + α_G*v_G)**2 ) # line continuation operator
return(derivative_p) | e2aa8a4967b121b798058aa963b0685080b7eb8b | 13,011 |
def fit_sigmoid(colors, a=0.05):
"""Fits a sigmoid to raw contact temperature readings from the ContactPose dataset. This function is copied from that repo"""
idx = colors > 0
ci = colors[idx]
x1 = min(ci) # Find two points
y1 = a
x2 = max(ci)
y2 = 1-a
lna = np.log((1 - y1) / y1)
lnb = np.log((1 - y2) / y2)
k = (lnb - lna) / (x1 - x2)
mu = (x2*lna - x1*lnb) / (lna - lnb)
ci = np.exp(k * (ci-mu)) / (1 + np.exp(k * (ci-mu))) # Apply the sigmoid
colors[idx] = ci
return colors | 2024e32cd454cb27cf3d0fef9f270a22abba5ea0 | 13,012 |
def deprecated(func):
"""Decorator for reporting deprecated function calls
Use this decorator sparingly, because we'll be charged if we make too many Rollbar notifications
"""
@wraps(func)
def wrapped(*args, **kwargs):
# try to get a request, may not always succeed
request = get_current_request()
# notify a maximum of once per function per request/session
if request:
if DEPRECATED_ROLLBAR_NOTIFIED not in request.session:
deprecated_notifications = {}
request.session[DEPRECATED_ROLLBAR_NOTIFIED] = deprecated_notifications
deprecated_notifications = request.session[DEPRECATED_ROLLBAR_NOTIFIED]
key = '%s' % func
# first get it
already_notified = deprecated_notifications.get(key, False)
# then mark it
deprecated_notifications[key] = True
else:
already_notified = False
if not already_notified:
rollbar.report_message('Deprecated function call warning: %s' % func, 'warning', request)
return func(*args, **kwargs)
return wrapped | d01f53acd584faa3c3b15771c76a00210ffbeb83 | 13,013 |
def stellar_mags_scatter_cube_pair(file_pair, min_relative_flux=0.5, save=False):
"""Return the scatter in stellar colours within a star datacube pair."""
hdulist_pair = [pf.open(path, 'update') for path in file_pair]
flux = np.vstack(
[hdulist[0].data for hdulist in hdulist_pair])
noise = np.sqrt(np.vstack(
[hdulist['VARIANCE'].data for hdulist in hdulist_pair]))
wavelength = np.hstack(
[get_coords(hdulist[0].header, 3) for hdulist in hdulist_pair])
smoothed_flux = flux.copy()
smoothed_flux[~np.isfinite(smoothed_flux)] = 0.0
smoothed_flux = median_filter(smoothed_flux, (201, 1, 1))
image = np.sum(smoothed_flux, 0)
keep = (image >= (min_relative_flux * np.max(image)))
flux = flux[:, keep]
noise = noise[:, keep]
mags = []
for flux_i, noise_i in zip(flux.T, noise.T):
mags_i = measure_mags(flux_i, noise_i, wavelength)
mags.append([mags_i['g'], mags_i['r']])
mags = np.array(mags)
colour = mags[:, 0] - mags[:, 1]
scatter = np.std(colour)
if save:
for hdulist in hdulist_pair:
hdulist[0].header['COLORSTD'] = (
scatter, 'Scatter in g-r within cubes')
hdulist.flush()
for hdulist in hdulist_pair:
hdulist.close()
return scatter | b1f823a9ab33f7deadb1651aaa728690b0a08cf6 | 13,016 |
import hmac
import hashlib
def is_valid_webhook_request(webhook_token: str, request_body: str, webhook_signature_header: str) -> bool:
"""This method verifies that requests to your Webhook URL are genuine and from Buycoins.
Args:
webhook_token: your webhook token
request_body: the body of the request
webhook_signature_header: the X-Webhook-Signature header from BuyCoins
Returns:
a Boolean stating whether the request is valid or not
"""
hmac_request_body = hmac.new(webhook_token.encode(), request_body.encode(), hashlib.sha1)
return hmac.compare_digest(hmac_request_body.hexdigest(), webhook_signature_header) | 1ce1ef0a9e1386ebbea7773d8cd9d40df2544792 | 13,018 |
import torch
def logsigsoftmax(logits):
"""
Computes sigsoftmax from the paper - https://arxiv.org/pdf/1805.10829.pdf
"""
max_values = torch.max(logits, 1, keepdim=True)[0]
exp_logits_sigmoided = torch.exp(logits - max_values) * torch.sigmoid(logits)
sum_exp_logits_sigmoided = exp_logits_sigmoided.sum(1, keepdim=True)
log_probs = logits - max_values + F.logsigmoid(logits) - torch.log(sum_exp_logits_sigmoided)
return log_probs | d7f6c2ef4279d511ff81fc30cfa1db5875c5ea4a | 13,019 |
def multi(dispatch_fn):
"""Initialise function as a multimethod"""
def _inner(*args, **kwargs):
return _inner.__multi__.get(
dispatch_fn(*args, **kwargs),
_inner.__multi_default__
)(*args, **kwargs)
_inner.__multi__ = {}
_inner.__multi_default__ = lambda *args, **kwargs: None # Default default
return _inner | 29023826b3e67ccc39a458fc90bd817cd725c35f | 13,020 |
def choose_key(somemap, default=0, prompt="choose", input=input, error=default_error,
lines=LINES, columns=COLUMNS):
"""Select a key from a mapping.
Returns the key selected.
"""
keytype = type(print_menu_map(somemap, lines=lines, columns=columns))
while 1:
try:
userinput = get_input(prompt, default, input)
except EOFError:
return default
if not userinput:
return default
try:
idx = keytype(userinput)
except ValueError:
error("Not a valid entry. Please try again.")
continue
if idx not in somemap:
error("Not a valid selection. Please try again.")
continue
return idx | d3c2438c85afae48980f772a06a7e622866197c5 | 13,021 |
from typing import Tuple
def predicted_orders(
daily_order_summary: pd.DataFrame, order_forecast_model: Tuple[float, float]
) -> pd.DataFrame:
"""Predicted orders for the next 30 days based on the fit paramters"""
a, b = order_forecast_model
start_date = daily_order_summary.order_date.max()
future_dates = pd.date_range(start=start_date, end=start_date + pd.DateOffset(days=30))
predicted_data = model_func(x=future_dates.astype(np.int64), a=a, b=b)
return pd.DataFrame({"order_date": future_dates, "num_orders": predicted_data}) | 48f79b1076c32f93bdf148d1b986c6892cd3a8af | 13,023 |
import torch
import tqdm
def eval_loop(model, ldr, device):
"""Runs the evaluation loop on the input data `ldr`.
Args:
model (torch.nn.Module): model to be evaluated
ldr (torch.utils.data.DataLoader): evaluation data loader
device (torch.device): device inference will be run on
Returns:
list: list of labels, predictions, and confidence levels for each example in
the dataloader
"""
all_preds = []; all_labels = []; all_preds_dist=[]
all_confidence = []
with torch.no_grad():
for batch in tqdm.tqdm(ldr):
batch = list(batch)
inputs, targets, inputs_lens, targets_lens = model.collate(*batch)
inputs = inputs.to(device)
probs, rnn_args = model(inputs, softmax=True)
probs = probs.data.cpu().numpy()
preds_confidence = [decode(p, beam_size=3, blank=model.blank)[0] for p in probs]
preds = [x[0] for x in preds_confidence]
confidence = [x[1] for x in preds_confidence]
all_preds.extend(preds)
all_confidence.extend(confidence)
all_labels.extend(batch[1])
return list(zip(all_labels, all_preds, all_confidence)) | ca96192b1cd104ea3c86b5c5234ab5bf708613c8 | 13,025 |
def get_total_frts():
"""
Get total number of FRTs for a single state.
Arguments:
Returns:
{JSON} -- Returns headers of the columns and data in list
"""
query = """
SELECT
place.state AS state
, COUNT(DISTINCT frt.id) AS state_total
FROM
panoptic.place AS place
LEFT JOIN
panoptic.frt_place_link AS link
ON
place.id = link.place__key
LEFT JOIN
panoptic.frt AS frt
ON
link.frt__key = frt.id
GROUP BY
place.state
"""
headers, data = execute_select_query(query)
results = []
while data:
results.append(dict(zip(headers, data.pop())))
return results | 0f054ef795f09ea01b28c139fd353bf237ed10a4 | 13,026 |
def newton_sqrt(n: float, a: float) -> float:
"""Approximate sqrt(n) starting from a, using the Newton-Raphson method."""
r = within(0.00001, repeat_f(next_sqrt_approx(n), a))
return next(r) | 4d7186bd55e4f4d4511078bcb0fff4959a182a3b | 13,027 |
def prismatic(xyz, rpy, axis, qi):
"""Returns the dual quaternion for a prismatic joint.
"""
# Joint origin rotation from RPY ZYX convention
roll, pitch, yaw = rpy[0], rpy[1], rpy[2]
# Origin rotation from RPY ZYX convention
cr = cs.cos(roll/2.0)
sr = cs.sin(roll/2.0)
cp = cs.cos(pitch/2.0)
sp = cs.sin(pitch/2.0)
cy = cs.cos(yaw/2.0)
sy = cs.sin(yaw/2.0)
# The quaternion associated with the origin rotation
# Note: quat = w + ix + jy + kz
x_or = cy*sr*cp - sy*cr*sp
y_or = cy*cr*sp + sy*sr*cp
z_or = sy*cr*cp - cy*sr*sp
w_or = cy*cr*cp + sy*sr*sp
# Joint origin translation as a dual quaternion
x_ot = 0.5*xyz[0]*w_or + 0.5*xyz[1]*z_or - 0.5*xyz[2]*y_or
y_ot = - 0.5*xyz[0]*z_or + 0.5*xyz[1]*w_or + 0.5*xyz[2]*x_or
z_ot = 0.5*xyz[0]*y_or - 0.5*xyz[1]*x_or + 0.5*xyz[2]*w_or
w_ot = - 0.5*xyz[0]*x_or - 0.5*xyz[1]*y_or - 0.5*xyz[2]*z_or
Q_o = [x_or, y_or, z_or, w_or, x_ot, y_ot, z_ot, w_ot]
# Joint displacement orientation is just identity
x_jr = 0.0
y_jr = 0.0
z_jr = 0.0
w_jr = 1.0
# Joint displacement translation along axis
x_jt = qi*axis[0]/2.0
y_jt = qi*axis[1]/2.0
z_jt = qi*axis[2]/2.0
w_jt = 0.0
Q_j = [x_jr, y_jr, z_jr, w_jr, x_jt, y_jt, z_jt, w_jt]
# Get resulting dual quaternion
return product(Q_o, Q_j) | 898db39d01a7b26daf2657c69c42af12bd8fef60 | 13,028 |
def markov_chain(bot_id, previous_posts):
"""
Caches are triplets of consecutive words from the source
Beginning=True means the triplet was the beinning of a messaeg
Starts with a random choice from the beginning caches
Then makes random choices from the all_caches set, constructing a markov chain
'randomness' value determined by totalling the number of words that were chosen randomly
"""
bot = TwitterBot.objects.get(id=bot_id)
beginning_caches = bot.twitterpostcache_set.filter(beginning=True)
if not len(beginning_caches):
print "Not enough data"
return
# Randomly choose one of the beginning caches to start with
seed_index = random.randint(0, len(beginning_caches) - 1)
seed_cache = beginning_caches[seed_index]
# Start the chain
new_markov_chain = [seed_cache.word1, seed_cache.word2]
# Add words one by one to complete the markov chain
all_caches = bot.twitterpostcache_set.all()
next_cache = seed_cache
while next_cache:
new_markov_chain.append(next_cache.final_word)
all_next_caches = all_caches.filter(
word1=next_cache.word2, word2=next_cache.final_word
)
if len(all_next_caches):
next_cache = random.choice(all_next_caches)
else:
all_next_caches = all_caches.filter(word1=next_cache.final_word)
if len(all_next_caches):
next_cache = random.choice(all_next_caches)
new_markov_chain.append(next_cache.word2)
else:
next_cache = None
return " ".join(new_markov_chain) | 652690d61c97de420e88f53cfd05c5d59e9229af | 13,029 |
def _assign_data_radial(root, sweep="sweep_1"):
"""Assign from CfRadial1 data structure.
Parameters
----------
root : xarray.Dataset
Dataset of CfRadial1 file
sweep : str, optional
Sweep name to extract, default to first sweep. If None, all sweeps are
extracted into a list.
"""
var = root.variables.keys()
remove_root = var ^ root_vars
remove_root &= var
root1 = root.drop_vars(remove_root).rename({"fixed_angle": "sweep_fixed_angle"})
sweep_group_name = []
for i in range(root1.dims["sweep"]):
sweep_group_name.append(f"sweep_{i + 1}")
# keep all vars for now
# keep_vars = sweep_vars1 | sweep_vars2 | sweep_vars3
# remove_vars = var ^ keep_vars
# remove_vars &= var
remove_vars = {}
data = root.drop_vars(remove_vars)
data.attrs = {}
start_idx = data.sweep_start_ray_index.values
end_idx = data.sweep_end_ray_index.values
data = data.drop_vars({"sweep_start_ray_index", "sweep_end_ray_index"})
sweeps = []
for i, sw in enumerate(sweep_group_name):
if sweep is not None and sweep != sw:
continue
tslice = slice(start_idx[i], end_idx[i] + 1)
ds = data.isel(time=tslice, sweep=slice(i, i + 1)).squeeze("sweep")
ds.sweep_mode.load()
sweep_mode = ds.sweep_mode.item().decode()
dim0 = "elevation" if sweep_mode == "rhi" else "azimuth"
ds = ds.swap_dims({"time": dim0})
ds = ds.rename({"time": "rtime"})
ds.attrs["fixed_angle"] = np.round(ds.fixed_angle.item(), decimals=1)
time = ds.rtime[0].reset_coords(drop=True)
# get and delete "comment" attribute for time variable
key = [key for key in time.attrs.keys() if "comment" in key]
for k in key:
del time.attrs[k]
coords = {
"longitude": root1.longitude,
"latitude": root1.latitude,
"altitude": root1.altitude,
"azimuth": ds.azimuth,
"elevation": ds.elevation,
"sweep_mode": sweep_mode,
"time": time,
}
ds = ds.assign_coords(**coords)
sweeps.append(ds)
return sweeps | 7734917c8b4aced4812896e3269981c984241202 | 13,031 |
def get_memory_usage():
"""This method returns the percentage of total memory used in this machine"""
stats = get_memstats()
mfree = float(stats['buffers']+stats['cached']+stats['free'])
return 1-(mfree/stats['total']) | 27bcf8866b6b57253acf6a282265949dcfd3af61 | 13,032 |
def gamma0(R, reg=1e-13, symmetrize=True):
"""Integrals over the edges of a triangle called gamma_0 (line charge potentials).
**NOTE: MAY NOT BE VERY PRECISE FOR POINTS DIRECTLY AT TRIANGLE
EDGES.**
Parameters
----------
R : (N, 3, 3) array of points (Neval, Nverts, xyz)
Returns
-------
res: array (Neval, Nverts)
The analytic integrals for each vertex/edge
"""
edges = np.roll(R[0], 1, -2) - np.roll(R[0], 2, -2)
# dotprods1 = np.sum(np.roll(R, 1, -2)*edges, axis=-1)
# dotprods2 = np.sum(np.roll(R, 2, -2)*edges, axis=-1)
dotprods1 = np.einsum("...i,...i", np.roll(R, 1, -2), edges)
dotprods2 = np.einsum("...i,...i", np.roll(R, 2, -2), edges)
en = norm(edges)
del edges
n = norm(R)
# Regularize s.t. neither the denominator or the numerator can be zero
# Avoid numerical issues directly at the edge
nn1 = np.roll(n, 2, -1) * en
nn2 = np.roll(n, 1, -1) * en
res = np.log((nn1 + dotprods2 + reg) / (nn2 + dotprods1 + reg))
# Symmetrize the result since on the negative extension of the edge
# there's division of two small values resulting numerical instabilities
# (also incompatible with adding the reg value)
if symmetrize:
res2 = -np.log((nn1 - dotprods2 + reg) / (nn2 - dotprods1 + reg))
res = np.where(dotprods1 + dotprods2 > 0, res, res2)
res /= en
return -res | c3ed9c624a5f14922d3c76a3eb2ae2f616f82cac | 13,033 |
def is_even(x):
""" True if obj is even. """
return (x % 2) == 0 | f19563063515eb4d39b8b607cf68f6f188af409e | 13,034 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.