repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
PmagPy/PmagPy | dialogs/drop_down_menus2.py | Menus.add_drop_down | def add_drop_down(self, col_number, col_label):
"""
Add a correctly formatted drop-down-menu for given col_label, if required.
Otherwise do nothing.
"""
if col_label in ['magic_method_codes', 'magic_method_codes++']:
self.add_method_drop_down(col_number, col_label)
... | python | def add_drop_down(self, col_number, col_label):
"""
Add a correctly formatted drop-down-menu for given col_label, if required.
Otherwise do nothing.
"""
if col_label in ['magic_method_codes', 'magic_method_codes++']:
self.add_method_drop_down(col_number, col_label)
... | [
"def",
"add_drop_down",
"(",
"self",
",",
"col_number",
",",
"col_label",
")",
":",
"if",
"col_label",
"in",
"[",
"'magic_method_codes'",
",",
"'magic_method_codes++'",
"]",
":",
"self",
".",
"add_method_drop_down",
"(",
"col_number",
",",
"col_label",
")",
"if"... | Add a correctly formatted drop-down-menu for given col_label, if required.
Otherwise do nothing. | [
"Add",
"a",
"correctly",
"formatted",
"drop",
"-",
"down",
"-",
"menu",
"for",
"given",
"col_label",
"if",
"required",
".",
"Otherwise",
"do",
"nothing",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/drop_down_menus2.py#L90-L123 |
PmagPy/PmagPy | dialogs/drop_down_menus2.py | Menus.add_method_drop_down | def add_method_drop_down(self, col_number, col_label):
"""
Add drop-down-menu options for magic_method_codes columns
"""
if self.data_type == 'age':
method_list = vocab.age_methods
elif '++' in col_label:
method_list = vocab.pmag_methods
elif self.... | python | def add_method_drop_down(self, col_number, col_label):
"""
Add drop-down-menu options for magic_method_codes columns
"""
if self.data_type == 'age':
method_list = vocab.age_methods
elif '++' in col_label:
method_list = vocab.pmag_methods
elif self.... | [
"def",
"add_method_drop_down",
"(",
"self",
",",
"col_number",
",",
"col_label",
")",
":",
"if",
"self",
".",
"data_type",
"==",
"'age'",
":",
"method_list",
"=",
"vocab",
".",
"age_methods",
"elif",
"'++'",
"in",
"col_label",
":",
"method_list",
"=",
"vocab... | Add drop-down-menu options for magic_method_codes columns | [
"Add",
"drop",
"-",
"down",
"-",
"menu",
"options",
"for",
"magic_method_codes",
"columns"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/drop_down_menus2.py#L126-L138 |
PmagPy/PmagPy | dialogs/drop_down_menus2.py | Menus.clean_up | def clean_up(self):#, grid):
"""
de-select grid cols, refresh grid
"""
if self.selected_col:
col_label_value = self.grid.GetColLabelValue(self.selected_col)
col_label_value = col_label_value.strip('\nEDIT ALL')
self.grid.SetColLabelValue(self.selected_... | python | def clean_up(self):#, grid):
"""
de-select grid cols, refresh grid
"""
if self.selected_col:
col_label_value = self.grid.GetColLabelValue(self.selected_col)
col_label_value = col_label_value.strip('\nEDIT ALL')
self.grid.SetColLabelValue(self.selected_... | [
"def",
"clean_up",
"(",
"self",
")",
":",
"#, grid):",
"if",
"self",
".",
"selected_col",
":",
"col_label_value",
"=",
"self",
".",
"grid",
".",
"GetColLabelValue",
"(",
"self",
".",
"selected_col",
")",
"col_label_value",
"=",
"col_label_value",
".",
"strip",... | de-select grid cols, refresh grid | [
"de",
"-",
"select",
"grid",
"cols",
"refresh",
"grid"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/drop_down_menus2.py#L198-L208 |
PmagPy/PmagPy | dialogs/drop_down_menus2.py | Menus.on_left_click | def on_left_click(self, event, grid, choices):
"""
creates popup menu when user clicks on the column
if that column is in the list of choices that get a drop-down menu.
allows user to edit the column, but only from available values
"""
color = self.grid.GetCellBackgroundC... | python | def on_left_click(self, event, grid, choices):
"""
creates popup menu when user clicks on the column
if that column is in the list of choices that get a drop-down menu.
allows user to edit the column, but only from available values
"""
color = self.grid.GetCellBackgroundC... | [
"def",
"on_left_click",
"(",
"self",
",",
"event",
",",
"grid",
",",
"choices",
")",
":",
"color",
"=",
"self",
".",
"grid",
".",
"GetCellBackgroundColour",
"(",
"event",
".",
"GetRow",
"(",
")",
",",
"event",
".",
"GetCol",
"(",
")",
")",
"# allow use... | creates popup menu when user clicks on the column
if that column is in the list of choices that get a drop-down menu.
allows user to edit the column, but only from available values | [
"creates",
"popup",
"menu",
"when",
"user",
"clicks",
"on",
"the",
"column",
"if",
"that",
"column",
"is",
"in",
"the",
"list",
"of",
"choices",
"that",
"get",
"a",
"drop",
"-",
"down",
"menu",
".",
"allows",
"user",
"to",
"edit",
"the",
"column",
"but... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/drop_down_menus2.py#L210-L294 |
PmagPy/PmagPy | dialogs/drop_down_menus2.py | Menus.on_select_menuitem | def on_select_menuitem(self, event, grid, row, col, selection):
"""
sets value of selected cell to value selected from menu
"""
if self.grid.changes: # if user selects a menuitem, that is an edit
self.grid.changes.add(row)
else:
self.grid.changes = {row}
... | python | def on_select_menuitem(self, event, grid, row, col, selection):
"""
sets value of selected cell to value selected from menu
"""
if self.grid.changes: # if user selects a menuitem, that is an edit
self.grid.changes.add(row)
else:
self.grid.changes = {row}
... | [
"def",
"on_select_menuitem",
"(",
"self",
",",
"event",
",",
"grid",
",",
"row",
",",
"col",
",",
"selection",
")",
":",
"if",
"self",
".",
"grid",
".",
"changes",
":",
"# if user selects a menuitem, that is an edit",
"self",
".",
"grid",
".",
"changes",
"."... | sets value of selected cell to value selected from menu | [
"sets",
"value",
"of",
"selected",
"cell",
"to",
"value",
"selected",
"from",
"menu"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/drop_down_menus2.py#L311-L350 |
PmagPy/PmagPy | programs/plot_cdf.py | main | def main():
"""
NAME
plot_cdf.py
DESCRIPTION
makes plots of cdfs of data in input file
SYNTAX
plot_cdf.py [-h][command line options]
OPTIONS
-h prints help message and quits
-f FILE
-t TITLE
-fmt [svg,eps,png,pdf,jpg..] specify format of ou... | python | def main():
"""
NAME
plot_cdf.py
DESCRIPTION
makes plots of cdfs of data in input file
SYNTAX
plot_cdf.py [-h][command line options]
OPTIONS
-h prints help message and quits
-f FILE
-t TITLE
-fmt [svg,eps,png,pdf,jpg..] specify format of ou... | [
"def",
"main",
"(",
")",
":",
"fmt",
",",
"plot",
"=",
"'svg'",
",",
"0",
"title",
"=",
"\"\"",
"if",
"'-h'",
"in",
"sys",
".",
"argv",
":",
"print",
"(",
"main",
".",
"__doc__",
")",
"sys",
".",
"exit",
"(",
")",
"if",
"'-sav'",
"in",
"sys",
... | NAME
plot_cdf.py
DESCRIPTION
makes plots of cdfs of data in input file
SYNTAX
plot_cdf.py [-h][command line options]
OPTIONS
-h prints help message and quits
-f FILE
-t TITLE
-fmt [svg,eps,png,pdf,jpg..] specify format of output figure, default is ... | [
"NAME",
"plot_cdf",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/plot_cdf.py#L12-L63 |
PmagPy/PmagPy | programs/bootams.py | main | def main():
"""
NAME
bootams.py
DESCRIPTION
calculates bootstrap statistics for tensor data
SYNTAX
bootams.py [-h][command line options]
OPTIONS:
-h prints help message and quits
-f FILE specifies input file name
-par specifies parametric bootstrap [b... | python | def main():
"""
NAME
bootams.py
DESCRIPTION
calculates bootstrap statistics for tensor data
SYNTAX
bootams.py [-h][command line options]
OPTIONS:
-h prints help message and quits
-f FILE specifies input file name
-par specifies parametric bootstrap [b... | [
"def",
"main",
"(",
")",
":",
"# set options",
"ipar",
",",
"nb",
"=",
"0",
",",
"5000",
"if",
"'-h'",
"in",
"sys",
".",
"argv",
":",
"print",
"(",
"main",
".",
"__doc__",
")",
"sys",
".",
"exit",
"(",
")",
"if",
"'-f'",
"in",
"sys",
".",
"argv... | NAME
bootams.py
DESCRIPTION
calculates bootstrap statistics for tensor data
SYNTAX
bootams.py [-h][command line options]
OPTIONS:
-h prints help message and quits
-f FILE specifies input file name
-par specifies parametric bootstrap [by whole data set]
... | [
"NAME",
"bootams",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/bootams.py#L10-L78 |
PmagPy/PmagPy | pmagpy/controlled_vocabularies3.py | Vocabulary.get_json_online | def get_json_online(self, url):
"""
Use requests module to json from Earthref.
If this fails or times out, return false.
Returns
---------
result : requests.models.Response, or [] if unsuccessful
"""
if not requests:
return False
try:
... | python | def get_json_online(self, url):
"""
Use requests module to json from Earthref.
If this fails or times out, return false.
Returns
---------
result : requests.models.Response, or [] if unsuccessful
"""
if not requests:
return False
try:
... | [
"def",
"get_json_online",
"(",
"self",
",",
"url",
")",
":",
"if",
"not",
"requests",
":",
"return",
"False",
"try",
":",
"req",
"=",
"requests",
".",
"get",
"(",
"url",
",",
"timeout",
"=",
".2",
")",
"if",
"not",
"req",
".",
"ok",
":",
"return",
... | Use requests module to json from Earthref.
If this fails or times out, return false.
Returns
---------
result : requests.models.Response, or [] if unsuccessful | [
"Use",
"requests",
"module",
"to",
"json",
"from",
"Earthref",
".",
"If",
"this",
"fails",
"or",
"times",
"out",
"return",
"false",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/controlled_vocabularies3.py#L68-L86 |
PmagPy/PmagPy | pmagpy/controlled_vocabularies3.py | Vocabulary.get_tiered_meth_category | def get_tiered_meth_category(self, mtype, all_codes, code_types):
"""
Get a tiered list of all er/pmag_age codes
i.e. pmag_codes = {'anisotropy_codes': ['code1', 'code2'],
'sample_preparation': [code1, code2], ...}
"""
categories = Series(code_types[code_types[mtype] == T... | python | def get_tiered_meth_category(self, mtype, all_codes, code_types):
"""
Get a tiered list of all er/pmag_age codes
i.e. pmag_codes = {'anisotropy_codes': ['code1', 'code2'],
'sample_preparation': [code1, code2], ...}
"""
categories = Series(code_types[code_types[mtype] == T... | [
"def",
"get_tiered_meth_category",
"(",
"self",
",",
"mtype",
",",
"all_codes",
",",
"code_types",
")",
":",
"categories",
"=",
"Series",
"(",
"code_types",
"[",
"code_types",
"[",
"mtype",
"]",
"==",
"True",
"]",
".",
"index",
")",
"codes",
"=",
"{",
"c... | Get a tiered list of all er/pmag_age codes
i.e. pmag_codes = {'anisotropy_codes': ['code1', 'code2'],
'sample_preparation': [code1, code2], ...} | [
"Get",
"a",
"tiered",
"list",
"of",
"all",
"er",
"/",
"pmag_age",
"codes",
"i",
".",
"e",
".",
"pmag_codes",
"=",
"{",
"anisotropy_codes",
":",
"[",
"code1",
"code2",
"]",
"sample_preparation",
":",
"[",
"code1",
"code2",
"]",
"...",
"}"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/controlled_vocabularies3.py#L159-L167 |
PmagPy/PmagPy | pmagpy/controlled_vocabularies3.py | Vocabulary.get_controlled_vocabularies | def get_controlled_vocabularies(self, vocab_types=default_vocab_types):
"""
Get all non-method controlled vocabularies
"""
if len(VOCAB):
self.set_vocabularies()
return
data = []
controlled_vocabularies = []
# try to get online
if n... | python | def get_controlled_vocabularies(self, vocab_types=default_vocab_types):
"""
Get all non-method controlled vocabularies
"""
if len(VOCAB):
self.set_vocabularies()
return
data = []
controlled_vocabularies = []
# try to get online
if n... | [
"def",
"get_controlled_vocabularies",
"(",
"self",
",",
"vocab_types",
"=",
"default_vocab_types",
")",
":",
"if",
"len",
"(",
"VOCAB",
")",
":",
"self",
".",
"set_vocabularies",
"(",
")",
"return",
"data",
"=",
"[",
"]",
"controlled_vocabularies",
"=",
"[",
... | Get all non-method controlled vocabularies | [
"Get",
"all",
"non",
"-",
"method",
"controlled",
"vocabularies"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/controlled_vocabularies3.py#L182-L265 |
PmagPy/PmagPy | programs/remanence_anisotropy_magic.py | main | def main():
"""
NAME
remanence_aniso_magic.py
DESCRIPTION
This program is similar to aarm_magic.py and atrm_magic.py with minor modifications.
Converts magic measurement file with ATRM/AARM data to best-fit tensor (6 elements plus sigma)
following Hext (1963), and calculate... | python | def main():
"""
NAME
remanence_aniso_magic.py
DESCRIPTION
This program is similar to aarm_magic.py and atrm_magic.py with minor modifications.
Converts magic measurement file with ATRM/AARM data to best-fit tensor (6 elements plus sigma)
following Hext (1963), and calculate... | [
"def",
"main",
"(",
")",
":",
"#==================================================================================",
"meas_file",
"=",
"\"magic_measurements.txt\"",
"args",
"=",
"sys",
".",
"argv",
"dir_path",
"=",
"'.'",
"#",
"# get name of file from command line",
"#",
"if"... | NAME
remanence_aniso_magic.py
DESCRIPTION
This program is similar to aarm_magic.py and atrm_magic.py with minor modifications.
Converts magic measurement file with ATRM/AARM data to best-fit tensor (6 elements plus sigma)
following Hext (1963), and calculates F-test statistics.
... | [
"NAME",
"remanence_aniso_magic",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/remanence_anisotropy_magic.py#L16-L646 |
PmagPy/PmagPy | programs/eqarea_magic2.py | main | def main():
"""
NAME
eqarea_magic.py
DESCRIPTION
makes equal area projections from declination/inclination data
SYNTAX
eqarea_magic.py [command line options]
INPUT
takes magic formatted pmag_results, pmag_sites, pmag_samples or pmag_specimens
OPTIONS
-h ... | python | def main():
"""
NAME
eqarea_magic.py
DESCRIPTION
makes equal area projections from declination/inclination data
SYNTAX
eqarea_magic.py [command line options]
INPUT
takes magic formatted pmag_results, pmag_sites, pmag_samples or pmag_specimens
OPTIONS
-h ... | [
"def",
"main",
"(",
")",
":",
"FIG",
"=",
"{",
"}",
"# plot dictionary",
"FIG",
"[",
"'eqarea'",
"]",
"=",
"1",
"# eqarea is figure 1",
"in_file",
",",
"plot_key",
",",
"coord",
",",
"crd",
"=",
"'pmag_results.txt'",
",",
"'all'",
",",
"\"0\"",
",",
"'g'... | NAME
eqarea_magic.py
DESCRIPTION
makes equal area projections from declination/inclination data
SYNTAX
eqarea_magic.py [command line options]
INPUT
takes magic formatted pmag_results, pmag_sites, pmag_samples or pmag_specimens
OPTIONS
-h prints help message and ... | [
"NAME",
"eqarea_magic",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/eqarea_magic2.py#L11-L437 |
PmagPy/PmagPy | programs/conversion_scripts2/generic_magic2.py | main | def main(command_line=True, **kwargs):
"""
NAME
generic_magic.py
DESCRIPTION
converts magnetometer files in generic format to MagIC measurements format
SYNTAX
generic_magic.py [command line options]
OPTIONS
-h
prints the help message and quits.
... | python | def main(command_line=True, **kwargs):
"""
NAME
generic_magic.py
DESCRIPTION
converts magnetometer files in generic format to MagIC measurements format
SYNTAX
generic_magic.py [command line options]
OPTIONS
-h
prints the help message and quits.
... | [
"def",
"main",
"(",
"command_line",
"=",
"True",
",",
"*",
"*",
"kwargs",
")",
":",
"#--------------------------------------",
"# functions",
"#--------------------------------------",
"def",
"sort_magic_file",
"(",
"path",
",",
"ignore_lines_n",
",",
"sort_by_this_name",... | NAME
generic_magic.py
DESCRIPTION
converts magnetometer files in generic format to MagIC measurements format
SYNTAX
generic_magic.py [command line options]
OPTIONS
-h
prints the help message and quits.
-usr USER
identify user, default is ""
... | [
"NAME",
"generic_magic",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/conversion_scripts2/generic_magic2.py#L13-L1046 |
PmagPy/PmagPy | programs/irm_unmix.py | loadData | def loadData(filePath=None):
'''
#====================================================================
in:
read measured raw data file,
search the line [' Field Remanence '] in measured data file,
skip all the rows above and the last line,
otherwise, load data as two columns.
#... | python | def loadData(filePath=None):
'''
#====================================================================
in:
read measured raw data file,
search the line [' Field Remanence '] in measured data file,
skip all the rows above and the last line,
otherwise, load data as two columns.
#... | [
"def",
"loadData",
"(",
"filePath",
"=",
"None",
")",
":",
"skip_from",
"=",
"' Field Remanence '",
"with",
"open",
"(",
"filePath",
",",
"'rb'",
")",
"as",
"fr",
":",
"#f = fr.read()",
"for",
"i",
",",
"line",
"in",
"enumerate",
"(",
"fr",
",",
... | #====================================================================
in:
read measured raw data file,
search the line [' Field Remanence '] in measured data file,
skip all the rows above and the last line,
otherwise, load data as two columns.
#
out:
rawDf,fitDf are the pandas ... | [
"#",
"====================================================================",
"in",
":",
"read",
"measured",
"raw",
"data",
"file",
"search",
"the",
"line",
"[",
"Field",
"Remanence",
"]",
"in",
"measured",
"data",
"file",
"skip",
"all",
"the",
"rows",
"above",
"and"... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/irm_unmix.py#L81-L123 |
PmagPy/PmagPy | programs/irm_unmix.py | fit_plots | def fit_plots(ax,xfit,xraw,yfit,yraw):
'''
#====================================================================
plot the fitted results for data fit and refit
#====================================================================
'''
global _yfits_
_yfits_ = yfit
ax.plot(xfit, yfit)
... | python | def fit_plots(ax,xfit,xraw,yfit,yraw):
'''
#====================================================================
plot the fitted results for data fit and refit
#====================================================================
'''
global _yfits_
_yfits_ = yfit
ax.plot(xfit, yfit)
... | [
"def",
"fit_plots",
"(",
"ax",
",",
"xfit",
",",
"xraw",
",",
"yfit",
",",
"yraw",
")",
":",
"global",
"_yfits_",
"_yfits_",
"=",
"yfit",
"ax",
".",
"plot",
"(",
"xfit",
",",
"yfit",
")",
"ax",
".",
"plot",
"(",
"xfit",
",",
"np",
".",
"sum",
"... | #====================================================================
plot the fitted results for data fit and refit
#==================================================================== | [
"#",
"====================================================================",
"plot",
"the",
"fitted",
"results",
"for",
"data",
"fit",
"and",
"refit",
"#",
"===================================================================="
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/irm_unmix.py#L287-L299 |
PmagPy/PmagPy | programs/uniform.py | main | def main():
"""
NAME
uniform.py
DESCRIPTION
draws N directions from uniform distribution on a sphere
SYNTAX
uniform.py [-h][command line options]
-h prints help message and quits
-n N, specify N on the command line (default is 100)
-F file, specify ... | python | def main():
"""
NAME
uniform.py
DESCRIPTION
draws N directions from uniform distribution on a sphere
SYNTAX
uniform.py [-h][command line options]
-h prints help message and quits
-n N, specify N on the command line (default is 100)
-F file, specify ... | [
"def",
"main",
"(",
")",
":",
"outf",
"=",
"\"\"",
"N",
"=",
"100",
"if",
"'-h'",
"in",
"sys",
".",
"argv",
":",
"print",
"(",
"main",
".",
"__doc__",
")",
"sys",
".",
"exit",
"(",
")",
"if",
"'-F'",
"in",
"sys",
".",
"argv",
":",
"ind",
"=",... | NAME
uniform.py
DESCRIPTION
draws N directions from uniform distribution on a sphere
SYNTAX
uniform.py [-h][command line options]
-h prints help message and quits
-n N, specify N on the command line (default is 100)
-F file, specify output file name, defaul... | [
"NAME",
"uniform",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/uniform.py#L7-L38 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | _2g_bin | def _2g_bin(dir_path=".", mag_file="", meas_file='measurements.txt',
spec_file="specimens.txt", samp_file="samples.txt", site_file="sites.txt",
loc_file="locations.txt", or_con='3', specnum=0, samp_con='2', corr='1',
gmeths="FS-FD:SO-POM", location="unknown", inst="", user="", noave=... | python | def _2g_bin(dir_path=".", mag_file="", meas_file='measurements.txt',
spec_file="specimens.txt", samp_file="samples.txt", site_file="sites.txt",
loc_file="locations.txt", or_con='3', specnum=0, samp_con='2', corr='1',
gmeths="FS-FD:SO-POM", location="unknown", inst="", user="", noave=... | [
"def",
"_2g_bin",
"(",
"dir_path",
"=",
"\".\"",
",",
"mag_file",
"=",
"\"\"",
",",
"meas_file",
"=",
"'measurements.txt'",
",",
"spec_file",
"=",
"\"specimens.txt\"",
",",
"samp_file",
"=",
"\"samples.txt\"",
",",
"site_file",
"=",
"\"sites.txt\"",
",",
"loc_fi... | Convert 2G binary format file to MagIC file(s)
Parameters
----------
dir_path : str
output directory, default "."
mag_file : str
input file name
meas_file : str
output measurement file name, default "measurements.txt"
spec_file : str
output specimen file name, de... | [
"Convert",
"2G",
"binary",
"format",
"file",
"to",
"MagIC",
"file",
"(",
"s",
")"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L19-L425 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | agm | def agm(agm_file, dir_path=".", input_dir_path="",
meas_outfile="", spec_outfile="", samp_outfile="",
site_outfile="", loc_outfile="", spec_infile="",
samp_infile="", site_infile="",
specimen="", specnum=0, samp_con="1", location="unknown",
instrument="", institution="", bak=Fals... | python | def agm(agm_file, dir_path=".", input_dir_path="",
meas_outfile="", spec_outfile="", samp_outfile="",
site_outfile="", loc_outfile="", spec_infile="",
samp_infile="", site_infile="",
specimen="", specnum=0, samp_con="1", location="unknown",
instrument="", institution="", bak=Fals... | [
"def",
"agm",
"(",
"agm_file",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"meas_outfile",
"=",
"\"\"",
",",
"spec_outfile",
"=",
"\"\"",
",",
"samp_outfile",
"=",
"\"\"",
",",
"site_outfile",
"=",
"\"\"",
",",
"loc_outfile",
"=... | Convert AGM format file to MagIC file(s)
Parameters
----------
agm_file : str
input file name
dir_path : str
working directory, default "."
input_dir_path : str
input file directory IF different from dir_path, default ""
meas_outfile : str
output measurement file... | [
"Convert",
"AGM",
"format",
"file",
"to",
"MagIC",
"file",
"(",
"s",
")"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L430-L721 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | bgc | def bgc(mag_file, dir_path=".", input_dir_path="",
meas_file='measurements.txt', spec_file='specimens.txt', samp_file='samples.txt',
site_file='sites.txt', loc_file='locations.txt', append=False,
location="unknown", site="", samp_con='1', specnum=0,
meth_code="LP-NO", volume=12, user="",... | python | def bgc(mag_file, dir_path=".", input_dir_path="",
meas_file='measurements.txt', spec_file='specimens.txt', samp_file='samples.txt',
site_file='sites.txt', loc_file='locations.txt', append=False,
location="unknown", site="", samp_con='1', specnum=0,
meth_code="LP-NO", volume=12, user="",... | [
"def",
"bgc",
"(",
"mag_file",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"meas_file",
"=",
"'measurements.txt'",
",",
"spec_file",
"=",
"'specimens.txt'",
",",
"samp_file",
"=",
"'samples.txt'",
",",
"site_file",
"=",
"'sites.txt'",... | Convert BGC format file to MagIC file(s)
Parameters
----------
mag_file : str
input file name
dir_path : str
working directory, default "."
input_dir_path : str
input file directory IF different from dir_path, default ""
meas_file : str
output measurement file na... | [
"Convert",
"BGC",
"format",
"file",
"to",
"MagIC",
"file",
"(",
"s",
")"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L726-L981 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | cit | def cit(dir_path=".", input_dir_path="", magfile="", user="", meas_file="measurements.txt",
spec_file="specimens.txt", samp_file="samples.txt",
site_file="sites.txt", loc_file="locations.txt", locname="unknown",
sitename="", methods=['SO-MAG'], specnum=0, samp_con='3',
norm='cc', oersted... | python | def cit(dir_path=".", input_dir_path="", magfile="", user="", meas_file="measurements.txt",
spec_file="specimens.txt", samp_file="samples.txt",
site_file="sites.txt", loc_file="locations.txt", locname="unknown",
sitename="", methods=['SO-MAG'], specnum=0, samp_con='3',
norm='cc', oersted... | [
"def",
"cit",
"(",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"magfile",
"=",
"\"\"",
",",
"user",
"=",
"\"\"",
",",
"meas_file",
"=",
"\"measurements.txt\"",
",",
"spec_file",
"=",
"\"specimens.txt\"",
",",
"samp_file",
"=",
"\"sampl... | Converts CIT formated Magnetometer data into MagIC format for Analysis and contribution to the MagIC database
Parameters
-----------
dir_path : directory to output files to (default : current directory)
input_dir_path : directory to input files (only needed if different from dir_path!)
magfile : ma... | [
"Converts",
"CIT",
"formated",
"Magnetometer",
"data",
"into",
"MagIC",
"format",
"for",
"Analysis",
"and",
"contribution",
"to",
"the",
"MagIC",
"database"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L986-L1426 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | generic | def generic(magfile="", dir_path=".", meas_file="measurements.txt",
spec_file="specimens.txt", samp_file="samples.txt", site_file="sites.txt",
loc_file="locations.txt", user="", labfield=0, labfield_phi=0, labfield_theta=0,
experiment="", cooling_times_list=[], sample_nc=[1, 0], site... | python | def generic(magfile="", dir_path=".", meas_file="measurements.txt",
spec_file="specimens.txt", samp_file="samples.txt", site_file="sites.txt",
loc_file="locations.txt", user="", labfield=0, labfield_phi=0, labfield_theta=0,
experiment="", cooling_times_list=[], sample_nc=[1, 0], site... | [
"def",
"generic",
"(",
"magfile",
"=",
"\"\"",
",",
"dir_path",
"=",
"\".\"",
",",
"meas_file",
"=",
"\"measurements.txt\"",
",",
"spec_file",
"=",
"\"specimens.txt\"",
",",
"samp_file",
"=",
"\"samples.txt\"",
",",
"site_file",
"=",
"\"sites.txt\"",
",",
"loc_f... | Convert generic file to MagIC file(s)
Parameters
----------
mag_file : str
input file name
dir_path : str
output directory, default "."
meas_file : str
output measurement file name, default "measurements.txt"
spec_file : str
output specimen file name, default "sp... | [
"Convert",
"generic",
"file",
"to",
"MagIC",
"file",
"(",
"s",
")"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L1431-L2263 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | huji | def huji(magfile="", dir_path=".", input_dir_path="", datafile="", codelist="",
meas_file="measurements.txt", spec_file="specimens.txt",
samp_file="samples.txt", site_file="sites.txt", loc_file="locations.txt",
user="", specnum=0, samp_con="1", labfield=0, phi=0, theta=0,
location=""... | python | def huji(magfile="", dir_path=".", input_dir_path="", datafile="", codelist="",
meas_file="measurements.txt", spec_file="specimens.txt",
samp_file="samples.txt", site_file="sites.txt", loc_file="locations.txt",
user="", specnum=0, samp_con="1", labfield=0, phi=0, theta=0,
location=""... | [
"def",
"huji",
"(",
"magfile",
"=",
"\"\"",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"datafile",
"=",
"\"\"",
",",
"codelist",
"=",
"\"\"",
",",
"meas_file",
"=",
"\"measurements.txt\"",
",",
"spec_file",
"=",
"\"specimens.txt\... | Convert HUJI format file to MagIC file(s)
Parameters
----------
magfile : str
input file name
dir_path : str
working directory, default "."
input_dir_path : str
input file directory IF different from dir_path, default ""
datafile : str
HUJI datafile with sample ori... | [
"Convert",
"HUJI",
"format",
"file",
"to",
"MagIC",
"file",
"(",
"s",
")"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L2268-L2862 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | huji_sample | def huji_sample(orient_file, meths='FS-FD:SO-POM:SO-SUN', location_name='unknown',
samp_con="1", ignore_dip=True, data_model_num=3,
samp_file="samples.txt", site_file="sites.txt",
dir_path=".", input_dir_path=""):
"""
Convert HUJI sample file to MagIC file(s)
... | python | def huji_sample(orient_file, meths='FS-FD:SO-POM:SO-SUN', location_name='unknown',
samp_con="1", ignore_dip=True, data_model_num=3,
samp_file="samples.txt", site_file="sites.txt",
dir_path=".", input_dir_path=""):
"""
Convert HUJI sample file to MagIC file(s)
... | [
"def",
"huji_sample",
"(",
"orient_file",
",",
"meths",
"=",
"'FS-FD:SO-POM:SO-SUN'",
",",
"location_name",
"=",
"'unknown'",
",",
"samp_con",
"=",
"\"1\"",
",",
"ignore_dip",
"=",
"True",
",",
"data_model_num",
"=",
"3",
",",
"samp_file",
"=",
"\"samples.txt\""... | Convert HUJI sample file to MagIC file(s)
Parameters
----------
orient_file : str
input file name
meths : str
colon-delimited sampling methods, default FS-FD:SO-POM:SO-SUN
for more options, see info below
location : str
location name, default "unknown"
samp_con : s... | [
"Convert",
"HUJI",
"sample",
"file",
"to",
"MagIC",
"file",
"(",
"s",
")"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L2867-L3041 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | iodp_dscr_lore | def iodp_dscr_lore(dscr_file,dscr_ex_file="", dir_path=".", input_dir_path="",volume=7,noave=False,\
meas_file="measurements.txt", offline_meas_file="",spec_file="specimens.txt"):
"""
Convert IODP discrete measurement files in MagIC file(s). This program
assumes that you have created the speci... | python | def iodp_dscr_lore(dscr_file,dscr_ex_file="", dir_path=".", input_dir_path="",volume=7,noave=False,\
meas_file="measurements.txt", offline_meas_file="",spec_file="specimens.txt"):
"""
Convert IODP discrete measurement files in MagIC file(s). This program
assumes that you have created the speci... | [
"def",
"iodp_dscr_lore",
"(",
"dscr_file",
",",
"dscr_ex_file",
"=",
"\"\"",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"volume",
"=",
"7",
",",
"noave",
"=",
"False",
",",
"meas_file",
"=",
"\"measurements.txt\"",
",",
"offline_... | Convert IODP discrete measurement files in MagIC file(s). This program
assumes that you have created the specimens, samples, sites and location
files using convert_2_magic.iodp_samples_csv from files downloaded from the LIMS online
repository and that all samples are in that file.
If there are offline ... | [
"Convert",
"IODP",
"discrete",
"measurement",
"files",
"in",
"MagIC",
"file",
"(",
"s",
")",
".",
"This",
"program",
"assumes",
"that",
"you",
"have",
"created",
"the",
"specimens",
"samples",
"sites",
"and",
"location",
"files",
"using",
"convert_2_magic",
".... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L3045-L3244 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | iodp_jr6_lore | def iodp_jr6_lore(jr6_file, dir_path=".", input_dir_path="",volume=7,noave=False,dc_field=50e-6,\
meas_file="measurements.txt", spec_file="specimens.txt"):
"""
Convert IODP JR6 measurement files in MagIC file(s). This program
assumes that you have created the specimens, samples, sites and loca... | python | def iodp_jr6_lore(jr6_file, dir_path=".", input_dir_path="",volume=7,noave=False,dc_field=50e-6,\
meas_file="measurements.txt", spec_file="specimens.txt"):
"""
Convert IODP JR6 measurement files in MagIC file(s). This program
assumes that you have created the specimens, samples, sites and loca... | [
"def",
"iodp_jr6_lore",
"(",
"jr6_file",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"volume",
"=",
"7",
",",
"noave",
"=",
"False",
",",
"dc_field",
"=",
"50e-6",
",",
"meas_file",
"=",
"\"measurements.txt\"",
",",
"spec_file",
... | Convert IODP JR6 measurement files in MagIC file(s). This program
assumes that you have created the specimens, samples, sites and location
files using convert_2_magic.iodp_samples_csv from files downloaded from the LIMS online
repository and that all samples are in that file.
Parameters
----------
... | [
"Convert",
"IODP",
"JR6",
"measurement",
"files",
"in",
"MagIC",
"file",
"(",
"s",
")",
".",
"This",
"program",
"assumes",
"that",
"you",
"have",
"created",
"the",
"specimens",
"samples",
"sites",
"and",
"location",
"files",
"using",
"convert_2_magic",
".",
... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L3248-L3372 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | iodp_kly4s_lore | def iodp_kly4s_lore(kly4s_file, meas_out='measurements.txt',
spec_infile='specimens.txt', spec_out='specimens.txt', instrument='IODP-KLY4S',
actual_volume="",dir_path='.', input_dir_path=''):
"""
Converts ascii files generated by SUFAR ver.4.0 and downloaded from the LIMS online
repos... | python | def iodp_kly4s_lore(kly4s_file, meas_out='measurements.txt',
spec_infile='specimens.txt', spec_out='specimens.txt', instrument='IODP-KLY4S',
actual_volume="",dir_path='.', input_dir_path=''):
"""
Converts ascii files generated by SUFAR ver.4.0 and downloaded from the LIMS online
repos... | [
"def",
"iodp_kly4s_lore",
"(",
"kly4s_file",
",",
"meas_out",
"=",
"'measurements.txt'",
",",
"spec_infile",
"=",
"'specimens.txt'",
",",
"spec_out",
"=",
"'specimens.txt'",
",",
"instrument",
"=",
"'IODP-KLY4S'",
",",
"actual_volume",
"=",
"\"\"",
",",
"dir_path",
... | Converts ascii files generated by SUFAR ver.4.0 and downloaded from the LIMS online
repository to MagIC (datamodel 3) files
Parameters
----------
kly4s_file : str
input LORE downloaded csv file, required
meas_output : str
measurement output filename, default "measurements.txt"
s... | [
"Converts",
"ascii",
"files",
"generated",
"by",
"SUFAR",
"ver",
".",
"4",
".",
"0",
"and",
"downloaded",
"from",
"the",
"LIMS",
"online",
"repository",
"to",
"MagIC",
"(",
"datamodel",
"3",
")",
"files"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L3375-L3539 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | iodp_jr6 | def iodp_jr6(mag_file, dir_path=".", input_dir_path="",
meas_file="measurements.txt", spec_file="specimens.txt",
samp_file="samples.txt", site_file="sites.txt", loc_file="locations.txt",
site="unknown", expedition="unknown", lat="", lon="",
noave=False, volume=12, met... | python | def iodp_jr6(mag_file, dir_path=".", input_dir_path="",
meas_file="measurements.txt", spec_file="specimens.txt",
samp_file="samples.txt", site_file="sites.txt", loc_file="locations.txt",
site="unknown", expedition="unknown", lat="", lon="",
noave=False, volume=12, met... | [
"def",
"iodp_jr6",
"(",
"mag_file",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"meas_file",
"=",
"\"measurements.txt\"",
",",
"spec_file",
"=",
"\"specimens.txt\"",
",",
"samp_file",
"=",
"\"samples.txt\"",
",",
"site_file",
"=",
"\"... | Conversion for IODP jr6 format files into MagIC file(s)
Parameters
----------
mag_file : str
input file name
dir_path : str
working directory, default "."
input_dir_path : str
input file directory IF different from dir_path, default ""
meas_file : str
output meas... | [
"Conversion",
"for",
"IODP",
"jr6",
"format",
"files",
"into",
"MagIC",
"file",
"(",
"s",
")"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L3543-L3764 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | iodp_samples | def iodp_samples(samp_file, output_samp_file=None, output_dir_path='.',
input_dir_path='', data_model_num=3):
"""
Convert IODP samples data file into MagIC samples file.
Default is to overwrite samples.txt in your working directory.
Parameters
----------
samp_file : str
... | python | def iodp_samples(samp_file, output_samp_file=None, output_dir_path='.',
input_dir_path='', data_model_num=3):
"""
Convert IODP samples data file into MagIC samples file.
Default is to overwrite samples.txt in your working directory.
Parameters
----------
samp_file : str
... | [
"def",
"iodp_samples",
"(",
"samp_file",
",",
"output_samp_file",
"=",
"None",
",",
"output_dir_path",
"=",
"'.'",
",",
"input_dir_path",
"=",
"''",
",",
"data_model_num",
"=",
"3",
")",
":",
"samp_file_name",
"=",
"\"samples.txt\"",
"sample_alternatives",
"=",
... | Convert IODP samples data file into MagIC samples file.
Default is to overwrite samples.txt in your working directory.
Parameters
----------
samp_file : str
path to IODP sample file to convert
output_samp_file : str
MagIC-format samples file to append to, default None
output_dir... | [
"Convert",
"IODP",
"samples",
"data",
"file",
"into",
"MagIC",
"samples",
"file",
".",
"Default",
"is",
"to",
"overwrite",
"samples",
".",
"txt",
"in",
"your",
"working",
"directory",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L3769-L3951 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | iodp_sample_names | def iodp_sample_names(df):
"""
Convert expedition, hole, section, type, interval to sample name in format:
exp-hole-type-sect-interval
Parameters
___________
df : Pandas DataFrame
dataframe read in from .csv file downloaded from LIMS online database
Returns
--------------
... | python | def iodp_sample_names(df):
"""
Convert expedition, hole, section, type, interval to sample name in format:
exp-hole-type-sect-interval
Parameters
___________
df : Pandas DataFrame
dataframe read in from .csv file downloaded from LIMS online database
Returns
--------------
... | [
"def",
"iodp_sample_names",
"(",
"df",
")",
":",
"if",
"'Top offset (cm)'",
"in",
"df",
".",
"columns",
":",
"offset_key",
"=",
"'Top offset (cm)'",
"elif",
"'Offset (cm)'",
"in",
"df",
".",
"columns",
":",
"offset_key",
"=",
"'Offset (cm)'",
"else",
":",
"pri... | Convert expedition, hole, section, type, interval to sample name in format:
exp-hole-type-sect-interval
Parameters
___________
df : Pandas DataFrame
dataframe read in from .csv file downloaded from LIMS online database
Returns
--------------
holes : list
IODP Holes nam... | [
"Convert",
"expedition",
"hole",
"section",
"type",
"interval",
"to",
"sample",
"name",
"in",
"format",
":",
"exp",
"-",
"hole",
"-",
"type",
"-",
"sect",
"-",
"interval"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L3954-L3986 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | iodp_samples_csv | def iodp_samples_csv(lims_sample_file, spec_file='specimens.txt',samp_file="samples.txt",
site_file="sites.txt",loc_file="locations.txt",dir_path='.',
input_dir_path='',comp_depth_key="",lat="",lon="",
exp_name="",exp_desc="",age_low=0,age_high=200e6):
... | python | def iodp_samples_csv(lims_sample_file, spec_file='specimens.txt',samp_file="samples.txt",
site_file="sites.txt",loc_file="locations.txt",dir_path='.',
input_dir_path='',comp_depth_key="",lat="",lon="",
exp_name="",exp_desc="",age_low=0,age_high=200e6):
... | [
"def",
"iodp_samples_csv",
"(",
"lims_sample_file",
",",
"spec_file",
"=",
"'specimens.txt'",
",",
"samp_file",
"=",
"\"samples.txt\"",
",",
"site_file",
"=",
"\"sites.txt\"",
",",
"loc_file",
"=",
"\"locations.txt\"",
",",
"dir_path",
"=",
"'.'",
",",
"input_dir_pa... | Convert IODP samples data file downloaded from LIMS as .csv file into datamodel 3.0 MagIC samples file.
Default is to overwrite samples.txt in your working directory.
Parameters
----------
lims_sample_file : str
path to IODP sample file to convert
dir_path : str
working directory, d... | [
"Convert",
"IODP",
"samples",
"data",
"file",
"downloaded",
"from",
"LIMS",
"as",
".",
"csv",
"file",
"into",
"datamodel",
"3",
".",
"0",
"MagIC",
"samples",
"file",
".",
"Default",
"is",
"to",
"overwrite",
"samples",
".",
"txt",
"in",
"your",
"working",
... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L3988-L4159 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | iodp_samples_srm | def iodp_samples_srm(df, spec_file='specimens.txt',samp_file="samples.txt",site_file="sites.txt",dir_path='.',
input_dir_path='',comp_depth_key="",lat="",lon=""):
"""
Convert IODP samples data generated from the SRM measurements file into datamodel 3.0 MagIC samples file.
Default is to over... | python | def iodp_samples_srm(df, spec_file='specimens.txt',samp_file="samples.txt",site_file="sites.txt",dir_path='.',
input_dir_path='',comp_depth_key="",lat="",lon=""):
"""
Convert IODP samples data generated from the SRM measurements file into datamodel 3.0 MagIC samples file.
Default is to over... | [
"def",
"iodp_samples_srm",
"(",
"df",
",",
"spec_file",
"=",
"'specimens.txt'",
",",
"samp_file",
"=",
"\"samples.txt\"",
",",
"site_file",
"=",
"\"sites.txt\"",
",",
"dir_path",
"=",
"'.'",
",",
"input_dir_path",
"=",
"''",
",",
"comp_depth_key",
"=",
"\"\"",
... | Convert IODP samples data generated from the SRM measurements file into datamodel 3.0 MagIC samples file.
Default is to overwrite the output files in your working directory.
Parameters
----------
df : str
Pandas DataFrame of SRM Archive data
dir_path : str
working directory, default... | [
"Convert",
"IODP",
"samples",
"data",
"generated",
"from",
"the",
"SRM",
"measurements",
"file",
"into",
"datamodel",
"3",
".",
"0",
"MagIC",
"samples",
"file",
".",
"Default",
"is",
"to",
"overwrite",
"the",
"output",
"files",
"in",
"your",
"working",
"dire... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L4161-L4272 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | iodp_srm_lore | def iodp_srm_lore(srm_file, dir_path=".", input_dir_path="",noave=False,comp_depth_key='Depth CSF-B (m)',\
meas_file="srm_arch_measurements.txt", spec_file="srm_arch_specimens.txt",\
samp_file='srm_arch_samples.txt',site_file='srm_arch_sites.txt',lat="",lon=""):
"""
Convert IODP a... | python | def iodp_srm_lore(srm_file, dir_path=".", input_dir_path="",noave=False,comp_depth_key='Depth CSF-B (m)',\
meas_file="srm_arch_measurements.txt", spec_file="srm_arch_specimens.txt",\
samp_file='srm_arch_samples.txt',site_file='srm_arch_sites.txt',lat="",lon=""):
"""
Convert IODP a... | [
"def",
"iodp_srm_lore",
"(",
"srm_file",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"noave",
"=",
"False",
",",
"comp_depth_key",
"=",
"'Depth CSF-B (m)'",
",",
"meas_file",
"=",
"\"srm_arch_measurements.txt\"",
",",
"spec_file",
"=",
... | Convert IODP archive half measurement files into MagIC file(s).
Parameters
----------
srm_file : str
input csv file downloaded from LIMS online repository
dir_path : str
output directory, default "."
input_dir_path : str
input file directory IF different from dir_path, defau... | [
"Convert",
"IODP",
"archive",
"half",
"measurement",
"files",
"into",
"MagIC",
"file",
"(",
"s",
")",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L4274-L4371 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | iodp_srm | def iodp_srm(csv_file="", dir_path=".", input_dir_path="",
meas_file="measurements.txt", spec_file="specimens.txt",
samp_file="samples.txt", site_file="sites.txt", loc_file="locations.txt",
lat="", lon="", noave=0):
"""
Converts IODP LIMS and LORE SRM archive half sample ... | python | def iodp_srm(csv_file="", dir_path=".", input_dir_path="",
meas_file="measurements.txt", spec_file="specimens.txt",
samp_file="samples.txt", site_file="sites.txt", loc_file="locations.txt",
lat="", lon="", noave=0):
"""
Converts IODP LIMS and LORE SRM archive half sample ... | [
"def",
"iodp_srm",
"(",
"csv_file",
"=",
"\"\"",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"meas_file",
"=",
"\"measurements.txt\"",
",",
"spec_file",
"=",
"\"specimens.txt\"",
",",
"samp_file",
"=",
"\"samples.txt\"",
",",
"site_fi... | Converts IODP LIMS and LORE SRM archive half sample format files
to measurements format files.
Parameters
----------
csv_file : str
input csv file, default ""
if no file name is provided, find any .csv files in the provided dir_path
dir_path : str
working directory, default ... | [
"Converts",
"IODP",
"LIMS",
"and",
"LORE",
"SRM",
"archive",
"half",
"sample",
"format",
"files",
"to",
"measurements",
"format",
"files",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L4376-L4825 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | jr6_jr6 | def jr6_jr6(mag_file, dir_path=".", input_dir_path="",
meas_file="measurements.txt", spec_file="specimens.txt",
samp_file="samples.txt", site_file="sites.txt", loc_file="locations.txt",
specnum=1, samp_con='1', location='unknown', lat='', lon='',
noave=False, meth_code="L... | python | def jr6_jr6(mag_file, dir_path=".", input_dir_path="",
meas_file="measurements.txt", spec_file="specimens.txt",
samp_file="samples.txt", site_file="sites.txt", loc_file="locations.txt",
specnum=1, samp_con='1', location='unknown', lat='', lon='',
noave=False, meth_code="L... | [
"def",
"jr6_jr6",
"(",
"mag_file",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"meas_file",
"=",
"\"measurements.txt\"",
",",
"spec_file",
"=",
"\"specimens.txt\"",
",",
"samp_file",
"=",
"\"samples.txt\"",
",",
"site_file",
"=",
"\"s... | Convert JR6 .jr6 files to MagIC file(s)
Parameters
----------
mag_file : str
input file name
dir_path : str
working directory, default "."
input_dir_path : str
input file directory IF different from dir_path, default ""
meas_file : str
output measurement file nam... | [
"Convert",
"JR6",
".",
"jr6",
"files",
"to",
"MagIC",
"file",
"(",
"s",
")"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L4830-L5092 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | jr6_txt | def jr6_txt(mag_file, dir_path=".", input_dir_path="",
meas_file="measurements.txt", spec_file="specimens.txt",
samp_file="samples.txt", site_file="sites.txt", loc_file="locations.txt",
user="", specnum=1, samp_con='1', location='unknown', lat='', lon='',
noave=False, vol... | python | def jr6_txt(mag_file, dir_path=".", input_dir_path="",
meas_file="measurements.txt", spec_file="specimens.txt",
samp_file="samples.txt", site_file="sites.txt", loc_file="locations.txt",
user="", specnum=1, samp_con='1', location='unknown', lat='', lon='',
noave=False, vol... | [
"def",
"jr6_txt",
"(",
"mag_file",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"meas_file",
"=",
"\"measurements.txt\"",
",",
"spec_file",
"=",
"\"specimens.txt\"",
",",
"samp_file",
"=",
"\"samples.txt\"",
",",
"site_file",
"=",
"\"s... | Converts JR6 .txt format files to MagIC measurements format files.
Parameters
----------
mag_file : str
input file name
dir_path : str
working directory, default "."
input_dir_path : str
input file directory IF different from dir_path, default ""
meas_file : str
... | [
"Converts",
"JR6",
".",
"txt",
"format",
"files",
"to",
"MagIC",
"measurements",
"format",
"files",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L5098-L5357 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | k15 | def k15(k15file, dir_path='.', input_dir_path='',
meas_file='measurements.txt', aniso_outfile='specimens.txt',
samp_file="samples.txt", result_file ="rmag_anisotropy.txt",
specnum=0, sample_naming_con='1', location="unknown",
data_model_num=3):
"""
converts .k15 format data to Ma... | python | def k15(k15file, dir_path='.', input_dir_path='',
meas_file='measurements.txt', aniso_outfile='specimens.txt',
samp_file="samples.txt", result_file ="rmag_anisotropy.txt",
specnum=0, sample_naming_con='1', location="unknown",
data_model_num=3):
"""
converts .k15 format data to Ma... | [
"def",
"k15",
"(",
"k15file",
",",
"dir_path",
"=",
"'.'",
",",
"input_dir_path",
"=",
"''",
",",
"meas_file",
"=",
"'measurements.txt'",
",",
"aniso_outfile",
"=",
"'specimens.txt'",
",",
"samp_file",
"=",
"\"samples.txt\"",
",",
"result_file",
"=",
"\"rmag_ani... | converts .k15 format data to MagIC format.
assumes Jelinek Kappabridge measurement scheme.
Parameters
----------
k15file : str
input file name
dir_path : str
output file directory, default "."
input_dir_path : str
input file directory IF different from dir_path, default... | [
"converts",
".",
"k15",
"format",
"data",
"to",
"MagIC",
"format",
".",
"assumes",
"Jelinek",
"Kappabridge",
"measurement",
"scheme",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L5360-L5875 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | ldeo | def ldeo(magfile, dir_path=".", input_dir_path="",
meas_file="measurements.txt", spec_file="specimens.txt",
samp_file="samples.txt", site_file="sites.txt", loc_file="locations.txt",
specnum=0, samp_con="1", location="unknown", codelist="",
coil="", arm_labfield=50e-6, trm_peakT=873.,... | python | def ldeo(magfile, dir_path=".", input_dir_path="",
meas_file="measurements.txt", spec_file="specimens.txt",
samp_file="samples.txt", site_file="sites.txt", loc_file="locations.txt",
specnum=0, samp_con="1", location="unknown", codelist="",
coil="", arm_labfield=50e-6, trm_peakT=873.,... | [
"def",
"ldeo",
"(",
"magfile",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"meas_file",
"=",
"\"measurements.txt\"",
",",
"spec_file",
"=",
"\"specimens.txt\"",
",",
"samp_file",
"=",
"\"samples.txt\"",
",",
"site_file",
"=",
"\"sites... | converts Lamont Doherty Earth Observatory measurement files to MagIC data base model 3.0
Parameters
_________
magfile : input measurement file
dir_path : output directory path, default "."
input_dir_path : input file directory IF different from dir_path, default ""
meas_file : output file measu... | [
"converts",
"Lamont",
"Doherty",
"Earth",
"Observatory",
"measurement",
"files",
"to",
"MagIC",
"data",
"base",
"model",
"3",
".",
"0"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L6390-L6713 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | mini | def mini(magfile, dir_path='.', meas_file='measurements.txt',
data_model_num=3, volume=12, noave=0,
inst="", user="", methcode="LP-NO", input_dir_path=""):
"""
Convert the Yale minispin format to MagIC format files
Parameters
----------
magfile : str
input file name, requi... | python | def mini(magfile, dir_path='.', meas_file='measurements.txt',
data_model_num=3, volume=12, noave=0,
inst="", user="", methcode="LP-NO", input_dir_path=""):
"""
Convert the Yale minispin format to MagIC format files
Parameters
----------
magfile : str
input file name, requi... | [
"def",
"mini",
"(",
"magfile",
",",
"dir_path",
"=",
"'.'",
",",
"meas_file",
"=",
"'measurements.txt'",
",",
"data_model_num",
"=",
"3",
",",
"volume",
"=",
"12",
",",
"noave",
"=",
"0",
",",
"inst",
"=",
"\"\"",
",",
"user",
"=",
"\"\"",
",",
"meth... | Convert the Yale minispin format to MagIC format files
Parameters
----------
magfile : str
input file name, required
dir_path : str
working directory, default "."
meas_file : str
output measurement file name, default "measurements.txt"
data_model_num : int
MagIC ... | [
"Convert",
"the",
"Yale",
"minispin",
"format",
"to",
"MagIC",
"format",
"files"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L7594-L7769 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | mst | def mst(infile, spec_name='unknown', dir_path=".", input_dir_path="",
meas_file="measurements.txt", samp_infile="samples.txt",
user="", specnum=0, samp_con="1", labfield=0.5,
location='unknown', syn=False, data_model_num=3):
"""
Convert MsT data (T,M) to MagIC measurements format files
... | python | def mst(infile, spec_name='unknown', dir_path=".", input_dir_path="",
meas_file="measurements.txt", samp_infile="samples.txt",
user="", specnum=0, samp_con="1", labfield=0.5,
location='unknown', syn=False, data_model_num=3):
"""
Convert MsT data (T,M) to MagIC measurements format files
... | [
"def",
"mst",
"(",
"infile",
",",
"spec_name",
"=",
"'unknown'",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"meas_file",
"=",
"\"measurements.txt\"",
",",
"samp_infile",
"=",
"\"samples.txt\"",
",",
"user",
"=",
"\"\"",
",",
"spe... | Convert MsT data (T,M) to MagIC measurements format files
Parameters
----------
infile : str
input file name
specimen : str
specimen name, default "unknown"
dir_path : str
working directory, default "."
input_dir_path : str
input file directory IF different from ... | [
"Convert",
"MsT",
"data",
"(",
"T",
"M",
")",
"to",
"MagIC",
"measurements",
"format",
"files"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L7773-L8001 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | pmd | def pmd(mag_file, dir_path=".", input_dir_path="",
meas_file="measurements.txt", spec_file='specimens.txt',
samp_file='samples.txt', site_file="sites.txt", loc_file="locations.txt",
lat="", lon="", specnum=0, samp_con='1', location="unknown",
noave=0, meth_code="LP-NO"):
"""
conv... | python | def pmd(mag_file, dir_path=".", input_dir_path="",
meas_file="measurements.txt", spec_file='specimens.txt',
samp_file='samples.txt', site_file="sites.txt", loc_file="locations.txt",
lat="", lon="", specnum=0, samp_con='1', location="unknown",
noave=0, meth_code="LP-NO"):
"""
conv... | [
"def",
"pmd",
"(",
"mag_file",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"meas_file",
"=",
"\"measurements.txt\"",
",",
"spec_file",
"=",
"'specimens.txt'",
",",
"samp_file",
"=",
"'samples.txt'",
",",
"site_file",
"=",
"\"sites.txt... | converts PMD (Enkin) format files to MagIC format files
Parameters
----------
mag_file : str
input file name, required
dir_path : str
working directory, default "."
input_dir_path : str
input file directory IF different from dir_path, default ""
spec_file : str
... | [
"converts",
"PMD",
"(",
"Enkin",
")",
"format",
"files",
"to",
"MagIC",
"format",
"files"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L8007-L8221 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | sio | def sio(mag_file, dir_path=".", input_dir_path="",
meas_file="measurements.txt", spec_file="specimens.txt",
samp_file="samples.txt", site_file="sites.txt", loc_file="locations.txt",
samp_infile="", institution="", syn=False, syntype="", instrument="",
labfield=0, phi=0, theta=0, peakfiel... | python | def sio(mag_file, dir_path=".", input_dir_path="",
meas_file="measurements.txt", spec_file="specimens.txt",
samp_file="samples.txt", site_file="sites.txt", loc_file="locations.txt",
samp_infile="", institution="", syn=False, syntype="", instrument="",
labfield=0, phi=0, theta=0, peakfiel... | [
"def",
"sio",
"(",
"mag_file",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"meas_file",
"=",
"\"measurements.txt\"",
",",
"spec_file",
"=",
"\"specimens.txt\"",
",",
"samp_file",
"=",
"\"samples.txt\"",
",",
"site_file",
"=",
"\"sites... | converts Scripps Institution of Oceanography measurement files to MagIC data base model 3.0
Parameters
_________
magfile : input measurement file
dir_path : output directory path, default "."
input_dir_path : input file directory IF different from dir_path, default ""
meas_file : output file me... | [
"converts",
"Scripps",
"Institution",
"of",
"Oceanography",
"measurement",
"files",
"to",
"MagIC",
"data",
"base",
"model",
"3",
".",
"0"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L8226-L8897 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | s_magic | def s_magic(sfile, anisfile="specimens.txt", dir_path=".", atype="AMS",
coord_type="s", sigma=False, samp_con="1", specnum=0,
location="unknown", spec="unknown", sitename="unknown",
user="", data_model_num=3, name_in_file=False, input_dir_path=""):
"""
converts .s format data... | python | def s_magic(sfile, anisfile="specimens.txt", dir_path=".", atype="AMS",
coord_type="s", sigma=False, samp_con="1", specnum=0,
location="unknown", spec="unknown", sitename="unknown",
user="", data_model_num=3, name_in_file=False, input_dir_path=""):
"""
converts .s format data... | [
"def",
"s_magic",
"(",
"sfile",
",",
"anisfile",
"=",
"\"specimens.txt\"",
",",
"dir_path",
"=",
"\".\"",
",",
"atype",
"=",
"\"AMS\"",
",",
"coord_type",
"=",
"\"s\"",
",",
"sigma",
"=",
"False",
",",
"samp_con",
"=",
"\"1\"",
",",
"specnum",
"=",
"0",
... | converts .s format data to measurements format.
Parameters
----------
sfile : str
.s format file, required
anisfile : str
specimen filename, default 'specimens.txt'
dir_path : str
output directory, default "."
atype : str
anisotropy type (AMS, AARM, ATRM, default... | [
"converts",
".",
"s",
"format",
"data",
"to",
"measurements",
"format",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L8902-L9094 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | sufar4 | def sufar4(ascfile, meas_output='measurements.txt', aniso_output='rmag_anisotropy.txt',
spec_infile=None, spec_outfile='specimens.txt', samp_outfile='samples.txt',
site_outfile='sites.txt', specnum=0, sample_naming_con='1', user="",
locname="unknown", instrument='', static_15_position_m... | python | def sufar4(ascfile, meas_output='measurements.txt', aniso_output='rmag_anisotropy.txt',
spec_infile=None, spec_outfile='specimens.txt', samp_outfile='samples.txt',
site_outfile='sites.txt', specnum=0, sample_naming_con='1', user="",
locname="unknown", instrument='', static_15_position_m... | [
"def",
"sufar4",
"(",
"ascfile",
",",
"meas_output",
"=",
"'measurements.txt'",
",",
"aniso_output",
"=",
"'rmag_anisotropy.txt'",
",",
"spec_infile",
"=",
"None",
",",
"spec_outfile",
"=",
"'specimens.txt'",
",",
"samp_outfile",
"=",
"'samples.txt'",
",",
"site_out... | Converts ascii files generated by SUFAR ver.4.0 to MagIC files
Parameters
----------
ascfile : str
input ASC file, required
meas_output : str
measurement output filename, default "measurements.txt"
aniso_output : str
anisotropy output filename, MagIC 2 only, "rmag_anisotropy... | [
"Converts",
"ascii",
"files",
"generated",
"by",
"SUFAR",
"ver",
".",
"4",
".",
"0",
"to",
"MagIC",
"files"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L9100-L9564 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | tdt | def tdt(input_dir_path, experiment_name="Thellier", meas_file_name="measurements.txt",
spec_file_name="specimens.txt", samp_file_name="samples.txt",
site_file_name="sites.txt", loc_file_name="locations.txt",
user="", location="", lab_dec=0, lab_inc=90, moment_units="mA/m",
samp_name_con=... | python | def tdt(input_dir_path, experiment_name="Thellier", meas_file_name="measurements.txt",
spec_file_name="specimens.txt", samp_file_name="samples.txt",
site_file_name="sites.txt", loc_file_name="locations.txt",
user="", location="", lab_dec=0, lab_inc=90, moment_units="mA/m",
samp_name_con=... | [
"def",
"tdt",
"(",
"input_dir_path",
",",
"experiment_name",
"=",
"\"Thellier\"",
",",
"meas_file_name",
"=",
"\"measurements.txt\"",
",",
"spec_file_name",
"=",
"\"specimens.txt\"",
",",
"samp_file_name",
"=",
"\"samples.txt\"",
",",
"site_file_name",
"=",
"\"sites.txt... | converts TDT formatted files to measurements format files
Parameters
----------
input_dir_path : str
directory with one or more .tdt files
experiment: str
one of: ["Thellier", "ATRM 6 pos", "NLT"], default "Thellier"
meas_file_name : str
default "measurements.txt"
spec_f... | [
"converts",
"TDT",
"formatted",
"files",
"to",
"measurements",
"format",
"files"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L9567-L10280 |
PmagPy/PmagPy | pmagpy/convert_2_magic.py | utrecht | def utrecht(mag_file, dir_path=".", input_dir_path="", meas_file="measurements.txt",
spec_file="specimens.txt", samp_file="samples.txt", site_file="sites.txt",
loc_file="locations.txt", location="unknown", lat="", lon="", dmy_flag=False,
noave=False, meas_n_orient=8, meth_code="LP-N... | python | def utrecht(mag_file, dir_path=".", input_dir_path="", meas_file="measurements.txt",
spec_file="specimens.txt", samp_file="samples.txt", site_file="sites.txt",
loc_file="locations.txt", location="unknown", lat="", lon="", dmy_flag=False,
noave=False, meas_n_orient=8, meth_code="LP-N... | [
"def",
"utrecht",
"(",
"mag_file",
",",
"dir_path",
"=",
"\".\"",
",",
"input_dir_path",
"=",
"\"\"",
",",
"meas_file",
"=",
"\"measurements.txt\"",
",",
"spec_file",
"=",
"\"specimens.txt\"",
",",
"samp_file",
"=",
"\"samples.txt\"",
",",
"site_file",
"=",
"\"s... | Converts Utrecht magnetometer data files to MagIC files
Parameters
----------
mag_file : str
input file name
dir_path : str
working directory, default "."
input_dir_path : str
input file directory IF different from dir_path, default ""
spec_file : str
output spec... | [
"Converts",
"Utrecht",
"magnetometer",
"data",
"files",
"to",
"MagIC",
"files"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/convert_2_magic.py#L10287-L10612 |
PmagPy/PmagPy | SPD/spd.py | make_thing | def make_thing():
""" makes example PintPars object """
cwd = os.getcwd()
main_dir = cwd + '/SPD'
try:
import new_lj_thellier_gui_spd as tgs
gui = tgs.Arai_GUI('/magic_measurements.txt', main_dir)
specimens = list(gui.Data.keys())
thing = PintPars(gui.Data, '0238x6011044'... | python | def make_thing():
""" makes example PintPars object """
cwd = os.getcwd()
main_dir = cwd + '/SPD'
try:
import new_lj_thellier_gui_spd as tgs
gui = tgs.Arai_GUI('/magic_measurements.txt', main_dir)
specimens = list(gui.Data.keys())
thing = PintPars(gui.Data, '0238x6011044'... | [
"def",
"make_thing",
"(",
")",
":",
"cwd",
"=",
"os",
".",
"getcwd",
"(",
")",
"main_dir",
"=",
"cwd",
"+",
"'/SPD'",
"try",
":",
"import",
"new_lj_thellier_gui_spd",
"as",
"tgs",
"gui",
"=",
"tgs",
".",
"Arai_GUI",
"(",
"'/magic_measurements.txt'",
",",
... | makes example PintPars object | [
"makes",
"example",
"PintPars",
"object"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/SPD/spd.py#L806-L823 |
PmagPy/PmagPy | SPD/spd.py | PintPars.get_curve_prime | def get_curve_prime(self):
"""not in SPD documentation. same as k, but using the segment instead of the full data set"""
if len(self.x_Arai_segment) < 4:
self.pars['specimen_k_prime'], self.pars['specimen_k_prime_sse'] = 0, 0
return 0
data = lib_k.AraiCurvature(self.x_Ar... | python | def get_curve_prime(self):
"""not in SPD documentation. same as k, but using the segment instead of the full data set"""
if len(self.x_Arai_segment) < 4:
self.pars['specimen_k_prime'], self.pars['specimen_k_prime_sse'] = 0, 0
return 0
data = lib_k.AraiCurvature(self.x_Ar... | [
"def",
"get_curve_prime",
"(",
"self",
")",
":",
"if",
"len",
"(",
"self",
".",
"x_Arai_segment",
")",
"<",
"4",
":",
"self",
".",
"pars",
"[",
"'specimen_k_prime'",
"]",
",",
"self",
".",
"pars",
"[",
"'specimen_k_prime_sse'",
"]",
"=",
"0",
",",
"0",... | not in SPD documentation. same as k, but using the segment instead of the full data set | [
"not",
"in",
"SPD",
"documentation",
".",
"same",
"as",
"k",
"but",
"using",
"the",
"segment",
"instead",
"of",
"the",
"full",
"data",
"set"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/SPD/spd.py#L274-L281 |
PmagPy/PmagPy | SPD/spd.py | PintPars.get_ptrm_dec_and_inc | def get_ptrm_dec_and_inc(self):
"""not included in spd."""
PTRMS = self.PTRMS[1:]
CART_pTRMS_orig = numpy.array([lib_direct.dir2cart(row[1:4]) for row in PTRMS])
#B_lab_dir = [self.B_lab_dir[0], self.B_lab_dir[1], 1.] # dir
tmin, tmax = self.t_Arai[0], self.t_Arai[-1]
ptr... | python | def get_ptrm_dec_and_inc(self):
"""not included in spd."""
PTRMS = self.PTRMS[1:]
CART_pTRMS_orig = numpy.array([lib_direct.dir2cart(row[1:4]) for row in PTRMS])
#B_lab_dir = [self.B_lab_dir[0], self.B_lab_dir[1], 1.] # dir
tmin, tmax = self.t_Arai[0], self.t_Arai[-1]
ptr... | [
"def",
"get_ptrm_dec_and_inc",
"(",
"self",
")",
":",
"PTRMS",
"=",
"self",
".",
"PTRMS",
"[",
"1",
":",
"]",
"CART_pTRMS_orig",
"=",
"numpy",
".",
"array",
"(",
"[",
"lib_direct",
".",
"dir2cart",
"(",
"row",
"[",
"1",
":",
"4",
"]",
")",
"for",
"... | not included in spd. | [
"not",
"included",
"in",
"spd",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/SPD/spd.py#L391-L401 |
PmagPy/PmagPy | programs/thellier_magic.py | main | def main():
"""
NAME
thellier_magic.py
DESCRIPTION
plots Thellier-Thellier data in version 3.0 format
Reads saved interpretations from a specimen formatted table, default: specimens.txt
SYNTAX
thellier_magic.py [command line options]
OPTIONS
-h prints help ... | python | def main():
"""
NAME
thellier_magic.py
DESCRIPTION
plots Thellier-Thellier data in version 3.0 format
Reads saved interpretations from a specimen formatted table, default: specimens.txt
SYNTAX
thellier_magic.py [command line options]
OPTIONS
-h prints help ... | [
"def",
"main",
"(",
")",
":",
"#",
"# parse command line options",
"#",
"if",
"'-h'",
"in",
"sys",
".",
"argv",
":",
"print",
"(",
"main",
".",
"__doc__",
")",
"sys",
".",
"exit",
"(",
")",
"dir_path",
"=",
"pmag",
".",
"get_named_arg",
"(",
"\"-WD\"",... | NAME
thellier_magic.py
DESCRIPTION
plots Thellier-Thellier data in version 3.0 format
Reads saved interpretations from a specimen formatted table, default: specimens.txt
SYNTAX
thellier_magic.py [command line options]
OPTIONS
-h prints help message and quits
... | [
"NAME",
"thellier_magic",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/thellier_magic.py#L18-L100 |
PmagPy/PmagPy | pmagpy/data_model3.py | DataModel.get_data_model | def get_data_model(self):
"""
Try to download the data model from Earthref.
If that fails, grab the cached data model.
"""
if len(DM):
self.dm = DM
self.crit_map = CRIT_MAP
return
if not set_env.OFFLINE:
dm = self.get_dm_onl... | python | def get_data_model(self):
"""
Try to download the data model from Earthref.
If that fails, grab the cached data model.
"""
if len(DM):
self.dm = DM
self.crit_map = CRIT_MAP
return
if not set_env.OFFLINE:
dm = self.get_dm_onl... | [
"def",
"get_data_model",
"(",
"self",
")",
":",
"if",
"len",
"(",
"DM",
")",
":",
"self",
".",
"dm",
"=",
"DM",
"self",
".",
"crit_map",
"=",
"CRIT_MAP",
"return",
"if",
"not",
"set_env",
".",
"OFFLINE",
":",
"dm",
"=",
"self",
".",
"get_dm_online",
... | Try to download the data model from Earthref.
If that fails, grab the cached data model. | [
"Try",
"to",
"download",
"the",
"data",
"model",
"from",
"Earthref",
".",
"If",
"that",
"fails",
"grab",
"the",
"cached",
"data",
"model",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/data_model3.py#L35-L53 |
PmagPy/PmagPy | pmagpy/data_model3.py | DataModel.get_dm_offline | def get_dm_offline(self):
"""
Grab the 3.0 data model from the PmagPy/pmagpy directory
Returns
---------
full : DataFrame
cached data model json in DataFrame format
"""
model_file = self.find_cached_dm()
try:
f = open(model_file, '... | python | def get_dm_offline(self):
"""
Grab the 3.0 data model from the PmagPy/pmagpy directory
Returns
---------
full : DataFrame
cached data model json in DataFrame format
"""
model_file = self.find_cached_dm()
try:
f = open(model_file, '... | [
"def",
"get_dm_offline",
"(",
"self",
")",
":",
"model_file",
"=",
"self",
".",
"find_cached_dm",
"(",
")",
"try",
":",
"f",
"=",
"open",
"(",
"model_file",
",",
"'r'",
",",
"encoding",
"=",
"'utf-8-sig'",
")",
"except",
"TypeError",
":",
"f",
"=",
"op... | Grab the 3.0 data model from the PmagPy/pmagpy directory
Returns
---------
full : DataFrame
cached data model json in DataFrame format | [
"Grab",
"the",
"3",
".",
"0",
"data",
"model",
"from",
"the",
"PmagPy",
"/",
"pmagpy",
"directory"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/data_model3.py#L56-L74 |
PmagPy/PmagPy | pmagpy/data_model3.py | DataModel.get_dm_online | def get_dm_online(self):
"""
Use requests module to get data model from Earthref.
If this fails or times out, return false.
Returns
---------
result : requests.models.Response, False if unsuccessful
"""
if not requests:
return False
tr... | python | def get_dm_online(self):
"""
Use requests module to get data model from Earthref.
If this fails or times out, return false.
Returns
---------
result : requests.models.Response, False if unsuccessful
"""
if not requests:
return False
tr... | [
"def",
"get_dm_online",
"(",
"self",
")",
":",
"if",
"not",
"requests",
":",
"return",
"False",
"try",
":",
"req",
"=",
"requests",
".",
"get",
"(",
"\"https://earthref.org/MagIC/data-models/3.0.json\"",
",",
"timeout",
"=",
"3",
")",
"if",
"not",
"req",
"."... | Use requests module to get data model from Earthref.
If this fails or times out, return false.
Returns
---------
result : requests.models.Response, False if unsuccessful | [
"Use",
"requests",
"module",
"to",
"get",
"data",
"model",
"from",
"Earthref",
".",
"If",
"this",
"fails",
"or",
"times",
"out",
"return",
"false",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/data_model3.py#L77-L95 |
PmagPy/PmagPy | pmagpy/data_model3.py | DataModel.parse_cache | def parse_cache(self, full_df):
"""
Format the cached data model into a dictionary of DataFrames
and a criteria map DataFrame.
Parameters
----------
full_df : DataFrame
result of self.get_dm_offline()
Returns
----------
data_model : d... | python | def parse_cache(self, full_df):
"""
Format the cached data model into a dictionary of DataFrames
and a criteria map DataFrame.
Parameters
----------
full_df : DataFrame
result of self.get_dm_offline()
Returns
----------
data_model : d... | [
"def",
"parse_cache",
"(",
"self",
",",
"full_df",
")",
":",
"data_model",
"=",
"{",
"}",
"levels",
"=",
"[",
"'specimens'",
",",
"'samples'",
",",
"'sites'",
",",
"'locations'",
",",
"'ages'",
",",
"'measurements'",
",",
"'criteria'",
",",
"'contribution'",... | Format the cached data model into a dictionary of DataFrames
and a criteria map DataFrame.
Parameters
----------
full_df : DataFrame
result of self.get_dm_offline()
Returns
----------
data_model : dictionary of DataFrames
crit_map : DataFrame | [
"Format",
"the",
"cached",
"data",
"model",
"into",
"a",
"dictionary",
"of",
"DataFrames",
"and",
"a",
"criteria",
"map",
"DataFrame",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/data_model3.py#L98-L123 |
PmagPy/PmagPy | pmagpy/data_model3.py | DataModel.parse | def parse(self, data_model, crit):
"""
Take the relevant pieces of the data model json
and parse into data model and criteria map.
Parameters
----------
data_model : data model piece of json (nested dicts)
crit : criteria map piece of json (nested dicts)
... | python | def parse(self, data_model, crit):
"""
Take the relevant pieces of the data model json
and parse into data model and criteria map.
Parameters
----------
data_model : data model piece of json (nested dicts)
crit : criteria map piece of json (nested dicts)
... | [
"def",
"parse",
"(",
"self",
",",
"data_model",
",",
"crit",
")",
":",
"# data model",
"tables",
"=",
"pd",
".",
"DataFrame",
"(",
"data_model",
")",
"data_model",
"=",
"{",
"}",
"for",
"table_name",
"in",
"tables",
".",
"columns",
":",
"data_model",
"["... | Take the relevant pieces of the data model json
and parse into data model and criteria map.
Parameters
----------
data_model : data model piece of json (nested dicts)
crit : criteria map piece of json (nested dicts)
Returns
----------
data_model : dictio... | [
"Take",
"the",
"relevant",
"pieces",
"of",
"the",
"data",
"model",
"json",
"and",
"parse",
"into",
"data",
"model",
"and",
"criteria",
"map",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/data_model3.py#L126-L159 |
PmagPy/PmagPy | pmagpy/data_model3.py | DataModel.parse_response | def parse_response(self, raw):
"""
Format the requested data model into a dictionary of DataFrames
and a criteria map DataFrame.
Take data returned by a requests.get call to Earthref.
Parameters
----------
raw: 'requests.models.Response'
Returns
... | python | def parse_response(self, raw):
"""
Format the requested data model into a dictionary of DataFrames
and a criteria map DataFrame.
Take data returned by a requests.get call to Earthref.
Parameters
----------
raw: 'requests.models.Response'
Returns
... | [
"def",
"parse_response",
"(",
"self",
",",
"raw",
")",
":",
"tables",
"=",
"raw",
".",
"json",
"(",
")",
"[",
"'tables'",
"]",
"crit",
"=",
"raw",
".",
"json",
"(",
")",
"[",
"'criteria_map'",
"]",
"return",
"self",
".",
"parse",
"(",
"tables",
","... | Format the requested data model into a dictionary of DataFrames
and a criteria map DataFrame.
Take data returned by a requests.get call to Earthref.
Parameters
----------
raw: 'requests.models.Response'
Returns
---------
data_model : dictionary of DataFr... | [
"Format",
"the",
"requested",
"data",
"model",
"into",
"a",
"dictionary",
"of",
"DataFrames",
"and",
"a",
"criteria",
"map",
"DataFrame",
".",
"Take",
"data",
"returned",
"by",
"a",
"requests",
".",
"get",
"call",
"to",
"Earthref",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/data_model3.py#L162-L180 |
PmagPy/PmagPy | pmagpy/data_model3.py | DataModel.find_cached_dm | def find_cached_dm(self):
"""
Find filename where cached data model json is stored.
Returns
---------
model_file : str
data model json file location
"""
pmag_dir = find_pmag_dir.get_pmag_dir()
if pmag_dir is None:
pmag_dir = '.'
... | python | def find_cached_dm(self):
"""
Find filename where cached data model json is stored.
Returns
---------
model_file : str
data model json file location
"""
pmag_dir = find_pmag_dir.get_pmag_dir()
if pmag_dir is None:
pmag_dir = '.'
... | [
"def",
"find_cached_dm",
"(",
"self",
")",
":",
"pmag_dir",
"=",
"find_pmag_dir",
".",
"get_pmag_dir",
"(",
")",
"if",
"pmag_dir",
"is",
"None",
":",
"pmag_dir",
"=",
"'.'",
"model_file",
"=",
"os",
".",
"path",
".",
"join",
"(",
"pmag_dir",
",",
"'pmagp... | Find filename where cached data model json is stored.
Returns
---------
model_file : str
data model json file location | [
"Find",
"filename",
"where",
"cached",
"data",
"model",
"json",
"is",
"stored",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/data_model3.py#L183-L205 |
PmagPy/PmagPy | pmagpy/data_model3.py | DataModel.cache_data_model | def cache_data_model(self, raw):
"""
Cache the data model json.
Take data returned by a requests.get call to Earthref.
Parameters
----------
raw: requests.models.Response
"""
output_json = json.loads(raw.content)
output_file = self.find_cached_dm... | python | def cache_data_model(self, raw):
"""
Cache the data model json.
Take data returned by a requests.get call to Earthref.
Parameters
----------
raw: requests.models.Response
"""
output_json = json.loads(raw.content)
output_file = self.find_cached_dm... | [
"def",
"cache_data_model",
"(",
"self",
",",
"raw",
")",
":",
"output_json",
"=",
"json",
".",
"loads",
"(",
"raw",
".",
"content",
")",
"output_file",
"=",
"self",
".",
"find_cached_dm",
"(",
")",
"json",
".",
"dump",
"(",
"output_json",
",",
"open",
... | Cache the data model json.
Take data returned by a requests.get call to Earthref.
Parameters
----------
raw: requests.models.Response | [
"Cache",
"the",
"data",
"model",
"json",
".",
"Take",
"data",
"returned",
"by",
"a",
"requests",
".",
"get",
"call",
"to",
"Earthref",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/data_model3.py#L208-L220 |
PmagPy/PmagPy | pmagpy/data_model3.py | DataModel.get_groups | def get_groups(self, table_name):
"""
Return list of all groups for a particular data type
"""
df = self.dm[table_name]
return list(df['group'].unique()) | python | def get_groups(self, table_name):
"""
Return list of all groups for a particular data type
"""
df = self.dm[table_name]
return list(df['group'].unique()) | [
"def",
"get_groups",
"(",
"self",
",",
"table_name",
")",
":",
"df",
"=",
"self",
".",
"dm",
"[",
"table_name",
"]",
"return",
"list",
"(",
"df",
"[",
"'group'",
"]",
".",
"unique",
"(",
")",
")"
] | Return list of all groups for a particular data type | [
"Return",
"list",
"of",
"all",
"groups",
"for",
"a",
"particular",
"data",
"type"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/data_model3.py#L225-L230 |
PmagPy/PmagPy | pmagpy/data_model3.py | DataModel.get_group_headers | def get_group_headers(self, table_name, group_name):
"""
Return a list of all headers for a given group
"""
# get all headers of a particular group
df = self.dm[table_name]
cond = df['group'] == group_name
return df[cond].index | python | def get_group_headers(self, table_name, group_name):
"""
Return a list of all headers for a given group
"""
# get all headers of a particular group
df = self.dm[table_name]
cond = df['group'] == group_name
return df[cond].index | [
"def",
"get_group_headers",
"(",
"self",
",",
"table_name",
",",
"group_name",
")",
":",
"# get all headers of a particular group",
"df",
"=",
"self",
".",
"dm",
"[",
"table_name",
"]",
"cond",
"=",
"df",
"[",
"'group'",
"]",
"==",
"group_name",
"return",
"df"... | Return a list of all headers for a given group | [
"Return",
"a",
"list",
"of",
"all",
"headers",
"for",
"a",
"given",
"group"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/data_model3.py#L232-L239 |
PmagPy/PmagPy | pmagpy/data_model3.py | DataModel.get_reqd_headers | def get_reqd_headers(self, table_name):
"""
Return a list of all required headers for a particular table
"""
df = self.dm[table_name]
cond = df['validations'].map(lambda x: 'required()' in str(x))
return df[cond].index | python | def get_reqd_headers(self, table_name):
"""
Return a list of all required headers for a particular table
"""
df = self.dm[table_name]
cond = df['validations'].map(lambda x: 'required()' in str(x))
return df[cond].index | [
"def",
"get_reqd_headers",
"(",
"self",
",",
"table_name",
")",
":",
"df",
"=",
"self",
".",
"dm",
"[",
"table_name",
"]",
"cond",
"=",
"df",
"[",
"'validations'",
"]",
".",
"map",
"(",
"lambda",
"x",
":",
"'required()'",
"in",
"str",
"(",
"x",
")",
... | Return a list of all required headers for a particular table | [
"Return",
"a",
"list",
"of",
"all",
"required",
"headers",
"for",
"a",
"particular",
"table"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/data_model3.py#L241-L247 |
PmagPy/PmagPy | pmagpy/data_model3.py | DataModel.get_group_for_col | def get_group_for_col(self, table_name, col_name):
"""
Check data model to find group name for a given column header
Parameters
----------
table_name: str
col_name: str
Returns
---------
group_name: str
"""
df = self.dm[table_name... | python | def get_group_for_col(self, table_name, col_name):
"""
Check data model to find group name for a given column header
Parameters
----------
table_name: str
col_name: str
Returns
---------
group_name: str
"""
df = self.dm[table_name... | [
"def",
"get_group_for_col",
"(",
"self",
",",
"table_name",
",",
"col_name",
")",
":",
"df",
"=",
"self",
".",
"dm",
"[",
"table_name",
"]",
"try",
":",
"group_name",
"=",
"df",
".",
"loc",
"[",
"col_name",
",",
"'group'",
"]",
"except",
"KeyError",
":... | Check data model to find group name for a given column header
Parameters
----------
table_name: str
col_name: str
Returns
---------
group_name: str | [
"Check",
"data",
"model",
"to",
"find",
"group",
"name",
"for",
"a",
"given",
"column",
"header"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/data_model3.py#L249-L267 |
PmagPy/PmagPy | programs/fisher.py | main | def main():
"""
NAME
fisher.py
DESCRIPTION
generates set of Fisher distribed data from specified distribution
INPUT (COMMAND LINE ENTRY)
OUTPUT
dec, inc
SYNTAX
fisher.py [-h] [-i] [command line options]
OPTIONS
-h prints help message and quits
... | python | def main():
"""
NAME
fisher.py
DESCRIPTION
generates set of Fisher distribed data from specified distribution
INPUT (COMMAND LINE ENTRY)
OUTPUT
dec, inc
SYNTAX
fisher.py [-h] [-i] [command line options]
OPTIONS
-h prints help message and quits
... | [
"def",
"main",
"(",
")",
":",
"N",
",",
"kappa",
"=",
"100",
",",
"20",
"if",
"'-h'",
"in",
"sys",
".",
"argv",
":",
"print",
"(",
"main",
".",
"__doc__",
")",
"sys",
".",
"exit",
"(",
")",
"elif",
"'-i'",
"in",
"sys",
".",
"argv",
":",
"ans"... | NAME
fisher.py
DESCRIPTION
generates set of Fisher distribed data from specified distribution
INPUT (COMMAND LINE ENTRY)
OUTPUT
dec, inc
SYNTAX
fisher.py [-h] [-i] [command line options]
OPTIONS
-h prints help message and quits
-i for interactive ... | [
"NAME",
"fisher",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/fisher.py#L13-L54 |
PmagPy/PmagPy | programs/pmm_redo.py | main | def main():
"""
NAME
pmm_redo.py
DESCRIPTION
converts the UCSC PMM files format to PmagPy redo file
SYNTAX
pmm_redo.py [-h] [command line options]
OPTIONS
-h: prints help message and quits
-f FILE: specify input file
-F FILE: specify output file, d... | python | def main():
"""
NAME
pmm_redo.py
DESCRIPTION
converts the UCSC PMM files format to PmagPy redo file
SYNTAX
pmm_redo.py [-h] [command line options]
OPTIONS
-h: prints help message and quits
-f FILE: specify input file
-F FILE: specify output file, d... | [
"def",
"main",
"(",
")",
":",
"dir_path",
"=",
"'.'",
"if",
"'-WD'",
"in",
"sys",
".",
"argv",
":",
"ind",
"=",
"sys",
".",
"argv",
".",
"index",
"(",
"'-WD'",
")",
"dir_path",
"=",
"sys",
".",
"argv",
"[",
"ind",
"+",
"1",
"]",
"zfile",
"=",
... | NAME
pmm_redo.py
DESCRIPTION
converts the UCSC PMM files format to PmagPy redo file
SYNTAX
pmm_redo.py [-h] [command line options]
OPTIONS
-h: prints help message and quits
-f FILE: specify input file
-F FILE: specify output file, default is 'zeq_redo' | [
"NAME",
"pmm_redo",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/pmm_redo.py#L6-L71 |
PmagPy/PmagPy | programs/fishqq.py | main | def main():
"""
NAME
fishqq.py
DESCRIPTION
makes qq plot from dec,inc input data
INPUT FORMAT
takes dec/inc pairs in space delimited file
SYNTAX
fishqq.py [command line options]
OPTIONS
-h help message
-f FILE, specify file on command line
... | python | def main():
"""
NAME
fishqq.py
DESCRIPTION
makes qq plot from dec,inc input data
INPUT FORMAT
takes dec/inc pairs in space delimited file
SYNTAX
fishqq.py [command line options]
OPTIONS
-h help message
-f FILE, specify file on command line
... | [
"def",
"main",
"(",
")",
":",
"fmt",
",",
"plot",
"=",
"'svg'",
",",
"0",
"outfile",
"=",
"\"\"",
"if",
"'-h'",
"in",
"sys",
".",
"argv",
":",
"# check if help is needed",
"print",
"(",
"main",
".",
"__doc__",
")",
"sys",
".",
"exit",
"(",
")",
"# ... | NAME
fishqq.py
DESCRIPTION
makes qq plot from dec,inc input data
INPUT FORMAT
takes dec/inc pairs in space delimited file
SYNTAX
fishqq.py [command line options]
OPTIONS
-h help message
-f FILE, specify file on command line
-F FILE, specify output ... | [
"NAME",
"fishqq",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/fishqq.py#L12-L157 |
PmagPy/PmagPy | programs/lnp_magic.py | main | def main():
"""
NAME
lnp_magic.py
DESCRIPTION
makes equal area projections site by site
from specimen formatted file with
Fisher confidence ellipse using McFadden and McElhinny (1988)
technique for combining lines and planes
SYNTAX
lnp_magic [command l... | python | def main():
"""
NAME
lnp_magic.py
DESCRIPTION
makes equal area projections site by site
from specimen formatted file with
Fisher confidence ellipse using McFadden and McElhinny (1988)
technique for combining lines and planes
SYNTAX
lnp_magic [command l... | [
"def",
"main",
"(",
")",
":",
"if",
"'-h'",
"in",
"sys",
".",
"argv",
":",
"print",
"(",
"main",
".",
"__doc__",
")",
"sys",
".",
"exit",
"(",
")",
"dir_path",
"=",
"pmag",
".",
"get_named_arg",
"(",
"\"-WD\"",
",",
"\".\"",
")",
"data_model",
"=",... | NAME
lnp_magic.py
DESCRIPTION
makes equal area projections site by site
from specimen formatted file with
Fisher confidence ellipse using McFadden and McElhinny (1988)
technique for combining lines and planes
SYNTAX
lnp_magic [command line options]
INPUT
... | [
"NAME",
"lnp_magic",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/lnp_magic.py#L14-L210 |
PmagPy/PmagPy | pmagpy/builder2.py | get_item_string | def get_item_string(items_list):
"""
take in a list of pmag_objects
return a colon-delimited list of the findable names
"""
if not items_list:
return ''
string_list = []
for item in items_list:
try:
name = item.name
string_list.append(name)
exc... | python | def get_item_string(items_list):
"""
take in a list of pmag_objects
return a colon-delimited list of the findable names
"""
if not items_list:
return ''
string_list = []
for item in items_list:
try:
name = item.name
string_list.append(name)
exc... | [
"def",
"get_item_string",
"(",
"items_list",
")",
":",
"if",
"not",
"items_list",
":",
"return",
"''",
"string_list",
"=",
"[",
"]",
"for",
"item",
"in",
"items_list",
":",
"try",
":",
"name",
"=",
"item",
".",
"name",
"string_list",
".",
"append",
"(",
... | take in a list of pmag_objects
return a colon-delimited list of the findable names | [
"take",
"in",
"a",
"list",
"of",
"pmag_objects",
"return",
"a",
"colon",
"-",
"delimited",
"list",
"of",
"the",
"findable",
"names"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1775-L1789 |
PmagPy/PmagPy | pmagpy/builder2.py | combine_dicts | def combine_dicts(new_dict, old_dict):
"""
returns a dictionary with all key, value pairs from new_dict.
also returns key, value pairs from old_dict, if that key does not exist in new_dict.
if a key is present in both new_dict and old_dict, the new_dict value will take precedence.
"""
old_data_k... | python | def combine_dicts(new_dict, old_dict):
"""
returns a dictionary with all key, value pairs from new_dict.
also returns key, value pairs from old_dict, if that key does not exist in new_dict.
if a key is present in both new_dict and old_dict, the new_dict value will take precedence.
"""
old_data_k... | [
"def",
"combine_dicts",
"(",
"new_dict",
",",
"old_dict",
")",
":",
"old_data_keys",
"=",
"list",
"(",
"old_dict",
".",
"keys",
"(",
")",
")",
"new_data_keys",
"=",
"list",
"(",
"new_dict",
".",
"keys",
"(",
")",
")",
"all_keys",
"=",
"set",
"(",
"old_... | returns a dictionary with all key, value pairs from new_dict.
also returns key, value pairs from old_dict, if that key does not exist in new_dict.
if a key is present in both new_dict and old_dict, the new_dict value will take precedence. | [
"returns",
"a",
"dictionary",
"with",
"all",
"key",
"value",
"pairs",
"from",
"new_dict",
".",
"also",
"returns",
"key",
"value",
"pairs",
"from",
"old_dict",
"if",
"that",
"key",
"does",
"not",
"exist",
"in",
"new_dict",
".",
"if",
"a",
"key",
"is",
"pr... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1815-L1830 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.find_by_name | def find_by_name(self, item_name, items_list, name_list=None):
"""
Return item from items_list with name item_name.
"""
if not name_list:
names = [item.name for item in items_list if item]
else:
names = name_list
if item_name in names:
... | python | def find_by_name(self, item_name, items_list, name_list=None):
"""
Return item from items_list with name item_name.
"""
if not name_list:
names = [item.name for item in items_list if item]
else:
names = name_list
if item_name in names:
... | [
"def",
"find_by_name",
"(",
"self",
",",
"item_name",
",",
"items_list",
",",
"name_list",
"=",
"None",
")",
":",
"if",
"not",
"name_list",
":",
"names",
"=",
"[",
"item",
".",
"name",
"for",
"item",
"in",
"items_list",
"if",
"item",
"]",
"else",
":",
... | Return item from items_list with name item_name. | [
"Return",
"item",
"from",
"items_list",
"with",
"name",
"item_name",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L97-L108 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.find_or_create_by_name | def find_or_create_by_name(self, item_name, items_list, item_type):
"""
See if item with item_name exists in item_list.
If not, create that item.
Either way, return an item of type item_type.
"""
item = self.find_by_name(item_name, items_list)
if not item:
... | python | def find_or_create_by_name(self, item_name, items_list, item_type):
"""
See if item with item_name exists in item_list.
If not, create that item.
Either way, return an item of type item_type.
"""
item = self.find_by_name(item_name, items_list)
if not item:
... | [
"def",
"find_or_create_by_name",
"(",
"self",
",",
"item_name",
",",
"items_list",
",",
"item_type",
")",
":",
"item",
"=",
"self",
".",
"find_by_name",
"(",
"item_name",
",",
"items_list",
")",
"if",
"not",
"item",
":",
"item",
"=",
"self",
".",
"data_lis... | See if item with item_name exists in item_list.
If not, create that item.
Either way, return an item of type item_type. | [
"See",
"if",
"item",
"with",
"item_name",
"exists",
"in",
"item_list",
".",
"If",
"not",
"create",
"that",
"item",
".",
"Either",
"way",
"return",
"an",
"item",
"of",
"type",
"item_type",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L110-L119 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.init_default_headers | def init_default_headers(self):
"""
initialize default required headers.
if there were any pre-existing headers, keep them also.
"""
if not self.data_model:
self.data_model = validate_upload.get_data_model()
if not self.data_model:
print("C... | python | def init_default_headers(self):
"""
initialize default required headers.
if there were any pre-existing headers, keep them also.
"""
if not self.data_model:
self.data_model = validate_upload.get_data_model()
if not self.data_model:
print("C... | [
"def",
"init_default_headers",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"data_model",
":",
"self",
".",
"data_model",
"=",
"validate_upload",
".",
"get_data_model",
"(",
")",
"if",
"not",
"self",
".",
"data_model",
":",
"print",
"(",
"\"Can't access ... | initialize default required headers.
if there were any pre-existing headers, keep them also. | [
"initialize",
"default",
"required",
"headers",
".",
"if",
"there",
"were",
"any",
"pre",
"-",
"existing",
"headers",
"keep",
"them",
"also",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L121-L143 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.add_measurement | def add_measurement(self, exp_name, meas_num, spec_name=None, er_data=None, pmag_data=None):
"""
Find actual data object for specimen.
Then create a measurement belonging to that specimen and add it to the data object
"""
specimen = self.find_by_name(spec_name, self.specimens)
... | python | def add_measurement(self, exp_name, meas_num, spec_name=None, er_data=None, pmag_data=None):
"""
Find actual data object for specimen.
Then create a measurement belonging to that specimen and add it to the data object
"""
specimen = self.find_by_name(spec_name, self.specimens)
... | [
"def",
"add_measurement",
"(",
"self",
",",
"exp_name",
",",
"meas_num",
",",
"spec_name",
"=",
"None",
",",
"er_data",
"=",
"None",
",",
"pmag_data",
"=",
"None",
")",
":",
"specimen",
"=",
"self",
".",
"find_by_name",
"(",
"spec_name",
",",
"self",
"."... | Find actual data object for specimen.
Then create a measurement belonging to that specimen and add it to the data object | [
"Find",
"actual",
"data",
"object",
"for",
"specimen",
".",
"Then",
"create",
"a",
"measurement",
"belonging",
"to",
"that",
"specimen",
"and",
"add",
"it",
"to",
"the",
"data",
"object"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L200-L208 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.change_specimen | def change_specimen(self, old_spec_name, new_spec_name,
new_sample_name=None, new_er_data=None, new_pmag_data=None,
replace_data=False):
"""
Find actual data objects for specimen and sample.
Then call Specimen class change method to update specimen... | python | def change_specimen(self, old_spec_name, new_spec_name,
new_sample_name=None, new_er_data=None, new_pmag_data=None,
replace_data=False):
"""
Find actual data objects for specimen and sample.
Then call Specimen class change method to update specimen... | [
"def",
"change_specimen",
"(",
"self",
",",
"old_spec_name",
",",
"new_spec_name",
",",
"new_sample_name",
"=",
"None",
",",
"new_er_data",
"=",
"None",
",",
"new_pmag_data",
"=",
"None",
",",
"replace_data",
"=",
"False",
")",
":",
"specimen",
"=",
"self",
... | Find actual data objects for specimen and sample.
Then call Specimen class change method to update specimen name and data. | [
"Find",
"actual",
"data",
"objects",
"for",
"specimen",
"and",
"sample",
".",
"Then",
"call",
"Specimen",
"class",
"change",
"method",
"to",
"update",
"specimen",
"name",
"and",
"data",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L210-L230 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.delete_specimen | def delete_specimen(self, spec_name):
"""
Remove specimen with name spec_name from self.specimens.
If the specimen belonged to a sample, remove it from the sample's specimen list.
"""
specimen = self.find_by_name(spec_name, self.specimens)
if not specimen:
ret... | python | def delete_specimen(self, spec_name):
"""
Remove specimen with name spec_name from self.specimens.
If the specimen belonged to a sample, remove it from the sample's specimen list.
"""
specimen = self.find_by_name(spec_name, self.specimens)
if not specimen:
ret... | [
"def",
"delete_specimen",
"(",
"self",
",",
"spec_name",
")",
":",
"specimen",
"=",
"self",
".",
"find_by_name",
"(",
"spec_name",
",",
"self",
".",
"specimens",
")",
"if",
"not",
"specimen",
":",
"return",
"False",
"sample",
"=",
"specimen",
".",
"sample"... | Remove specimen with name spec_name from self.specimens.
If the specimen belonged to a sample, remove it from the sample's specimen list. | [
"Remove",
"specimen",
"with",
"name",
"spec_name",
"from",
"self",
".",
"specimens",
".",
"If",
"the",
"specimen",
"belonged",
"to",
"a",
"sample",
"remove",
"it",
"from",
"the",
"sample",
"s",
"specimen",
"list",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L232-L245 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.add_specimen | def add_specimen(self, spec_name, samp_name=None, er_data=None, pmag_data=None):
"""
Create a Specimen object and add it to self.specimens.
If a sample name is provided, add the specimen to sample.specimens as well.
"""
if samp_name:
sample = self.find_by_name(samp_na... | python | def add_specimen(self, spec_name, samp_name=None, er_data=None, pmag_data=None):
"""
Create a Specimen object and add it to self.specimens.
If a sample name is provided, add the specimen to sample.specimens as well.
"""
if samp_name:
sample = self.find_by_name(samp_na... | [
"def",
"add_specimen",
"(",
"self",
",",
"spec_name",
",",
"samp_name",
"=",
"None",
",",
"er_data",
"=",
"None",
",",
"pmag_data",
"=",
"None",
")",
":",
"if",
"samp_name",
":",
"sample",
"=",
"self",
".",
"find_by_name",
"(",
"samp_name",
",",
"self",
... | Create a Specimen object and add it to self.specimens.
If a sample name is provided, add the specimen to sample.specimens as well. | [
"Create",
"a",
"Specimen",
"object",
"and",
"add",
"it",
"to",
"self",
".",
"specimens",
".",
"If",
"a",
"sample",
"name",
"is",
"provided",
"add",
"the",
"specimen",
"to",
"sample",
".",
"specimens",
"as",
"well",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L247-L266 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.change_sample | def change_sample(self, old_samp_name, new_samp_name, new_site_name=None,
new_er_data=None, new_pmag_data=None, replace_data=False):
"""
Find actual data objects for sample and site.
Then call Sample class change method to update sample name and data..
"""
s... | python | def change_sample(self, old_samp_name, new_samp_name, new_site_name=None,
new_er_data=None, new_pmag_data=None, replace_data=False):
"""
Find actual data objects for sample and site.
Then call Sample class change method to update sample name and data..
"""
s... | [
"def",
"change_sample",
"(",
"self",
",",
"old_samp_name",
",",
"new_samp_name",
",",
"new_site_name",
"=",
"None",
",",
"new_er_data",
"=",
"None",
",",
"new_pmag_data",
"=",
"None",
",",
"replace_data",
"=",
"False",
")",
":",
"sample",
"=",
"self",
".",
... | Find actual data objects for sample and site.
Then call Sample class change method to update sample name and data.. | [
"Find",
"actual",
"data",
"objects",
"for",
"sample",
"and",
"site",
".",
"Then",
"call",
"Sample",
"class",
"change",
"method",
"to",
"update",
"sample",
"name",
"and",
"data",
".."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L268-L287 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.add_sample | def add_sample(self, samp_name, site_name=None, er_data=None, pmag_data=None):
"""
Create a Sample object and add it to self.samples.
If a site name is provided, add the sample to site.samples as well.
"""
if site_name:
site = self.find_by_name(site_name, self.sites)
... | python | def add_sample(self, samp_name, site_name=None, er_data=None, pmag_data=None):
"""
Create a Sample object and add it to self.samples.
If a site name is provided, add the sample to site.samples as well.
"""
if site_name:
site = self.find_by_name(site_name, self.sites)
... | [
"def",
"add_sample",
"(",
"self",
",",
"samp_name",
",",
"site_name",
"=",
"None",
",",
"er_data",
"=",
"None",
",",
"pmag_data",
"=",
"None",
")",
":",
"if",
"site_name",
":",
"site",
"=",
"self",
".",
"find_by_name",
"(",
"site_name",
",",
"self",
".... | Create a Sample object and add it to self.samples.
If a site name is provided, add the sample to site.samples as well. | [
"Create",
"a",
"Sample",
"object",
"and",
"add",
"it",
"to",
"self",
".",
"samples",
".",
"If",
"a",
"site",
"name",
"is",
"provided",
"add",
"the",
"sample",
"to",
"site",
".",
"samples",
"as",
"well",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L289-L306 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.delete_sample | def delete_sample(self, sample_name, replacement_samp=None):
"""
Remove sample with name sample_name from self.samples.
If the sample belonged to a site, remove it from the site's sample list.
If the sample had any specimens, change specimen.sample to "".
"""
sample = sel... | python | def delete_sample(self, sample_name, replacement_samp=None):
"""
Remove sample with name sample_name from self.samples.
If the sample belonged to a site, remove it from the site's sample list.
If the sample had any specimens, change specimen.sample to "".
"""
sample = sel... | [
"def",
"delete_sample",
"(",
"self",
",",
"sample_name",
",",
"replacement_samp",
"=",
"None",
")",
":",
"sample",
"=",
"self",
".",
"find_by_name",
"(",
"sample_name",
",",
"self",
".",
"samples",
")",
"if",
"not",
"sample",
":",
"return",
"False",
"speci... | Remove sample with name sample_name from self.samples.
If the sample belonged to a site, remove it from the site's sample list.
If the sample had any specimens, change specimen.sample to "". | [
"Remove",
"sample",
"with",
"name",
"sample_name",
"from",
"self",
".",
"samples",
".",
"If",
"the",
"sample",
"belonged",
"to",
"a",
"site",
"remove",
"it",
"from",
"the",
"site",
"s",
"sample",
"list",
".",
"If",
"the",
"sample",
"had",
"any",
"specime... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L308-L324 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.change_site | def change_site(self, old_site_name, new_site_name, new_location_name=None,
new_er_data=None, new_pmag_data=None, replace_data=False):
"""
Find actual data objects for site and location.
Then call the Site class change method to update site name and data.
"""
... | python | def change_site(self, old_site_name, new_site_name, new_location_name=None,
new_er_data=None, new_pmag_data=None, replace_data=False):
"""
Find actual data objects for site and location.
Then call the Site class change method to update site name and data.
"""
... | [
"def",
"change_site",
"(",
"self",
",",
"old_site_name",
",",
"new_site_name",
",",
"new_location_name",
"=",
"None",
",",
"new_er_data",
"=",
"None",
",",
"new_pmag_data",
"=",
"None",
",",
"replace_data",
"=",
"False",
")",
":",
"site",
"=",
"self",
".",
... | Find actual data objects for site and location.
Then call the Site class change method to update site name and data. | [
"Find",
"actual",
"data",
"objects",
"for",
"site",
"and",
"location",
".",
"Then",
"call",
"the",
"Site",
"class",
"change",
"method",
"to",
"update",
"site",
"name",
"and",
"data",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L336-L363 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.add_site | def add_site(self, site_name, location_name=None, er_data=None, pmag_data=None):
"""
Create a Site object and add it to self.sites.
If a location name is provided, add the site to location.sites as well.
"""
if location_name:
location = self.find_by_name(location_name... | python | def add_site(self, site_name, location_name=None, er_data=None, pmag_data=None):
"""
Create a Site object and add it to self.sites.
If a location name is provided, add the site to location.sites as well.
"""
if location_name:
location = self.find_by_name(location_name... | [
"def",
"add_site",
"(",
"self",
",",
"site_name",
",",
"location_name",
"=",
"None",
",",
"er_data",
"=",
"None",
",",
"pmag_data",
"=",
"None",
")",
":",
"if",
"location_name",
":",
"location",
"=",
"self",
".",
"find_by_name",
"(",
"location_name",
",",
... | Create a Site object and add it to self.sites.
If a location name is provided, add the site to location.sites as well. | [
"Create",
"a",
"Site",
"object",
"and",
"add",
"it",
"to",
"self",
".",
"sites",
".",
"If",
"a",
"location",
"name",
"is",
"provided",
"add",
"the",
"site",
"to",
"location",
".",
"sites",
"as",
"well",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L365-L385 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.delete_site | def delete_site(self, site_name, replacement_site=None):
"""
Remove site with name site_name from self.sites.
If the site belonged to a location, remove it from the location's site list.
If the site had any samples, change sample.site to "".
"""
site = self.find_by_name(s... | python | def delete_site(self, site_name, replacement_site=None):
"""
Remove site with name site_name from self.sites.
If the site belonged to a location, remove it from the location's site list.
If the site had any samples, change sample.site to "".
"""
site = self.find_by_name(s... | [
"def",
"delete_site",
"(",
"self",
",",
"site_name",
",",
"replacement_site",
"=",
"None",
")",
":",
"site",
"=",
"self",
".",
"find_by_name",
"(",
"site_name",
",",
"self",
".",
"sites",
")",
"if",
"not",
"site",
":",
"return",
"False",
"self",
".",
"... | Remove site with name site_name from self.sites.
If the site belonged to a location, remove it from the location's site list.
If the site had any samples, change sample.site to "". | [
"Remove",
"site",
"with",
"name",
"site_name",
"from",
"self",
".",
"sites",
".",
"If",
"the",
"site",
"belonged",
"to",
"a",
"location",
"remove",
"it",
"from",
"the",
"location",
"s",
"site",
"list",
".",
"If",
"the",
"site",
"had",
"any",
"samples",
... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L387-L403 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.change_location | def change_location(self, old_location_name, new_location_name, new_parent_name=None,
new_er_data=None, new_pmag_data=None, replace_data=False):
"""
Find actual data object for location with old_location_name.
Then call Location class change method to update location name... | python | def change_location(self, old_location_name, new_location_name, new_parent_name=None,
new_er_data=None, new_pmag_data=None, replace_data=False):
"""
Find actual data object for location with old_location_name.
Then call Location class change method to update location name... | [
"def",
"change_location",
"(",
"self",
",",
"old_location_name",
",",
"new_location_name",
",",
"new_parent_name",
"=",
"None",
",",
"new_er_data",
"=",
"None",
",",
"new_pmag_data",
"=",
"None",
",",
"replace_data",
"=",
"False",
")",
":",
"location",
"=",
"s... | Find actual data object for location with old_location_name.
Then call Location class change method to update location name and data. | [
"Find",
"actual",
"data",
"object",
"for",
"location",
"with",
"old_location_name",
".",
"Then",
"call",
"Location",
"class",
"change",
"method",
"to",
"update",
"location",
"name",
"and",
"data",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L405-L416 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.add_location | def add_location(self, location_name, parent_name=None, er_data=None, pmag_data=None):
"""
Create a Location object and add it to self.locations.
"""
if not location_name:
return False
location = Location(location_name, data_model=self.data_model, er_data=er_data, pma... | python | def add_location(self, location_name, parent_name=None, er_data=None, pmag_data=None):
"""
Create a Location object and add it to self.locations.
"""
if not location_name:
return False
location = Location(location_name, data_model=self.data_model, er_data=er_data, pma... | [
"def",
"add_location",
"(",
"self",
",",
"location_name",
",",
"parent_name",
"=",
"None",
",",
"er_data",
"=",
"None",
",",
"pmag_data",
"=",
"None",
")",
":",
"if",
"not",
"location_name",
":",
"return",
"False",
"location",
"=",
"Location",
"(",
"locati... | Create a Location object and add it to self.locations. | [
"Create",
"a",
"Location",
"object",
"and",
"add",
"it",
"to",
"self",
".",
"locations",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L418-L426 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.delete_location | def delete_location(self, location_name):
"""
Remove location with name location_name from self.locations.
If the location had any sites, change site.location to "".
"""
location = self.find_by_name(location_name, self.locations)
if not location:
return False
... | python | def delete_location(self, location_name):
"""
Remove location with name location_name from self.locations.
If the location had any sites, change site.location to "".
"""
location = self.find_by_name(location_name, self.locations)
if not location:
return False
... | [
"def",
"delete_location",
"(",
"self",
",",
"location_name",
")",
":",
"location",
"=",
"self",
".",
"find_by_name",
"(",
"location_name",
",",
"self",
".",
"locations",
")",
"if",
"not",
"location",
":",
"return",
"False",
"sites",
"=",
"location",
".",
"... | Remove location with name location_name from self.locations.
If the location had any sites, change site.location to "". | [
"Remove",
"location",
"with",
"name",
"location_name",
"from",
"self",
".",
"locations",
".",
"If",
"the",
"location",
"had",
"any",
"sites",
"change",
"site",
".",
"location",
"to",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L428-L442 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.change_result | def change_result(self, old_result_name, new_result_name, new_er_data=None,
new_pmag_data=None, spec_names=None, samp_names=None,
site_names=None, loc_names=None, replace_data=False):
"""
Find actual data object for result with old_result_name.
Then ca... | python | def change_result(self, old_result_name, new_result_name, new_er_data=None,
new_pmag_data=None, spec_names=None, samp_names=None,
site_names=None, loc_names=None, replace_data=False):
"""
Find actual data object for result with old_result_name.
Then ca... | [
"def",
"change_result",
"(",
"self",
",",
"old_result_name",
",",
"new_result_name",
",",
"new_er_data",
"=",
"None",
",",
"new_pmag_data",
"=",
"None",
",",
"spec_names",
"=",
"None",
",",
"samp_names",
"=",
"None",
",",
"site_names",
"=",
"None",
",",
"loc... | Find actual data object for result with old_result_name.
Then call Result class change method to update result name and data. | [
"Find",
"actual",
"data",
"object",
"for",
"result",
"with",
"old_result_name",
".",
"Then",
"call",
"Result",
"class",
"change",
"method",
"to",
"update",
"result",
"name",
"and",
"data",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L479-L504 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.get_data | def get_data(self):
"""
attempt to read measurements file in working directory.
"""
meas_file = os.path.join(self.WD, 'magic_measurements.txt')
if not os.path.isfile(meas_file):
print("-I- No magic_measurements.txt file")
return {}
try:
... | python | def get_data(self):
"""
attempt to read measurements file in working directory.
"""
meas_file = os.path.join(self.WD, 'magic_measurements.txt')
if not os.path.isfile(meas_file):
print("-I- No magic_measurements.txt file")
return {}
try:
... | [
"def",
"get_data",
"(",
"self",
")",
":",
"meas_file",
"=",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"WD",
",",
"'magic_measurements.txt'",
")",
"if",
"not",
"os",
".",
"path",
".",
"isfile",
"(",
"meas_file",
")",
":",
"print",
"(",
"\"-I- ... | attempt to read measurements file in working directory. | [
"attempt",
"to",
"read",
"measurements",
"file",
"in",
"working",
"directory",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L508-L581 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.get_magic_info | def get_magic_info(self, child_type, parent_type=None, attr='er',
filename=None, sort_by_file_type=False):
"""
Read er_*.txt or pmag_*.txt file.
If no filename is provided, use er_* or pmag_* file in WD.
If sort_by_file_type, use file header to determine child, par... | python | def get_magic_info(self, child_type, parent_type=None, attr='er',
filename=None, sort_by_file_type=False):
"""
Read er_*.txt or pmag_*.txt file.
If no filename is provided, use er_* or pmag_* file in WD.
If sort_by_file_type, use file header to determine child, par... | [
"def",
"get_magic_info",
"(",
"self",
",",
"child_type",
",",
"parent_type",
"=",
"None",
",",
"attr",
"=",
"'er'",
",",
"filename",
"=",
"None",
",",
"sort_by_file_type",
"=",
"False",
")",
":",
"parent",
"=",
"''",
"grandparent_type",
"=",
"None",
"magic... | Read er_*.txt or pmag_*.txt file.
If no filename is provided, use er_* or pmag_* file in WD.
If sort_by_file_type, use file header to determine child, parent types,
instead of passing those in as arguments.
Once file is open, parse information into dictionaries for each item.
If ... | [
"Read",
"er_",
"*",
".",
"txt",
"or",
"pmag_",
"*",
".",
"txt",
"file",
".",
"If",
"no",
"filename",
"is",
"provided",
"use",
"er_",
"*",
"or",
"pmag_",
"*",
"file",
"in",
"WD",
".",
"If",
"sort_by_file_type",
"use",
"file",
"header",
"to",
"determin... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L595-L707 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.get_age_info | def get_age_info(self, filename=None):
"""
Read er_ages.txt file.
Parse information into dictionaries for each site/sample.
Then add it to the site/sample object as site/sample.age_data.
"""
# use filename if provided, otherwise find er_ages.txt in WD
if not filen... | python | def get_age_info(self, filename=None):
"""
Read er_ages.txt file.
Parse information into dictionaries for each site/sample.
Then add it to the site/sample object as site/sample.age_data.
"""
# use filename if provided, otherwise find er_ages.txt in WD
if not filen... | [
"def",
"get_age_info",
"(",
"self",
",",
"filename",
"=",
"None",
")",
":",
"# use filename if provided, otherwise find er_ages.txt in WD",
"if",
"not",
"filename",
":",
"short_filename",
"=",
"'er_ages.txt'",
"magic_file",
"=",
"os",
".",
"path",
".",
"join",
"(",
... | Read er_ages.txt file.
Parse information into dictionaries for each site/sample.
Then add it to the site/sample object as site/sample.age_data. | [
"Read",
"er_ages",
".",
"txt",
"file",
".",
"Parse",
"information",
"into",
"dictionaries",
"for",
"each",
"site",
"/",
"sample",
".",
"Then",
"add",
"it",
"to",
"the",
"site",
"/",
"sample",
"object",
"as",
"site",
"/",
"sample",
".",
"age_data",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L709-L776 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.get_results_info | def get_results_info(self, filename=None):
"""
Read pmag_results.txt file.
Parse information into dictionaries for each item.
Then add it to the item object as object.results_data.
"""
if not filename:
short_filename = "pmag_results.txt"
magic_file... | python | def get_results_info(self, filename=None):
"""
Read pmag_results.txt file.
Parse information into dictionaries for each item.
Then add it to the item object as object.results_data.
"""
if not filename:
short_filename = "pmag_results.txt"
magic_file... | [
"def",
"get_results_info",
"(",
"self",
",",
"filename",
"=",
"None",
")",
":",
"if",
"not",
"filename",
":",
"short_filename",
"=",
"\"pmag_results.txt\"",
"magic_file",
"=",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"WD",
",",
"short_filename",
"... | Read pmag_results.txt file.
Parse information into dictionaries for each item.
Then add it to the item object as object.results_data. | [
"Read",
"pmag_results",
".",
"txt",
"file",
".",
"Parse",
"information",
"into",
"dictionaries",
"for",
"each",
"item",
".",
"Then",
"add",
"it",
"to",
"the",
"item",
"object",
"as",
"object",
".",
"results_data",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L778-L831 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.read_magic_file | def read_magic_file(self, path, sort_by_this_name, sort_by_file_type=False):
"""
read a magic-formatted tab-delimited file.
return a dictionary of dictionaries, with this format:
{'Z35.5a': {'specimen_weight': '1.000e-03', 'er_citation_names': 'This study', 'specimen_volume': '', 'er_loc... | python | def read_magic_file(self, path, sort_by_this_name, sort_by_file_type=False):
"""
read a magic-formatted tab-delimited file.
return a dictionary of dictionaries, with this format:
{'Z35.5a': {'specimen_weight': '1.000e-03', 'er_citation_names': 'This study', 'specimen_volume': '', 'er_loc... | [
"def",
"read_magic_file",
"(",
"self",
",",
"path",
",",
"sort_by_this_name",
",",
"sort_by_file_type",
"=",
"False",
")",
":",
"DATA",
"=",
"{",
"}",
"with",
"open",
"(",
"path",
",",
"'r'",
")",
"as",
"fin",
":",
"lines",
"=",
"list",
"(",
"fin",
"... | read a magic-formatted tab-delimited file.
return a dictionary of dictionaries, with this format:
{'Z35.5a': {'specimen_weight': '1.000e-03', 'er_citation_names': 'This study', 'specimen_volume': '', 'er_location_name': '', 'er_site_name': 'Z35.', 'er_sample_name': 'Z35.5', 'specimen_class': '', 'er_spe... | [
"read",
"a",
"magic",
"-",
"formatted",
"tab",
"-",
"delimited",
"file",
".",
"return",
"a",
"dictionary",
"of",
"dictionaries",
"with",
"this",
"format",
":",
"{",
"Z35",
".",
"5a",
":",
"{",
"specimen_weight",
":",
"1",
".",
"000e",
"-",
"03",
"er_ci... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L833-L877 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.write_files | def write_files(self):
"""
write all data out into er_* and pmag_* files as appropriate
"""
warnings = self.validate_data()
print('-I- Writing all saved data to files')
if self.measurements:
self.write_measurements_file()
for dtype in ['specimen', 'sa... | python | def write_files(self):
"""
write all data out into er_* and pmag_* files as appropriate
"""
warnings = self.validate_data()
print('-I- Writing all saved data to files')
if self.measurements:
self.write_measurements_file()
for dtype in ['specimen', 'sa... | [
"def",
"write_files",
"(",
"self",
")",
":",
"warnings",
"=",
"self",
".",
"validate_data",
"(",
")",
"print",
"(",
"'-I- Writing all saved data to files'",
")",
"if",
"self",
".",
"measurements",
":",
"self",
".",
"write_measurements_file",
"(",
")",
"for",
"... | write all data out into er_* and pmag_* files as appropriate | [
"write",
"all",
"data",
"out",
"into",
"er_",
"*",
"and",
"pmag_",
"*",
"files",
"as",
"appropriate"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L924-L954 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.write_age_file | def write_age_file(self):
"""
Write er_ages.txt based on updated ErMagicBuilder data object
"""
if not self.write_ages:
print('-I- No age data available to write')
return
first_headers = self.first_age_headers
actual_headers = sorted(self.headers['... | python | def write_age_file(self):
"""
Write er_ages.txt based on updated ErMagicBuilder data object
"""
if not self.write_ages:
print('-I- No age data available to write')
return
first_headers = self.first_age_headers
actual_headers = sorted(self.headers['... | [
"def",
"write_age_file",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"write_ages",
":",
"print",
"(",
"'-I- No age data available to write'",
")",
"return",
"first_headers",
"=",
"self",
".",
"first_age_headers",
"actual_headers",
"=",
"sorted",
"(",
"self",
... | Write er_ages.txt based on updated ErMagicBuilder data object | [
"Write",
"er_ages",
".",
"txt",
"based",
"on",
"updated",
"ErMagicBuilder",
"data",
"object"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1113-L1189 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.validate_data | def validate_data(self):
"""
Validate specimen, sample, site, and location data.
"""
warnings = {}
spec_warnings, samp_warnings, site_warnings, loc_warnings = {}, {}, {}, {}
if self.specimens:
spec_warnings = self.validate_items(self.specimens, 'specimen')
... | python | def validate_data(self):
"""
Validate specimen, sample, site, and location data.
"""
warnings = {}
spec_warnings, samp_warnings, site_warnings, loc_warnings = {}, {}, {}, {}
if self.specimens:
spec_warnings = self.validate_items(self.specimens, 'specimen')
... | [
"def",
"validate_data",
"(",
"self",
")",
":",
"warnings",
"=",
"{",
"}",
"spec_warnings",
",",
"samp_warnings",
",",
"site_warnings",
",",
"loc_warnings",
"=",
"{",
"}",
",",
"{",
"}",
",",
"{",
"}",
",",
"{",
"}",
"if",
"self",
".",
"specimens",
":... | Validate specimen, sample, site, and location data. | [
"Validate",
"specimen",
"sample",
"site",
"and",
"location",
"data",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1193-L1207 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.validate_items | def validate_items(self, item_list, item_type):
"""
Go through a list Pmag_objects and check for:
parent errors,
children errors,
type errors.
Return a dictionary of exceptions in this format:
{sample1: {'parent': [warning1, warning2, warning3], 'child': [warning1... | python | def validate_items(self, item_list, item_type):
"""
Go through a list Pmag_objects and check for:
parent errors,
children errors,
type errors.
Return a dictionary of exceptions in this format:
{sample1: {'parent': [warning1, warning2, warning3], 'child': [warning1... | [
"def",
"validate_items",
"(",
"self",
",",
"item_list",
",",
"item_type",
")",
":",
"def",
"append_or_create_dict_item",
"(",
"warning_type",
",",
"dictionary",
",",
"key",
",",
"value",
")",
":",
"\"\"\"\n Add to dictionary with this format:\n {key1... | Go through a list Pmag_objects and check for:
parent errors,
children errors,
type errors.
Return a dictionary of exceptions in this format:
{sample1: {'parent': [warning1, warning2, warning3], 'child': [warning1, warning2]},
sample2: {'child': [warning1], 'type': [warni... | [
"Go",
"through",
"a",
"list",
"Pmag_objects",
"and",
"check",
"for",
":",
"parent",
"errors",
"children",
"errors",
"type",
"errors",
".",
"Return",
"a",
"dictionary",
"of",
"exceptions",
"in",
"this",
"format",
":",
"{",
"sample1",
":",
"{",
"parent",
":"... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1210-L1302 |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.get_min_max_lat_lon | def get_min_max_lat_lon(self, locations):
"""
Take a list of locations and return a dictionary with:
location1:
'location_begin_lat', 'location_begin_lon',
'location_end_lat', 'location_end_lon'.
and so on.
"""
d = {}
for location in locations:
... | python | def get_min_max_lat_lon(self, locations):
"""
Take a list of locations and return a dictionary with:
location1:
'location_begin_lat', 'location_begin_lon',
'location_end_lat', 'location_end_lon'.
and so on.
"""
d = {}
for location in locations:
... | [
"def",
"get_min_max_lat_lon",
"(",
"self",
",",
"locations",
")",
":",
"d",
"=",
"{",
"}",
"for",
"location",
"in",
"locations",
":",
"sites",
"=",
"location",
".",
"sites",
"max_lat",
",",
"min_lat",
"=",
"''",
",",
"''",
"max_lon",
",",
"min_lon",
"=... | Take a list of locations and return a dictionary with:
location1:
'location_begin_lat', 'location_begin_lon',
'location_end_lat', 'location_end_lon'.
and so on. | [
"Take",
"a",
"list",
"of",
"locations",
"and",
"return",
"a",
"dictionary",
"with",
":",
"location1",
":",
"location_begin_lat",
"location_begin_lon",
"location_end_lat",
"location_end_lon",
".",
"and",
"so",
"on",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1391-L1426 |
PmagPy/PmagPy | pmagpy/builder2.py | Specimen.set_parent | def set_parent(self, new_samp):
"""
Set self.sample as either an empty string, or with a new Sample.
"""
self.sample = new_samp
if new_samp:
if not isinstance(new_samp, Sample):
raise Exception
self.propagate_data()
return new_samp | python | def set_parent(self, new_samp):
"""
Set self.sample as either an empty string, or with a new Sample.
"""
self.sample = new_samp
if new_samp:
if not isinstance(new_samp, Sample):
raise Exception
self.propagate_data()
return new_samp | [
"def",
"set_parent",
"(",
"self",
",",
"new_samp",
")",
":",
"self",
".",
"sample",
"=",
"new_samp",
"if",
"new_samp",
":",
"if",
"not",
"isinstance",
"(",
"new_samp",
",",
"Sample",
")",
":",
"raise",
"Exception",
"self",
".",
"propagate_data",
"(",
")"... | Set self.sample as either an empty string, or with a new Sample. | [
"Set",
"self",
".",
"sample",
"as",
"either",
"an",
"empty",
"string",
"or",
"with",
"a",
"new",
"Sample",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1551-L1560 |
PmagPy/PmagPy | pmagpy/builder2.py | Sample.set_parent | def set_parent(self, new_site):
"""
Set self.site as either an empty string, or with a new Site.
"""
if new_site:
if not isinstance(new_site, Site):
raise Exception
self.site = new_site
self.propagate_data()
return new_site | python | def set_parent(self, new_site):
"""
Set self.site as either an empty string, or with a new Site.
"""
if new_site:
if not isinstance(new_site, Site):
raise Exception
self.site = new_site
self.propagate_data()
return new_site | [
"def",
"set_parent",
"(",
"self",
",",
"new_site",
")",
":",
"if",
"new_site",
":",
"if",
"not",
"isinstance",
"(",
"new_site",
",",
"Site",
")",
":",
"raise",
"Exception",
"self",
".",
"site",
"=",
"new_site",
"self",
".",
"propagate_data",
"(",
")",
... | Set self.site as either an empty string, or with a new Site. | [
"Set",
"self",
".",
"site",
"as",
"either",
"an",
"empty",
"string",
"or",
"with",
"a",
"new",
"Site",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1600-L1609 |
PmagPy/PmagPy | pmagpy/builder2.py | Site.change_site | def change_site(self, new_name, new_location=None, new_er_data=None,
new_pmag_data=None, replace_data=False):
"""
Update a site's name, location, er_data, and pmag_data.
By default, new data will be added in to pre-existing data, overwriting existing values.
If replac... | python | def change_site(self, new_name, new_location=None, new_er_data=None,
new_pmag_data=None, replace_data=False):
"""
Update a site's name, location, er_data, and pmag_data.
By default, new data will be added in to pre-existing data, overwriting existing values.
If replac... | [
"def",
"change_site",
"(",
"self",
",",
"new_name",
",",
"new_location",
"=",
"None",
",",
"new_er_data",
"=",
"None",
",",
"new_pmag_data",
"=",
"None",
",",
"replace_data",
"=",
"False",
")",
":",
"self",
".",
"name",
"=",
"new_name",
"if",
"new_location... | Update a site's name, location, er_data, and pmag_data.
By default, new data will be added in to pre-existing data, overwriting existing values.
If replace_data is True, the new data dictionary will simply take the place of the existing dict. | [
"Update",
"a",
"site",
"s",
"name",
"location",
"er_data",
"and",
"pmag_data",
".",
"By",
"default",
"new",
"data",
"will",
"be",
"added",
"in",
"to",
"pre",
"-",
"existing",
"data",
"overwriting",
"existing",
"values",
".",
"If",
"replace_data",
"is",
"Tr... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1666-L1676 |
PmagPy/PmagPy | programs/thellier_magic2.py | main | def main():
"""
NAME
thellier_magic.py
DESCRIPTION
plots Thellier-Thellier, allowing interactive setting of bounds
and customizing of selection criteria. Saves and reads interpretations
from a pmag_specimen formatted table, default: thellier_specimens.txt
SYNTAX
... | python | def main():
"""
NAME
thellier_magic.py
DESCRIPTION
plots Thellier-Thellier, allowing interactive setting of bounds
and customizing of selection criteria. Saves and reads interpretations
from a pmag_specimen formatted table, default: thellier_specimens.txt
SYNTAX
... | [
"def",
"main",
"(",
")",
":",
"#",
"# initializations",
"#",
"meas_file",
",",
"critout",
",",
"inspec",
"=",
"\"magic_measurements.txt\"",
",",
"\"\"",
",",
"\"thellier_specimens.txt\"",
"first",
"=",
"1",
"inlt",
"=",
"0",
"version_num",
"=",
"pmag",
".",
... | NAME
thellier_magic.py
DESCRIPTION
plots Thellier-Thellier, allowing interactive setting of bounds
and customizing of selection criteria. Saves and reads interpretations
from a pmag_specimen formatted table, default: thellier_specimens.txt
SYNTAX
thellier_magic.py [com... | [
"NAME",
"thellier_magic",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/thellier_magic2.py#L21-L725 |
PmagPy/PmagPy | programs/deprecated/nrm_specimens_magic.py | main | def main():
"""
NAME
nrm_specimens_magic.py
Note: this program has been deprecated and is not maintained
DESCRIPTION
converts NRM data in a measurements type file to
geographic and tilt corrected data in a specimens type file
SYNTAX
... | python | def main():
"""
NAME
nrm_specimens_magic.py
Note: this program has been deprecated and is not maintained
DESCRIPTION
converts NRM data in a measurements type file to
geographic and tilt corrected data in a specimens type file
SYNTAX
... | [
"def",
"main",
"(",
")",
":",
"#",
"# define some variables",
"#",
"beg",
",",
"end",
",",
"pole",
",",
"geo",
",",
"tilt",
",",
"askave",
",",
"save",
"=",
"0",
",",
"0",
",",
"[",
"]",
",",
"0",
",",
"0",
",",
"0",
",",
"0",
"samp_file",
... | NAME
nrm_specimens_magic.py
Note: this program has been deprecated and is not maintained
DESCRIPTION
converts NRM data in a measurements type file to
geographic and tilt corrected data in a specimens type file
SYNTAX
nrm_specimens_magic.py [-h... | [
"NAME",
"nrm_specimens_magic",
".",
"py",
"Note",
":",
"this",
"program",
"has",
"been",
"deprecated",
"and",
"is",
"not",
"maintained"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/deprecated/nrm_specimens_magic.py#L10-L154 |
PmagPy/PmagPy | dialogs/thellier_interpreter.py | thellier_auto_interpreter.run_interpreter | def run_interpreter(self):
"""
Run thellier_auto_interpreter
"""
import random
import copy
start_time = time.time()
#------------------------------------------------
# Clean work directory
#------------------------------------------------
... | python | def run_interpreter(self):
"""
Run thellier_auto_interpreter
"""
import random
import copy
start_time = time.time()
#------------------------------------------------
# Clean work directory
#------------------------------------------------
... | [
"def",
"run_interpreter",
"(",
"self",
")",
":",
"import",
"random",
"import",
"copy",
"start_time",
"=",
"time",
".",
"time",
"(",
")",
"#------------------------------------------------",
"# Clean work directory",
"#------------------------------------------------",
"# self... | Run thellier_auto_interpreter | [
"Run",
"thellier_auto_interpreter"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/thellier_interpreter.py#L54-L583 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.