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 | pmagpy/pmagplotlib.py | plot_qq_unf | def plot_qq_unf(fignum, D, title, subplot=False, degrees=True):
"""
plots data against a uniform distribution in 0=>360.
Parameters
_________
fignum : matplotlib figure number
D : data
title : title for plot
subplot : if True, make this number one of two subplots
degrees : if True, a... | python | def plot_qq_unf(fignum, D, title, subplot=False, degrees=True):
"""
plots data against a uniform distribution in 0=>360.
Parameters
_________
fignum : matplotlib figure number
D : data
title : title for plot
subplot : if True, make this number one of two subplots
degrees : if True, a... | [
"def",
"plot_qq_unf",
"(",
"fignum",
",",
"D",
",",
"title",
",",
"subplot",
"=",
"False",
",",
"degrees",
"=",
"True",
")",
":",
"if",
"subplot",
"==",
"True",
":",
"plt",
".",
"subplot",
"(",
"1",
",",
"2",
",",
"fignum",
")",
"else",
":",
"plt... | plots data against a uniform distribution in 0=>360.
Parameters
_________
fignum : matplotlib figure number
D : data
title : title for plot
subplot : if True, make this number one of two subplots
degrees : if True, assume that these are degrees
Return
Mu : Mu statistic (Fisher et al... | [
"plots",
"data",
"against",
"a",
"uniform",
"distribution",
"in",
"0",
"=",
">",
"360",
".",
"Parameters",
"_________",
"fignum",
":",
"matplotlib",
"figure",
"number",
"D",
":",
"data",
"title",
":",
"title",
"for",
"plot",
"subplot",
":",
"if",
"True",
... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L362-L417 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_qq_exp | def plot_qq_exp(fignum, I, title, subplot=False):
"""
plots data against an exponential distribution in 0=>90.
Parameters
_________
fignum : matplotlib figure number
I : data
title : plot title
subplot : boolean, if True plot as subplot with 1 row, two columns with fignum the plot numbe... | python | def plot_qq_exp(fignum, I, title, subplot=False):
"""
plots data against an exponential distribution in 0=>90.
Parameters
_________
fignum : matplotlib figure number
I : data
title : plot title
subplot : boolean, if True plot as subplot with 1 row, two columns with fignum the plot numbe... | [
"def",
"plot_qq_exp",
"(",
"fignum",
",",
"I",
",",
"title",
",",
"subplot",
"=",
"False",
")",
":",
"if",
"subplot",
"==",
"True",
":",
"plt",
".",
"subplot",
"(",
"1",
",",
"2",
",",
"fignum",
")",
"else",
":",
"plt",
".",
"figure",
"(",
"num",... | plots data against an exponential distribution in 0=>90.
Parameters
_________
fignum : matplotlib figure number
I : data
title : plot title
subplot : boolean, if True plot as subplot with 1 row, two columns with fignum the plot number | [
"plots",
"data",
"against",
"an",
"exponential",
"distribution",
"in",
"0",
"=",
">",
"90",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L420-L477 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_di | def plot_di(fignum, DIblock):
global globals
"""
plots directions on equal area net
Parameters
_________
fignum : matplotlib figure number
DIblock : nested list of dec, inc pairs
"""
X_down, X_up, Y_down, Y_up = [], [], [], [] # initialize some variables
plt.figure(num=fignum)
#... | python | def plot_di(fignum, DIblock):
global globals
"""
plots directions on equal area net
Parameters
_________
fignum : matplotlib figure number
DIblock : nested list of dec, inc pairs
"""
X_down, X_up, Y_down, Y_up = [], [], [], [] # initialize some variables
plt.figure(num=fignum)
#... | [
"def",
"plot_di",
"(",
"fignum",
",",
"DIblock",
")",
":",
"global",
"globals",
"X_down",
",",
"X_up",
",",
"Y_down",
",",
"Y_up",
"=",
"[",
"]",
",",
"[",
"]",
",",
"[",
"]",
",",
"[",
"]",
"# initialize some variables",
"plt",
".",
"figure",
"(",
... | plots directions on equal area net
Parameters
_________
fignum : matplotlib figure number
DIblock : nested list of dec, inc pairs | [
"plots",
"directions",
"on",
"equal",
"area",
"net",
"Parameters",
"_________",
"fignum",
":",
"matplotlib",
"figure",
"number",
"DIblock",
":",
"nested",
"list",
"of",
"dec",
"inc",
"pairs"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L541-L577 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_di_sym | def plot_di_sym(fignum, DIblock, sym):
global globals
"""
plots directions on equal area net
Parameters
_________
fignum : matplotlib figure number
DIblock : nested list of dec, inc pairs
sym : set matplotlib symbol (e.g., 'bo' for blue circles)
"""
X_down, X_up, Y_down, Y_up = [... | python | def plot_di_sym(fignum, DIblock, sym):
global globals
"""
plots directions on equal area net
Parameters
_________
fignum : matplotlib figure number
DIblock : nested list of dec, inc pairs
sym : set matplotlib symbol (e.g., 'bo' for blue circles)
"""
X_down, X_up, Y_down, Y_up = [... | [
"def",
"plot_di_sym",
"(",
"fignum",
",",
"DIblock",
",",
"sym",
")",
":",
"global",
"globals",
"X_down",
",",
"X_up",
",",
"Y_down",
",",
"Y_up",
"=",
"[",
"]",
",",
"[",
"]",
",",
"[",
"]",
",",
"[",
"]",
"# initialize some variables",
"plt",
".",
... | plots directions on equal area net
Parameters
_________
fignum : matplotlib figure number
DIblock : nested list of dec, inc pairs
sym : set matplotlib symbol (e.g., 'bo' for blue circles) | [
"plots",
"directions",
"on",
"equal",
"area",
"net",
"Parameters",
"_________",
"fignum",
":",
"matplotlib",
"figure",
"number",
"DIblock",
":",
"nested",
"list",
"of",
"dec",
"inc",
"pairs",
"sym",
":",
"set",
"matplotlib",
"symbol",
"(",
"e",
".",
"g",
"... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L580-L622 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_circ | def plot_circ(fignum, pole, ang, col):
"""
function to put a small circle on an equal area projection plot, fig,fignum
Parameters
__________
fignum : matplotlib figure number
pole : dec,inc of center of circle
ang : angle of circle
col :
"""
plt.figure(num=fignum)
D_c, I_c = ... | python | def plot_circ(fignum, pole, ang, col):
"""
function to put a small circle on an equal area projection plot, fig,fignum
Parameters
__________
fignum : matplotlib figure number
pole : dec,inc of center of circle
ang : angle of circle
col :
"""
plt.figure(num=fignum)
D_c, I_c = ... | [
"def",
"plot_circ",
"(",
"fignum",
",",
"pole",
",",
"ang",
",",
"col",
")",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"D_c",
",",
"I_c",
"=",
"pmag",
".",
"circ",
"(",
"pole",
"[",
"0",
"]",
",",
"pole",
"[",
"1",
"]",
",",
... | function to put a small circle on an equal area projection plot, fig,fignum
Parameters
__________
fignum : matplotlib figure number
pole : dec,inc of center of circle
ang : angle of circle
col : | [
"function",
"to",
"put",
"a",
"small",
"circle",
"on",
"an",
"equal",
"area",
"projection",
"plot",
"fig",
"fignum",
"Parameters",
"__________",
"fignum",
":",
"matplotlib",
"figure",
"number",
"pole",
":",
"dec",
"inc",
"of",
"center",
"of",
"circle",
"ang"... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L625-L648 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_zij | def plot_zij(fignum, datablock, angle, s, norm=True):
"""
function to make Zijderveld diagrams
Parameters
__________
fignum : matplotlib figure number
datablock : nested list of [step, dec, inc, M (Am2), type, quality]
where type is a string, either 'ZI' or 'IZ' for IZZI experim... | python | def plot_zij(fignum, datablock, angle, s, norm=True):
"""
function to make Zijderveld diagrams
Parameters
__________
fignum : matplotlib figure number
datablock : nested list of [step, dec, inc, M (Am2), type, quality]
where type is a string, either 'ZI' or 'IZ' for IZZI experim... | [
"def",
"plot_zij",
"(",
"fignum",
",",
"datablock",
",",
"angle",
",",
"s",
",",
"norm",
"=",
"True",
")",
":",
"global",
"globals",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"clf",
"(",
")",
"if",
"not",
"isServer",
":",
... | function to make Zijderveld diagrams
Parameters
__________
fignum : matplotlib figure number
datablock : nested list of [step, dec, inc, M (Am2), type, quality]
where type is a string, either 'ZI' or 'IZ' for IZZI experiments
angle : desired rotation in the horizontal plane (0 puts ... | [
"function",
"to",
"make",
"Zijderveld",
"diagrams"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L654-L738 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_mag | def plot_mag(fignum, datablock, s, num, units, norm):
"""
plots magnetization against (de)magnetizing temperature or field
Parameters
_________________
fignum : matplotlib figure number for plotting
datablock : nested list of [step, 0, 0, magnetization, 1,quality]
s : string for title
n... | python | def plot_mag(fignum, datablock, s, num, units, norm):
"""
plots magnetization against (de)magnetizing temperature or field
Parameters
_________________
fignum : matplotlib figure number for plotting
datablock : nested list of [step, 0, 0, magnetization, 1,quality]
s : string for title
n... | [
"def",
"plot_mag",
"(",
"fignum",
",",
"datablock",
",",
"s",
",",
"num",
",",
"units",
",",
"norm",
")",
":",
"global",
"globals",
",",
"graphmenu",
"Ints",
"=",
"[",
"]",
"for",
"plotrec",
"in",
"datablock",
":",
"Ints",
".",
"append",
"(",
"plotre... | plots magnetization against (de)magnetizing temperature or field
Parameters
_________________
fignum : matplotlib figure number for plotting
datablock : nested list of [step, 0, 0, magnetization, 1,quality]
s : string for title
num : matplotlib figure number, can set to 1
units : [T,K,U] fo... | [
"plots",
"magnetization",
"against",
"(",
"de",
")",
"magnetizing",
"temperature",
"or",
"field"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L743-L861 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_zed | def plot_zed(ZED, datablock, angle, s, units):
"""
function to make equal area plot and zijderveld plot
Parameters
_________
ZED : dictionary with keys for plots
eqarea : figure number for equal area projection
zijd : figure number for zijderveld plot
demag : figure numb... | python | def plot_zed(ZED, datablock, angle, s, units):
"""
function to make equal area plot and zijderveld plot
Parameters
_________
ZED : dictionary with keys for plots
eqarea : figure number for equal area projection
zijd : figure number for zijderveld plot
demag : figure numb... | [
"def",
"plot_zed",
"(",
"ZED",
",",
"datablock",
",",
"angle",
",",
"s",
",",
"units",
")",
":",
"for",
"fignum",
"in",
"list",
"(",
"ZED",
".",
"keys",
"(",
")",
")",
":",
"fig",
"=",
"plt",
".",
"figure",
"(",
"num",
"=",
"ZED",
"[",
"fignum"... | function to make equal area plot and zijderveld plot
Parameters
_________
ZED : dictionary with keys for plots
eqarea : figure number for equal area projection
zijd : figure number for zijderveld plot
demag : figure number for magnetization against demag step
datablock :... | [
"function",
"to",
"make",
"equal",
"area",
"plot",
"and",
"zijderveld",
"plot"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L867-L937 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_dir | def plot_dir(ZED, pars, datablock, angle):
"""
function to put the great circle on the equal area projection
and plot start and end points of calculation
DEPRECATED (used in zeq_magic)
"""
#
# find start and end points from datablock
#
if pars["calculation_type"] == 'DE-FM':
x, y = [], ... | python | def plot_dir(ZED, pars, datablock, angle):
"""
function to put the great circle on the equal area projection
and plot start and end points of calculation
DEPRECATED (used in zeq_magic)
"""
#
# find start and end points from datablock
#
if pars["calculation_type"] == 'DE-FM':
x, y = [], ... | [
"def",
"plot_dir",
"(",
"ZED",
",",
"pars",
",",
"datablock",
",",
"angle",
")",
":",
"#",
"# find start and end points from datablock",
"#",
"if",
"pars",
"[",
"\"calculation_type\"",
"]",
"==",
"'DE-FM'",
":",
"x",
",",
"y",
"=",
"[",
"]",
",",
"[",
"]... | function to put the great circle on the equal area projection
and plot start and end points of calculation
DEPRECATED (used in zeq_magic) | [
"function",
"to",
"put",
"the",
"great",
"circle",
"on",
"the",
"equal",
"area",
"projection",
"and",
"plot",
"start",
"and",
"end",
"points",
"of",
"calculation"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L940-L1053 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_arai | def plot_arai(fignum, indata, s, units):
"""
makes Arai plots for Thellier-Thellier type experiments
Parameters
__________
fignum : figure number of matplotlib plot object
indata : nested list of data for Arai plots:
the araiblock of data prepared by pmag.sortarai()
s : specimen nam... | python | def plot_arai(fignum, indata, s, units):
"""
makes Arai plots for Thellier-Thellier type experiments
Parameters
__________
fignum : figure number of matplotlib plot object
indata : nested list of data for Arai plots:
the araiblock of data prepared by pmag.sortarai()
s : specimen nam... | [
"def",
"plot_arai",
"(",
"fignum",
",",
"indata",
",",
"s",
",",
"units",
")",
":",
"global",
"globals",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"clf",
"(",
")",
"if",
"not",
"isServer",
":",
"plt",
".",
"figtext",
"(",
... | makes Arai plots for Thellier-Thellier type experiments
Parameters
__________
fignum : figure number of matplotlib plot object
indata : nested list of data for Arai plots:
the araiblock of data prepared by pmag.sortarai()
s : specimen name
units : [K, J, ""] (kelvin, joules, unknown)
... | [
"makes",
"Arai",
"plots",
"for",
"Thellier",
"-",
"Thellier",
"type",
"experiments"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1057-L1176 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_np | def plot_np(fignum, indata, s, units):
"""
makes plot of de(re)magnetization data for Thellier-Thellier type experiment
Parameters
__________
fignum : matplotlib figure number
indata : araiblock from, e.g., pmag.sortarai()
s : specimen name
units : [K, J, ""] (kelvin, joules, unknown)
... | python | def plot_np(fignum, indata, s, units):
"""
makes plot of de(re)magnetization data for Thellier-Thellier type experiment
Parameters
__________
fignum : matplotlib figure number
indata : araiblock from, e.g., pmag.sortarai()
s : specimen name
units : [K, J, ""] (kelvin, joules, unknown)
... | [
"def",
"plot_np",
"(",
"fignum",
",",
"indata",
",",
"s",
",",
"units",
")",
":",
"global",
"globals",
"first_Z",
",",
"first_I",
",",
"ptrm_check",
",",
"ptrm_tail",
"=",
"indata",
"[",
"0",
"]",
",",
"indata",
"[",
"1",
"]",
",",
"indata",
"[",
"... | makes plot of de(re)magnetization data for Thellier-Thellier type experiment
Parameters
__________
fignum : matplotlib figure number
indata : araiblock from, e.g., pmag.sortarai()
s : specimen name
units : [K, J, ""] (kelvin, joules, unknown)
Effect
_______
Makes a plot | [
"makes",
"plot",
"of",
"de",
"(",
"re",
")",
"magnetization",
"data",
"for",
"Thellier",
"-",
"Thellier",
"type",
"experiment"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1183-L1247 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_arai_zij | def plot_arai_zij(ZED, araiblock, zijdblock, s, units):
"""
calls the four plotting programs for Thellier-Thellier experiments
Parameters
__________
ZED : dictionary with plotting figure keys:
deremag : figure for de (re) magnezation plots
arai : figure for the Arai diagram
... | python | def plot_arai_zij(ZED, araiblock, zijdblock, s, units):
"""
calls the four plotting programs for Thellier-Thellier experiments
Parameters
__________
ZED : dictionary with plotting figure keys:
deremag : figure for de (re) magnezation plots
arai : figure for the Arai diagram
... | [
"def",
"plot_arai_zij",
"(",
"ZED",
",",
"araiblock",
",",
"zijdblock",
",",
"s",
",",
"units",
")",
":",
"angle",
"=",
"zijdblock",
"[",
"0",
"]",
"[",
"1",
"]",
"norm",
"=",
"1",
"if",
"units",
"==",
"\"U\"",
":",
"norm",
"=",
"0",
"plot_arai",
... | calls the four plotting programs for Thellier-Thellier experiments
Parameters
__________
ZED : dictionary with plotting figure keys:
deremag : figure for de (re) magnezation plots
arai : figure for the Arai diagram
eqarea : equal area projection of data, color coded by
r... | [
"calls",
"the",
"four",
"plotting",
"programs",
"for",
"Thellier",
"-",
"Thellier",
"experiments"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1250-L1286 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_b | def plot_b(Figs, araiblock, zijdblock, pars):
"""
deprecated (used in thellier_magic/microwave_magic)
"""
angle = zijdblock[0][1]
plotblock = []
Dir, zx, zy, zz, ax, ay = [], [], [], [], [], []
zstart, zend = 0, len(zijdblock)
first_Z, first_I = araiblock[0], araiblock[1]
for rec in ... | python | def plot_b(Figs, araiblock, zijdblock, pars):
"""
deprecated (used in thellier_magic/microwave_magic)
"""
angle = zijdblock[0][1]
plotblock = []
Dir, zx, zy, zz, ax, ay = [], [], [], [], [], []
zstart, zend = 0, len(zijdblock)
first_Z, first_I = araiblock[0], araiblock[1]
for rec in ... | [
"def",
"plot_b",
"(",
"Figs",
",",
"araiblock",
",",
"zijdblock",
",",
"pars",
")",
":",
"angle",
"=",
"zijdblock",
"[",
"0",
"]",
"[",
"1",
"]",
"plotblock",
"=",
"[",
"]",
"Dir",
",",
"zx",
",",
"zy",
",",
"zz",
",",
"ax",
",",
"ay",
"=",
"... | deprecated (used in thellier_magic/microwave_magic) | [
"deprecated",
"(",
"used",
"in",
"thellier_magic",
"/",
"microwave_magic",
")"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1289-L1355 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_slnp | def plot_slnp(fignum, SiteRec, datablock, key):
"""
plots lines and planes on a great circle with alpha 95 and mean
deprecated (used in pmagplotlib)
"""
# make the stereonet
plt.figure(num=fignum)
plot_net(fignum)
s = SiteRec['er_site_name']
#
# plot on the data
#
coord = SiteRec['sit... | python | def plot_slnp(fignum, SiteRec, datablock, key):
"""
plots lines and planes on a great circle with alpha 95 and mean
deprecated (used in pmagplotlib)
"""
# make the stereonet
plt.figure(num=fignum)
plot_net(fignum)
s = SiteRec['er_site_name']
#
# plot on the data
#
coord = SiteRec['sit... | [
"def",
"plot_slnp",
"(",
"fignum",
",",
"SiteRec",
",",
"datablock",
",",
"key",
")",
":",
"# make the stereonet",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plot_net",
"(",
"fignum",
")",
"s",
"=",
"SiteRec",
"[",
"'er_site_name'",
"]",
"#",... | plots lines and planes on a great circle with alpha 95 and mean
deprecated (used in pmagplotlib) | [
"plots",
"lines",
"and",
"planes",
"on",
"a",
"great",
"circle",
"with",
"alpha",
"95",
"and",
"mean",
"deprecated",
"(",
"used",
"in",
"pmagplotlib",
")"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1358-L1410 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_lnp | def plot_lnp(fignum, s, datablock, fpars, direction_type_key):
"""
plots lines and planes on a great circle with alpha 95 and mean
Parameters
_________
fignum : number of plt.figure() object
datablock : nested list of dictionaries with keys in 3.0 or 2.5 format
3.0 keys: dir_dec, dir_i... | python | def plot_lnp(fignum, s, datablock, fpars, direction_type_key):
"""
plots lines and planes on a great circle with alpha 95 and mean
Parameters
_________
fignum : number of plt.figure() object
datablock : nested list of dictionaries with keys in 3.0 or 2.5 format
3.0 keys: dir_dec, dir_i... | [
"def",
"plot_lnp",
"(",
"fignum",
",",
"s",
",",
"datablock",
",",
"fpars",
",",
"direction_type_key",
")",
":",
"# make the stereonet",
"plot_net",
"(",
"fignum",
")",
"#",
"# plot on the data",
"#",
"dec_key",
",",
"inc_key",
",",
"tilt_key",
"=",
"'dec'",... | plots lines and planes on a great circle with alpha 95 and mean
Parameters
_________
fignum : number of plt.figure() object
datablock : nested list of dictionaries with keys in 3.0 or 2.5 format
3.0 keys: dir_dec, dir_inc, dir_tilt_correction = [-1,0,100], direction_type_key =['p','l']
... | [
"plots",
"lines",
"and",
"planes",
"on",
"a",
"great",
"circle",
"with",
"alpha",
"95",
"and",
"mean"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1413-L1476 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_eq | def plot_eq(fignum, DIblock, s):
"""
plots directions on eqarea projection
Parameters
__________
fignum : matplotlib figure number
DIblock : nested list of dec/inc pairs
s : specimen name
"""
# make the stereonet
plt.figure(num=fignum)
if len(DIblock) < 1:
return
# pl... | python | def plot_eq(fignum, DIblock, s):
"""
plots directions on eqarea projection
Parameters
__________
fignum : matplotlib figure number
DIblock : nested list of dec/inc pairs
s : specimen name
"""
# make the stereonet
plt.figure(num=fignum)
if len(DIblock) < 1:
return
# pl... | [
"def",
"plot_eq",
"(",
"fignum",
",",
"DIblock",
",",
"s",
")",
":",
"# make the stereonet",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"if",
"len",
"(",
"DIblock",
")",
"<",
"1",
":",
"return",
"# plt.clf()",
"if",
"not",
"isServer",
":",
... | plots directions on eqarea projection
Parameters
__________
fignum : matplotlib figure number
DIblock : nested list of dec/inc pairs
s : specimen name | [
"plots",
"directions",
"on",
"eqarea",
"projection",
"Parameters",
"__________",
"fignum",
":",
"matplotlib",
"figure",
"number",
"DIblock",
":",
"nested",
"list",
"of",
"dec",
"/",
"inc",
"pairs",
"s",
":",
"specimen",
"name"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1479-L1502 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_eq_sym | def plot_eq_sym(fignum, DIblock, s, sym):
"""
plots directions with specified symbol
Parameters
__________
fignum : matplotlib figure number
DIblock : nested list of dec/inc pairs
s : specimen name
sym : matplotlib symbol (e.g., 'bo' for blue circle)
"""
# make the stereonet
plt.... | python | def plot_eq_sym(fignum, DIblock, s, sym):
"""
plots directions with specified symbol
Parameters
__________
fignum : matplotlib figure number
DIblock : nested list of dec/inc pairs
s : specimen name
sym : matplotlib symbol (e.g., 'bo' for blue circle)
"""
# make the stereonet
plt.... | [
"def",
"plot_eq_sym",
"(",
"fignum",
",",
"DIblock",
",",
"s",
",",
"sym",
")",
":",
"# make the stereonet",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"if",
"len",
"(",
"DIblock",
")",
"<",
"1",
":",
"return",
"# plt.clf()",
"if",
"not",
... | plots directions with specified symbol
Parameters
__________
fignum : matplotlib figure number
DIblock : nested list of dec/inc pairs
s : specimen name
sym : matplotlib symbol (e.g., 'bo' for blue circle) | [
"plots",
"directions",
"with",
"specified",
"symbol",
"Parameters",
"__________",
"fignum",
":",
"matplotlib",
"figure",
"number",
"DIblock",
":",
"nested",
"list",
"of",
"dec",
"/",
"inc",
"pairs",
"s",
":",
"specimen",
"name",
"sym",
":",
"matplotlib",
"symb... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1505-L1528 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_teq | def plot_teq(fignum, araiblock, s, pars):
"""
plots directions of pTRM steps and zero field steps
Parameters
__________
fignum : figure number for matplotlib object
araiblock : nested list of data from pmag.sortarai()
s : specimen name
pars : default is "",
otherwise is diction... | python | def plot_teq(fignum, araiblock, s, pars):
"""
plots directions of pTRM steps and zero field steps
Parameters
__________
fignum : figure number for matplotlib object
araiblock : nested list of data from pmag.sortarai()
s : specimen name
pars : default is "",
otherwise is diction... | [
"def",
"plot_teq",
"(",
"fignum",
",",
"araiblock",
",",
"s",
",",
"pars",
")",
":",
"first_Z",
",",
"first_I",
"=",
"araiblock",
"[",
"0",
"]",
",",
"araiblock",
"[",
"1",
"]",
"# make the stereonet",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
... | plots directions of pTRM steps and zero field steps
Parameters
__________
fignum : figure number for matplotlib object
araiblock : nested list of data from pmag.sortarai()
s : specimen name
pars : default is "",
otherwise is dictionary with keys:
'measurement_step_min' and 'mea... | [
"plots",
"directions",
"of",
"pTRM",
"steps",
"and",
"zero",
"field",
"steps"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1532-L1590 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | save_plots | def save_plots(Figs, filenames, **kwargs):
"""
Parameters
----------
Figs : dict
dictionary of plots, e.g. {'eqarea': 1, ...}
filenames : dict
dictionary of filenames, e.g. {'eqarea': 'mc01a_eqarea.svg', ...}
dict keys should correspond with Figs
"""
saved = []
fo... | python | def save_plots(Figs, filenames, **kwargs):
"""
Parameters
----------
Figs : dict
dictionary of plots, e.g. {'eqarea': 1, ...}
filenames : dict
dictionary of filenames, e.g. {'eqarea': 'mc01a_eqarea.svg', ...}
dict keys should correspond with Figs
"""
saved = []
fo... | [
"def",
"save_plots",
"(",
"Figs",
",",
"filenames",
",",
"*",
"*",
"kwargs",
")",
":",
"saved",
"=",
"[",
"]",
"for",
"key",
"in",
"list",
"(",
"Figs",
".",
"keys",
"(",
")",
")",
":",
"try",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"Figs",
... | Parameters
----------
Figs : dict
dictionary of plots, e.g. {'eqarea': 1, ...}
filenames : dict
dictionary of filenames, e.g. {'eqarea': 'mc01a_eqarea.svg', ...}
dict keys should correspond with Figs | [
"Parameters",
"----------",
"Figs",
":",
"dict",
"dictionary",
"of",
"plots",
"e",
".",
"g",
".",
"{",
"eqarea",
":",
"1",
"...",
"}",
"filenames",
":",
"dict",
"dictionary",
"of",
"filenames",
"e",
".",
"g",
".",
"{",
"eqarea",
":",
"mc01a_eqarea",
".... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1593-L1633 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_evec | def plot_evec(fignum, Vs, symsize, title):
"""
plots eigenvector directions of S vectors
Paramters
________
fignum : matplotlib figure number
Vs : nested list of eigenvectors
symsize : size in pts for symbol
title : title for plot
"""
#
plt.figure(num=fignum)
plt.text(-1.1, ... | python | def plot_evec(fignum, Vs, symsize, title):
"""
plots eigenvector directions of S vectors
Paramters
________
fignum : matplotlib figure number
Vs : nested list of eigenvectors
symsize : size in pts for symbol
title : title for plot
"""
#
plt.figure(num=fignum)
plt.text(-1.1, ... | [
"def",
"plot_evec",
"(",
"fignum",
",",
"Vs",
",",
"symsize",
",",
"title",
")",
":",
"#",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"text",
"(",
"-",
"1.1",
",",
"1.15",
",",
"title",
")",
"# plot V1s as squares, V2s as triangl... | plots eigenvector directions of S vectors
Paramters
________
fignum : matplotlib figure number
Vs : nested list of eigenvectors
symsize : size in pts for symbol
title : title for plot | [
"plots",
"eigenvector",
"directions",
"of",
"S",
"vectors"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1637-L1666 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_ell | def plot_ell(fignum, pars, col, lower, plot):
"""
function to calcualte/plot points on an ellipse about Pdec,Pdip with angle beta,gamma
Parameters
_________
fignum : matplotlib figure number
pars : list of [Pdec, Pinc, beta, Bdec, Binc, gamma, Gdec, Ginc ]
where P is direction, Bdec,Bin... | python | def plot_ell(fignum, pars, col, lower, plot):
"""
function to calcualte/plot points on an ellipse about Pdec,Pdip with angle beta,gamma
Parameters
_________
fignum : matplotlib figure number
pars : list of [Pdec, Pinc, beta, Bdec, Binc, gamma, Gdec, Ginc ]
where P is direction, Bdec,Bin... | [
"def",
"plot_ell",
"(",
"fignum",
",",
"pars",
",",
"col",
",",
"lower",
",",
"plot",
")",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"rad",
"=",
"old_div",
"(",
"np",
".",
"pi",
",",
"180.",
")",
"Pdec",
",",
"Pinc",
",",
"beta... | function to calcualte/plot points on an ellipse about Pdec,Pdip with angle beta,gamma
Parameters
_________
fignum : matplotlib figure number
pars : list of [Pdec, Pinc, beta, Bdec, Binc, gamma, Gdec, Ginc ]
where P is direction, Bdec,Binc are beta direction, and Gdec,Ginc are gamma direction
... | [
"function",
"to",
"calcualte",
"/",
"plot",
"points",
"on",
"an",
"ellipse",
"about",
"Pdec",
"Pdip",
"with",
"angle",
"beta",
"gamma",
"Parameters",
"_________",
"fignum",
":",
"matplotlib",
"figure",
"number",
"pars",
":",
"list",
"of",
"[",
"Pdec",
"Pinc"... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1670-L1751 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_strat | def plot_strat(fignum, data, labels):
"""
plots a time/depth series
Parameters
_________
fignum : matplotlib figure number
data : nested list of [X,Y] pairs
labels : [xlabel, ylabel, title]
"""
vertical_plot_init(fignum, 10, 3)
xlab, ylab, title = labels[0], labels[1], labe... | python | def plot_strat(fignum, data, labels):
"""
plots a time/depth series
Parameters
_________
fignum : matplotlib figure number
data : nested list of [X,Y] pairs
labels : [xlabel, ylabel, title]
"""
vertical_plot_init(fignum, 10, 3)
xlab, ylab, title = labels[0], labels[1], labe... | [
"def",
"plot_strat",
"(",
"fignum",
",",
"data",
",",
"labels",
")",
":",
"vertical_plot_init",
"(",
"fignum",
",",
"10",
",",
"3",
")",
"xlab",
",",
"ylab",
",",
"title",
"=",
"labels",
"[",
"0",
"]",
",",
"labels",
"[",
"1",
"]",
",",
"labels",
... | plots a time/depth series
Parameters
_________
fignum : matplotlib figure number
data : nested list of [X,Y] pairs
labels : [xlabel, ylabel, title] | [
"plots",
"a",
"time",
"/",
"depth",
"series",
"Parameters",
"_________",
"fignum",
":",
"matplotlib",
"figure",
"number",
"data",
":",
"nested",
"list",
"of",
"[",
"X",
"Y",
"]",
"pairs",
"labels",
":",
"[",
"xlabel",
"ylabel",
"title",
"]"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1771-L1790 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_cdf | def plot_cdf(fignum, data, xlab, sym, title, **kwargs):
""" Makes a plot of the cumulative distribution function.
Parameters
__________
fignum : matplotlib figure number
data : list of data to be plotted - doesn't need to be sorted
sym : matplotlib symbol for plotting, e.g., 'r--' for a red dash... | python | def plot_cdf(fignum, data, xlab, sym, title, **kwargs):
""" Makes a plot of the cumulative distribution function.
Parameters
__________
fignum : matplotlib figure number
data : list of data to be plotted - doesn't need to be sorted
sym : matplotlib symbol for plotting, e.g., 'r--' for a red dash... | [
"def",
"plot_cdf",
"(",
"fignum",
",",
"data",
",",
"xlab",
",",
"sym",
",",
"title",
",",
"*",
"*",
"kwargs",
")",
":",
"#",
"#if len(sym)==1:sym=sym+'-'",
"fig",
"=",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"# sdata=np.array(data).sort()",
... | Makes a plot of the cumulative distribution function.
Parameters
__________
fignum : matplotlib figure number
data : list of data to be plotted - doesn't need to be sorted
sym : matplotlib symbol for plotting, e.g., 'r--' for a red dashed line
**kwargs : optional dictionary with {'color': color... | [
"Makes",
"a",
"plot",
"of",
"the",
"cumulative",
"distribution",
"function",
".",
"Parameters",
"__________",
"fignum",
":",
"matplotlib",
"figure",
"number",
"data",
":",
"list",
"of",
"data",
"to",
"be",
"plotted",
"-",
"doesn",
"t",
"need",
"to",
"be",
... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1796-L1837 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_hs | def plot_hs(fignum, Ys, c, ls):
"""
plots horizontal lines at Ys values
Parameters
_________
fignum : matplotlib figure number
Ys : list of Y values for lines
c : color for lines
ls : linestyle for lines
"""
fig = plt.figure(num=fignum)
for yv in Ys:
bounds = plt.ax... | python | def plot_hs(fignum, Ys, c, ls):
"""
plots horizontal lines at Ys values
Parameters
_________
fignum : matplotlib figure number
Ys : list of Y values for lines
c : color for lines
ls : linestyle for lines
"""
fig = plt.figure(num=fignum)
for yv in Ys:
bounds = plt.ax... | [
"def",
"plot_hs",
"(",
"fignum",
",",
"Ys",
",",
"c",
",",
"ls",
")",
":",
"fig",
"=",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"for",
"yv",
"in",
"Ys",
":",
"bounds",
"=",
"plt",
".",
"axis",
"(",
")",
"plt",
".",
"axhline",
"("... | plots horizontal lines at Ys values
Parameters
_________
fignum : matplotlib figure number
Ys : list of Y values for lines
c : color for lines
ls : linestyle for lines | [
"plots",
"horizontal",
"lines",
"at",
"Ys",
"values"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1841-L1855 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_vs | def plot_vs(fignum, Xs, c, ls):
"""
plots vertical lines at Xs values
Parameters
_________
fignum : matplotlib figure number
Xs : list of X values for lines
c : color for lines
ls : linestyle for lines
"""
fig = plt.figure(num=fignum)
for xv in Xs:
bounds = plt.axis... | python | def plot_vs(fignum, Xs, c, ls):
"""
plots vertical lines at Xs values
Parameters
_________
fignum : matplotlib figure number
Xs : list of X values for lines
c : color for lines
ls : linestyle for lines
"""
fig = plt.figure(num=fignum)
for xv in Xs:
bounds = plt.axis... | [
"def",
"plot_vs",
"(",
"fignum",
",",
"Xs",
",",
"c",
",",
"ls",
")",
":",
"fig",
"=",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"for",
"xv",
"in",
"Xs",
":",
"bounds",
"=",
"plt",
".",
"axis",
"(",
")",
"plt",
".",
"axvline",
"("... | plots vertical lines at Xs values
Parameters
_________
fignum : matplotlib figure number
Xs : list of X values for lines
c : color for lines
ls : linestyle for lines | [
"plots",
"vertical",
"lines",
"at",
"Xs",
"values"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1859-L1874 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_ts | def plot_ts(fignum, dates, ts):
"""
plot the geomagnetic polarity time scale
Parameters
__________
fignum : matplotlib figure number
dates : bounding dates for plot
ts : time scale ck95, gts04, or gts12
"""
vertical_plot_init(fignum, 10, 3)
TS, Chrons = pmag.get_ts(ts)
p = 1... | python | def plot_ts(fignum, dates, ts):
"""
plot the geomagnetic polarity time scale
Parameters
__________
fignum : matplotlib figure number
dates : bounding dates for plot
ts : time scale ck95, gts04, or gts12
"""
vertical_plot_init(fignum, 10, 3)
TS, Chrons = pmag.get_ts(ts)
p = 1... | [
"def",
"plot_ts",
"(",
"fignum",
",",
"dates",
",",
"ts",
")",
":",
"vertical_plot_init",
"(",
"fignum",
",",
"10",
",",
"3",
")",
"TS",
",",
"Chrons",
"=",
"pmag",
".",
"get_ts",
"(",
"ts",
")",
"p",
"=",
"1",
"X",
",",
"Y",
"=",
"[",
"]",
"... | plot the geomagnetic polarity time scale
Parameters
__________
fignum : matplotlib figure number
dates : bounding dates for plot
ts : time scale ck95, gts04, or gts12 | [
"plot",
"the",
"geomagnetic",
"polarity",
"time",
"scale"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L1877-L1918 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_delta_m | def plot_delta_m(fignum, B, DM, Bcr, s):
"""
function to plot Delta M curves
Parameters
__________
fignum : matplotlib figure number
B : array of field values
DM : array of difference between top and bottom curves in hysteresis loop
Bcr : coercivity of remanence
s : specimen name
... | python | def plot_delta_m(fignum, B, DM, Bcr, s):
"""
function to plot Delta M curves
Parameters
__________
fignum : matplotlib figure number
B : array of field values
DM : array of difference between top and bottom curves in hysteresis loop
Bcr : coercivity of remanence
s : specimen name
... | [
"def",
"plot_delta_m",
"(",
"fignum",
",",
"B",
",",
"DM",
",",
"Bcr",
",",
"s",
")",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"clf",
"(",
")",
"if",
"not",
"isServer",
":",
"plt",
".",
"figtext",
"(",
".02",
",",
... | function to plot Delta M curves
Parameters
__________
fignum : matplotlib figure number
B : array of field values
DM : array of difference between top and bottom curves in hysteresis loop
Bcr : coercivity of remanence
s : specimen name | [
"function",
"to",
"plot",
"Delta",
"M",
"curves"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2045-L2067 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_d_delta_m | def plot_d_delta_m(fignum, Bdm, DdeltaM, s):
"""
function to plot d (Delta M)/dB curves
Parameters
__________
fignum : matplotlib figure number
Bdm : change in field
Ddelta M : change in delta M
s : specimen name
"""
plt.figure(num=fignum)
plt.clf()
if not isServer:
... | python | def plot_d_delta_m(fignum, Bdm, DdeltaM, s):
"""
function to plot d (Delta M)/dB curves
Parameters
__________
fignum : matplotlib figure number
Bdm : change in field
Ddelta M : change in delta M
s : specimen name
"""
plt.figure(num=fignum)
plt.clf()
if not isServer:
... | [
"def",
"plot_d_delta_m",
"(",
"fignum",
",",
"Bdm",
",",
"DdeltaM",
",",
"s",
")",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"clf",
"(",
")",
"if",
"not",
"isServer",
":",
"plt",
".",
"figtext",
"(",
".02",
",",
".01"... | function to plot d (Delta M)/dB curves
Parameters
__________
fignum : matplotlib figure number
Bdm : change in field
Ddelta M : change in delta M
s : specimen name | [
"function",
"to",
"plot",
"d",
"(",
"Delta",
"M",
")",
"/",
"dB",
"curves"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2071-L2090 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_imag | def plot_imag(fignum, Bimag, Mimag, s):
"""
function to plot d (Delta M)/dB curves
"""
plt.figure(num=fignum)
plt.clf()
if not isServer:
plt.figtext(.02, .01, version_num)
plt.plot(Bimag, Mimag, 'r')
plt.xlabel('B (T)')
plt.ylabel('M/Ms')
plt.axvline(0, color='k')
pl... | python | def plot_imag(fignum, Bimag, Mimag, s):
"""
function to plot d (Delta M)/dB curves
"""
plt.figure(num=fignum)
plt.clf()
if not isServer:
plt.figtext(.02, .01, version_num)
plt.plot(Bimag, Mimag, 'r')
plt.xlabel('B (T)')
plt.ylabel('M/Ms')
plt.axvline(0, color='k')
pl... | [
"def",
"plot_imag",
"(",
"fignum",
",",
"Bimag",
",",
"Mimag",
",",
"s",
")",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"clf",
"(",
")",
"if",
"not",
"isServer",
":",
"plt",
".",
"figtext",
"(",
".02",
",",
".01",
"... | function to plot d (Delta M)/dB curves | [
"function",
"to",
"plot",
"d",
"(",
"Delta",
"M",
")",
"/",
"dB",
"curves"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2094-L2106 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_hdd | def plot_hdd(HDD, B, M, s):
"""
Function to make hysteresis, deltaM and DdeltaM plots
Parameters:
_______________
Input
HDD : dictionary with figure numbers for the keys:
'hyst' : hysteresis plot normalized to maximum value
'deltaM' : Delta M plot
'Ddelt... | python | def plot_hdd(HDD, B, M, s):
"""
Function to make hysteresis, deltaM and DdeltaM plots
Parameters:
_______________
Input
HDD : dictionary with figure numbers for the keys:
'hyst' : hysteresis plot normalized to maximum value
'deltaM' : Delta M plot
'Ddelt... | [
"def",
"plot_hdd",
"(",
"HDD",
",",
"B",
",",
"M",
",",
"s",
")",
":",
"hpars",
",",
"deltaM",
",",
"Bdm",
"=",
"plot_hys",
"(",
"HDD",
"[",
"'hyst'",
"]",
",",
"B",
",",
"M",
",",
"s",
")",
"# Moff is the \"fixed\" loop data",
"DdeltaM",
"=",
"[",... | Function to make hysteresis, deltaM and DdeltaM plots
Parameters:
_______________
Input
HDD : dictionary with figure numbers for the keys:
'hyst' : hysteresis plot normalized to maximum value
'deltaM' : Delta M plot
'DdeltaM' : differential of Delta M plot
... | [
"Function",
"to",
"make",
"hysteresis",
"deltaM",
"and",
"DdeltaM",
"plots",
"Parameters",
":",
"_______________",
"Input",
"HDD",
":",
"dictionary",
"with",
"figure",
"numbers",
"for",
"the",
"keys",
":",
"hyst",
":",
"hysteresis",
"plot",
"normalized",
"to",
... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2110-L2156 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_day | def plot_day(fignum, BcrBc, S, sym, **kwargs):
"""
function to plot Day plots
Parameters
_________
fignum : matplotlib figure number
BcrBc : list or array ratio of coercivity of remenance to coercivity
S : list or array ratio of saturation remanence to saturation magnetization (squareness)
... | python | def plot_day(fignum, BcrBc, S, sym, **kwargs):
"""
function to plot Day plots
Parameters
_________
fignum : matplotlib figure number
BcrBc : list or array ratio of coercivity of remenance to coercivity
S : list or array ratio of saturation remanence to saturation magnetization (squareness)
... | [
"def",
"plot_day",
"(",
"fignum",
",",
"BcrBc",
",",
"S",
",",
"sym",
",",
"*",
"*",
"kwargs",
")",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"plot",
"(",
"BcrBc",
",",
"S",
",",
"sym",
")",
"plt",
".",
"axhline",
... | function to plot Day plots
Parameters
_________
fignum : matplotlib figure number
BcrBc : list or array ratio of coercivity of remenance to coercivity
S : list or array ratio of saturation remanence to saturation magnetization (squareness)
sym : matplotlib symbol (e.g., 'rs' for red squares)
... | [
"function",
"to",
"plot",
"Day",
"plots"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2160-L2211 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_s_bc | def plot_s_bc(fignum, Bc, S, sym):
"""
function to plot Squareness,Coercivity
Parameters
__________
fignum : matplotlib figure number
Bc : list or array coercivity values
S : list or array of ratio of saturation remanence to saturation
sym : matplotlib symbol (e.g., 'g^' for green trian... | python | def plot_s_bc(fignum, Bc, S, sym):
"""
function to plot Squareness,Coercivity
Parameters
__________
fignum : matplotlib figure number
Bc : list or array coercivity values
S : list or array of ratio of saturation remanence to saturation
sym : matplotlib symbol (e.g., 'g^' for green trian... | [
"def",
"plot_s_bc",
"(",
"fignum",
",",
"Bc",
",",
"S",
",",
"sym",
")",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"plot",
"(",
"Bc",
",",
"S",
",",
"sym",
")",
"plt",
".",
"xlabel",
"(",
"'Bc'",
")",
"plt",
".",
... | function to plot Squareness,Coercivity
Parameters
__________
fignum : matplotlib figure number
Bc : list or array coercivity values
S : list or array of ratio of saturation remanence to saturation
sym : matplotlib symbol (e.g., 'g^' for green triangles) | [
"function",
"to",
"plot",
"Squareness",
"Coercivity"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2215-L2232 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_s_bcr | def plot_s_bcr(fignum, Bcr, S, sym):
"""
function to plot Squareness,Coercivity of remanence
Parameters
__________
fignum : matplotlib figure number
Bcr : list or array coercivity of remenence values
S : list or array of ratio of saturation remanence to saturation
sym : matplotlib symbo... | python | def plot_s_bcr(fignum, Bcr, S, sym):
"""
function to plot Squareness,Coercivity of remanence
Parameters
__________
fignum : matplotlib figure number
Bcr : list or array coercivity of remenence values
S : list or array of ratio of saturation remanence to saturation
sym : matplotlib symbo... | [
"def",
"plot_s_bcr",
"(",
"fignum",
",",
"Bcr",
",",
"S",
",",
"sym",
")",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"plot",
"(",
"Bcr",
",",
"S",
",",
"sym",
")",
"plt",
".",
"xlabel",
"(",
"'Bcr'",
")",
"plt",
"... | function to plot Squareness,Coercivity of remanence
Parameters
__________
fignum : matplotlib figure number
Bcr : list or array coercivity of remenence values
S : list or array of ratio of saturation remanence to saturation
sym : matplotlib symbol (e.g., 'g^' for green triangles) | [
"function",
"to",
"plot",
"Squareness",
"Coercivity",
"of",
"remanence"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2236-L2253 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_bcr | def plot_bcr(fignum, Bcr1, Bcr2):
"""
function to plot two estimates of Bcr against each other
"""
plt.figure(num=fignum)
plt.plot(Bcr1, Bcr2, 'ro')
plt.xlabel('Bcr1')
plt.ylabel('Bcr2')
plt.title('Compare coercivity of remanence') | python | def plot_bcr(fignum, Bcr1, Bcr2):
"""
function to plot two estimates of Bcr against each other
"""
plt.figure(num=fignum)
plt.plot(Bcr1, Bcr2, 'ro')
plt.xlabel('Bcr1')
plt.ylabel('Bcr2')
plt.title('Compare coercivity of remanence') | [
"def",
"plot_bcr",
"(",
"fignum",
",",
"Bcr1",
",",
"Bcr2",
")",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"plot",
"(",
"Bcr1",
",",
"Bcr2",
",",
"'ro'",
")",
"plt",
".",
"xlabel",
"(",
"'Bcr1'",
")",
"plt",
".",
"y... | function to plot two estimates of Bcr against each other | [
"function",
"to",
"plot",
"two",
"estimates",
"of",
"Bcr",
"against",
"each",
"other"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2257-L2265 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_hpars | def plot_hpars(HDD, hpars, sym):
"""
function to plot hysteresis parameters
deprecated (used in hysteresis_magic)
"""
plt.figure(num=HDD['hyst'])
X, Y = [], []
X.append(0)
Y.append(old_div(float(hpars['hysteresis_mr_moment']), float(
hpars['hysteresis_ms_moment'])))
X.append(... | python | def plot_hpars(HDD, hpars, sym):
"""
function to plot hysteresis parameters
deprecated (used in hysteresis_magic)
"""
plt.figure(num=HDD['hyst'])
X, Y = [], []
X.append(0)
Y.append(old_div(float(hpars['hysteresis_mr_moment']), float(
hpars['hysteresis_ms_moment'])))
X.append(... | [
"def",
"plot_hpars",
"(",
"HDD",
",",
"hpars",
",",
"sym",
")",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"HDD",
"[",
"'hyst'",
"]",
")",
"X",
",",
"Y",
"=",
"[",
"]",
",",
"[",
"]",
"X",
".",
"append",
"(",
"0",
")",
"Y",
".",
"append",
... | function to plot hysteresis parameters
deprecated (used in hysteresis_magic) | [
"function",
"to",
"plot",
"hysteresis",
"parameters",
"deprecated",
"(",
"used",
"in",
"hysteresis_magic",
")"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2268-L2301 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_irm | def plot_irm(fignum, B, M, title):
"""
function to plot IRM backfield curves
Parameters
_________
fignum : matplotlib figure number
B : list or array of field values
M : list or array of magnetizations
title : string title for plot
"""
rpars = {}
Mnorm = []
backfield = 0... | python | def plot_irm(fignum, B, M, title):
"""
function to plot IRM backfield curves
Parameters
_________
fignum : matplotlib figure number
B : list or array of field values
M : list or array of magnetizations
title : string title for plot
"""
rpars = {}
Mnorm = []
backfield = 0... | [
"def",
"plot_irm",
"(",
"fignum",
",",
"B",
",",
"M",
",",
"title",
")",
":",
"rpars",
"=",
"{",
"}",
"Mnorm",
"=",
"[",
"]",
"backfield",
"=",
"0",
"X",
",",
"Y",
"=",
"[",
"]",
",",
"[",
"]",
"for",
"k",
"in",
"range",
"(",
"len",
"(",
... | function to plot IRM backfield curves
Parameters
_________
fignum : matplotlib figure number
B : list or array of field values
M : list or array of magnetizations
title : string title for plot | [
"function",
"to",
"plot",
"IRM",
"backfield",
"curves"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2305-L2375 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_xtf | def plot_xtf(fignum, XTF, Fs, e, b):
"""
function to plot series of chi measurements as a function of temperature, holding field constant and varying frequency
"""
plt.figure(num=fignum)
plt.xlabel('Temperature (K)')
plt.ylabel('Susceptibility (m^3/kg)')
k = 0
Flab = []
for freq in X... | python | def plot_xtf(fignum, XTF, Fs, e, b):
"""
function to plot series of chi measurements as a function of temperature, holding field constant and varying frequency
"""
plt.figure(num=fignum)
plt.xlabel('Temperature (K)')
plt.ylabel('Susceptibility (m^3/kg)')
k = 0
Flab = []
for freq in X... | [
"def",
"plot_xtf",
"(",
"fignum",
",",
"XTF",
",",
"Fs",
",",
"e",
",",
"b",
")",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"xlabel",
"(",
"'Temperature (K)'",
")",
"plt",
".",
"ylabel",
"(",
"'Susceptibility (m^3/kg)'",
... | function to plot series of chi measurements as a function of temperature, holding field constant and varying frequency | [
"function",
"to",
"plot",
"series",
"of",
"chi",
"measurements",
"as",
"a",
"function",
"of",
"temperature",
"holding",
"field",
"constant",
"and",
"varying",
"frequency"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2378-L2396 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_xtb | def plot_xtb(fignum, XTB, Bs, e, f):
""" function to plot series of chi measurements as a function of temperature, holding frequency constant and varying B
"""
plt.figure(num=fignum)
plt.xlabel('Temperature (K)')
plt.ylabel('Susceptibility (m^3/kg)')
k = 0
Blab = []
for field in XTB:
... | python | def plot_xtb(fignum, XTB, Bs, e, f):
""" function to plot series of chi measurements as a function of temperature, holding frequency constant and varying B
"""
plt.figure(num=fignum)
plt.xlabel('Temperature (K)')
plt.ylabel('Susceptibility (m^3/kg)')
k = 0
Blab = []
for field in XTB:
... | [
"def",
"plot_xtb",
"(",
"fignum",
",",
"XTB",
",",
"Bs",
",",
"e",
",",
"f",
")",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"xlabel",
"(",
"'Temperature (K)'",
")",
"plt",
".",
"ylabel",
"(",
"'Susceptibility (m^3/kg)'",
... | function to plot series of chi measurements as a function of temperature, holding frequency constant and varying B | [
"function",
"to",
"plot",
"series",
"of",
"chi",
"measurements",
"as",
"a",
"function",
"of",
"temperature",
"holding",
"frequency",
"constant",
"and",
"varying",
"B"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2401-L2418 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_xft | def plot_xft(fignum, XF, T, e, b):
""" function to plot series of chi measurements as a function of temperature, holding field constant and varying frequency
"""
plt.figure(num=fignum)
plt.clf()
if not isServer:
plt.figtext(.02, .01, version_num)
plt.xlabel('Frequency (Hz)')
plt.ylab... | python | def plot_xft(fignum, XF, T, e, b):
""" function to plot series of chi measurements as a function of temperature, holding field constant and varying frequency
"""
plt.figure(num=fignum)
plt.clf()
if not isServer:
plt.figtext(.02, .01, version_num)
plt.xlabel('Frequency (Hz)')
plt.ylab... | [
"def",
"plot_xft",
"(",
"fignum",
",",
"XF",
",",
"T",
",",
"e",
",",
"b",
")",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"clf",
"(",
")",
"if",
"not",
"isServer",
":",
"plt",
".",
"figtext",
"(",
".02",
",",
".01... | function to plot series of chi measurements as a function of temperature, holding field constant and varying frequency | [
"function",
"to",
"plot",
"series",
"of",
"chi",
"measurements",
"as",
"a",
"function",
"of",
"temperature",
"holding",
"field",
"constant",
"and",
"varying",
"frequency"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2423-L2441 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_xbt | def plot_xbt(fignum, XB, T, e, b):
""" function to plot series of chi measurements as a function of temperature, holding field constant and varying frequency
"""
plt.figure(num=fignum)
plt.clf()
if not isServer:
plt.figtext(.02, .01, version_num)
plt.xlabel('Field (T)')
plt.ylabel('S... | python | def plot_xbt(fignum, XB, T, e, b):
""" function to plot series of chi measurements as a function of temperature, holding field constant and varying frequency
"""
plt.figure(num=fignum)
plt.clf()
if not isServer:
plt.figtext(.02, .01, version_num)
plt.xlabel('Field (T)')
plt.ylabel('S... | [
"def",
"plot_xbt",
"(",
"fignum",
",",
"XB",
",",
"T",
",",
"e",
",",
"b",
")",
":",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"clf",
"(",
")",
"if",
"not",
"isServer",
":",
"plt",
".",
"figtext",
"(",
".02",
",",
".01... | function to plot series of chi measurements as a function of temperature, holding field constant and varying frequency | [
"function",
"to",
"plot",
"series",
"of",
"chi",
"measurements",
"as",
"a",
"function",
"of",
"temperature",
"holding",
"field",
"constant",
"and",
"varying",
"frequency"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2445-L2461 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_ltc | def plot_ltc(LTC_CM, LTC_CT, LTC_WM, LTC_WT, e):
"""
function to plot low temperature cycling experiments
"""
leglist, init = [], 0
if len(LTC_CM) > 2:
if init == 0:
plot_init(1, 5, 5)
plt.plot(LTC_CT, LTC_CM, 'b')
leglist.append('RT SIRM, measured while cooling')... | python | def plot_ltc(LTC_CM, LTC_CT, LTC_WM, LTC_WT, e):
"""
function to plot low temperature cycling experiments
"""
leglist, init = [], 0
if len(LTC_CM) > 2:
if init == 0:
plot_init(1, 5, 5)
plt.plot(LTC_CT, LTC_CM, 'b')
leglist.append('RT SIRM, measured while cooling')... | [
"def",
"plot_ltc",
"(",
"LTC_CM",
",",
"LTC_CT",
",",
"LTC_WM",
",",
"LTC_WT",
",",
"e",
")",
":",
"leglist",
",",
"init",
"=",
"[",
"]",
",",
"0",
"if",
"len",
"(",
"LTC_CM",
")",
">",
"2",
":",
"if",
"init",
"==",
"0",
":",
"plot_init",
"(",
... | function to plot low temperature cycling experiments | [
"function",
"to",
"plot",
"low",
"temperature",
"cycling",
"experiments"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2465-L2489 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_conf | def plot_conf(fignum, s, datablock, pars, new):
"""
plots directions and confidence ellipses
"""
# make the stereonet
if new == 1:
plot_net(fignum)
#
# plot the data
#
DIblock = []
for plotrec in datablock:
DIblock.append((float(plotrec["dec"]), float(plotrec["inc"])))
if l... | python | def plot_conf(fignum, s, datablock, pars, new):
"""
plots directions and confidence ellipses
"""
# make the stereonet
if new == 1:
plot_net(fignum)
#
# plot the data
#
DIblock = []
for plotrec in datablock:
DIblock.append((float(plotrec["dec"]), float(plotrec["inc"])))
if l... | [
"def",
"plot_conf",
"(",
"fignum",
",",
"s",
",",
"datablock",
",",
"pars",
",",
"new",
")",
":",
"# make the stereonet",
"if",
"new",
"==",
"1",
":",
"plot_net",
"(",
"fignum",
")",
"#",
"# plot the data",
"#",
"DIblock",
"=",
"[",
"]",
"for",
"plot... | plots directions and confidence ellipses | [
"plots",
"directions",
"and",
"confidence",
"ellipses"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2742-L2776 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | add_borders | def add_borders(Figs, titles, border_color='#000000', text_color='#800080', con_id=""):
"""
Formatting for generating plots on the server
Default border color: black
Default text color: purple
"""
def split_title(s):
"""
Add '\n's to split of overly long titles
"""
... | python | def add_borders(Figs, titles, border_color='#000000', text_color='#800080', con_id=""):
"""
Formatting for generating plots on the server
Default border color: black
Default text color: purple
"""
def split_title(s):
"""
Add '\n's to split of overly long titles
"""
... | [
"def",
"add_borders",
"(",
"Figs",
",",
"titles",
",",
"border_color",
"=",
"'#000000'",
",",
"text_color",
"=",
"'#800080'",
",",
"con_id",
"=",
"\"\"",
")",
":",
"def",
"split_title",
"(",
"s",
")",
":",
"\"\"\"\n Add '\\n's to split of overly long titles... | Formatting for generating plots on the server
Default border color: black
Default text color: purple | [
"Formatting",
"for",
"generating",
"plots",
"on",
"the",
"server",
"Default",
"border",
"color",
":",
"black",
"Default",
"text",
"color",
":",
"purple"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2872-L2964 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_map_basemap | def plot_map_basemap(fignum, lats, lons, Opts):
"""
plot_map_basemap(fignum, lats,lons,Opts)
makes a basemap with lats/lons
requires working installation of Basemap
Parameters:
_______________
fignum : matplotlib figure number
lats : array or list of latitudes
lons : array or lis... | python | def plot_map_basemap(fignum, lats, lons, Opts):
"""
plot_map_basemap(fignum, lats,lons,Opts)
makes a basemap with lats/lons
requires working installation of Basemap
Parameters:
_______________
fignum : matplotlib figure number
lats : array or list of latitudes
lons : array or lis... | [
"def",
"plot_map_basemap",
"(",
"fignum",
",",
"lats",
",",
"lons",
",",
"Opts",
")",
":",
"if",
"not",
"has_basemap",
":",
"print",
"(",
"'-W- Basemap must be installed to run plot_map_basemap'",
")",
"return",
"fig",
"=",
"plt",
".",
"figure",
"(",
"num",
"=... | plot_map_basemap(fignum, lats,lons,Opts)
makes a basemap with lats/lons
requires working installation of Basemap
Parameters:
_______________
fignum : matplotlib figure number
lats : array or list of latitudes
lons : array or list of longitudes
Opts : dictionary of plotting options:
... | [
"plot_map_basemap",
"(",
"fignum",
"lats",
"lons",
"Opts",
")",
"makes",
"a",
"basemap",
"with",
"lats",
"/",
"lons",
"requires",
"working",
"installation",
"of",
"Basemap",
"Parameters",
":",
"_______________",
"fignum",
":",
"matplotlib",
"figure",
"number",
"... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L2967-L3140 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_map | def plot_map(fignum, lats, lons, Opts):
"""
makes a cartopy map with lats/lons
Requires installation of cartopy
Parameters:
_______________
fignum : matplotlib figure number
lats : array or list of latitudes
lons : array or list of longitudes
Opts : dictionary of plotting options:
... | python | def plot_map(fignum, lats, lons, Opts):
"""
makes a cartopy map with lats/lons
Requires installation of cartopy
Parameters:
_______________
fignum : matplotlib figure number
lats : array or list of latitudes
lons : array or list of longitudes
Opts : dictionary of plotting options:
... | [
"def",
"plot_map",
"(",
"fignum",
",",
"lats",
",",
"lons",
",",
"Opts",
")",
":",
"if",
"not",
"has_cartopy",
":",
"print",
"(",
"'This function requires installation of cartopy'",
")",
"return",
"from",
"matplotlib",
"import",
"cm",
"# draw meridian labels on the ... | makes a cartopy map with lats/lons
Requires installation of cartopy
Parameters:
_______________
fignum : matplotlib figure number
lats : array or list of latitudes
lons : array or list of longitudes
Opts : dictionary of plotting options:
Opts.keys=
proj : projection [su... | [
"makes",
"a",
"cartopy",
"map",
"with",
"lats",
"/",
"lons",
"Requires",
"installation",
"of",
"cartopy"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L3143-L3412 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_mag_map_basemap | def plot_mag_map_basemap(fignum, element, lons, lats, element_type, cmap='RdYlBu', lon_0=0, date=""):
"""
makes a color contour map of geomagnetic field element
Parameters
____________
fignum : matplotlib figure number
element : field element array from pmag.do_mag_map for plotting
lons : l... | python | def plot_mag_map_basemap(fignum, element, lons, lats, element_type, cmap='RdYlBu', lon_0=0, date=""):
"""
makes a color contour map of geomagnetic field element
Parameters
____________
fignum : matplotlib figure number
element : field element array from pmag.do_mag_map for plotting
lons : l... | [
"def",
"plot_mag_map_basemap",
"(",
"fignum",
",",
"element",
",",
"lons",
",",
"lats",
",",
"element_type",
",",
"cmap",
"=",
"'RdYlBu'",
",",
"lon_0",
"=",
"0",
",",
"date",
"=",
"\"\"",
")",
":",
"if",
"not",
"has_basemap",
":",
"print",
"(",
"'-W- ... | makes a color contour map of geomagnetic field element
Parameters
____________
fignum : matplotlib figure number
element : field element array from pmag.do_mag_map for plotting
lons : longitude array from pmag.do_mag_map for plotting
lats : latitude array from pmag.do_mag_map for plotting
e... | [
"makes",
"a",
"color",
"contour",
"map",
"of",
"geomagnetic",
"field",
"element"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L3415-L3478 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_mag_map | def plot_mag_map(fignum, element, lons, lats, element_type, cmap='coolwarm', lon_0=0, date="", contours=False, proj='PlateCarree'):
"""
makes a color contour map of geomagnetic field element
Parameters
____________
fignum : matplotlib figure number
element : field element array from pmag.do_mag... | python | def plot_mag_map(fignum, element, lons, lats, element_type, cmap='coolwarm', lon_0=0, date="", contours=False, proj='PlateCarree'):
"""
makes a color contour map of geomagnetic field element
Parameters
____________
fignum : matplotlib figure number
element : field element array from pmag.do_mag... | [
"def",
"plot_mag_map",
"(",
"fignum",
",",
"element",
",",
"lons",
",",
"lats",
",",
"element_type",
",",
"cmap",
"=",
"'coolwarm'",
",",
"lon_0",
"=",
"0",
",",
"date",
"=",
"\"\"",
",",
"contours",
"=",
"False",
",",
"proj",
"=",
"'PlateCarree'",
")"... | makes a color contour map of geomagnetic field element
Parameters
____________
fignum : matplotlib figure number
element : field element array from pmag.do_mag_map for plotting
lons : longitude array from pmag.do_mag_map for plotting
lats : latitude array from pmag.do_mag_map for plotting
e... | [
"makes",
"a",
"color",
"contour",
"map",
"of",
"geomagnetic",
"field",
"element"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L3481-L3570 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_eq_cont | def plot_eq_cont(fignum, DIblock, color_map='coolwarm'):
"""
plots dec inc block as a color contour
Parameters
__________________
Input:
fignum : figure number
DIblock : nested pairs of [Declination, Inclination]
color_map : matplotlib color map [default is coolwarm]
Out... | python | def plot_eq_cont(fignum, DIblock, color_map='coolwarm'):
"""
plots dec inc block as a color contour
Parameters
__________________
Input:
fignum : figure number
DIblock : nested pairs of [Declination, Inclination]
color_map : matplotlib color map [default is coolwarm]
Out... | [
"def",
"plot_eq_cont",
"(",
"fignum",
",",
"DIblock",
",",
"color_map",
"=",
"'coolwarm'",
")",
":",
"import",
"random",
"plt",
".",
"figure",
"(",
"num",
"=",
"fignum",
")",
"plt",
".",
"axis",
"(",
"\"off\"",
")",
"XY",
"=",
"[",
"]",
"centres",
"=... | plots dec inc block as a color contour
Parameters
__________________
Input:
fignum : figure number
DIblock : nested pairs of [Declination, Inclination]
color_map : matplotlib color map [default is coolwarm]
Output:
figure | [
"plots",
"dec",
"inc",
"block",
"as",
"a",
"color",
"contour",
"Parameters",
"__________________",
"Input",
":",
"fignum",
":",
"figure",
"number",
"DIblock",
":",
"nested",
"pairs",
"of",
"[",
"Declination",
"Inclination",
"]",
"color_map",
":",
"matplotlib",
... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L3573-L3671 |
PmagPy/PmagPy | pmagpy/pmagplotlib.py | plot_ts | def plot_ts(ax, agemin, agemax, timescale='gts12', ylabel="Age (Ma)"):
"""
Make a time scale plot between specified ages.
Parameters:
------------
ax : figure object
agemin : Minimum age for timescale
agemax : Maximum age for timescale
timescale : Time Scale [ default is Gradstein et al... | python | def plot_ts(ax, agemin, agemax, timescale='gts12', ylabel="Age (Ma)"):
"""
Make a time scale plot between specified ages.
Parameters:
------------
ax : figure object
agemin : Minimum age for timescale
agemax : Maximum age for timescale
timescale : Time Scale [ default is Gradstein et al... | [
"def",
"plot_ts",
"(",
"ax",
",",
"agemin",
",",
"agemax",
",",
"timescale",
"=",
"'gts12'",
",",
"ylabel",
"=",
"\"Age (Ma)\"",
")",
":",
"ax",
".",
"set_title",
"(",
"timescale",
".",
"upper",
"(",
")",
")",
"ax",
".",
"axis",
"(",
"[",
"-",
".25... | Make a time scale plot between specified ages.
Parameters:
------------
ax : figure object
agemin : Minimum age for timescale
agemax : Maximum age for timescale
timescale : Time Scale [ default is Gradstein et al., (2012)]
for other options see pmag.get_ts()
ylabel : if set, plot as ... | [
"Make",
"a",
"time",
"scale",
"plot",
"between",
"specified",
"ages",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmagplotlib.py#L3674-L3722 |
PmagPy/PmagPy | programs/quick_hyst2.py | main | def main():
"""
NAME
quick_hyst.py
DESCRIPTION
makes plots of hysteresis data
SYNTAX
quick_hyst.py [command line options]
OPTIONS
-h prints help message and quits
-usr USER: identify user, default is ""
-f: specify input file, default is magic_mea... | python | def main():
"""
NAME
quick_hyst.py
DESCRIPTION
makes plots of hysteresis data
SYNTAX
quick_hyst.py [command line options]
OPTIONS
-h prints help message and quits
-usr USER: identify user, default is ""
-f: specify input file, default is magic_mea... | [
"def",
"main",
"(",
")",
":",
"args",
"=",
"sys",
".",
"argv",
"PLT",
"=",
"1",
"plots",
"=",
"0",
"user",
",",
"meas_file",
"=",
"\"\"",
",",
"\"magic_measurements.txt\"",
"pltspec",
"=",
"\"\"",
"dir_path",
"=",
"'.'",
"fmt",
"=",
"'png'",
"verbose",... | NAME
quick_hyst.py
DESCRIPTION
makes plots of hysteresis data
SYNTAX
quick_hyst.py [command line options]
OPTIONS
-h prints help message and quits
-usr USER: identify user, default is ""
-f: specify input file, default is magic_measurements.txt
-s... | [
"NAME",
"quick_hyst",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/quick_hyst2.py#L13-L248 |
PmagPy/PmagPy | programs/conversion_scripts2/jr6_txt_magic2.py | main | def main(command_line=True, **kwargs):
"""
NAME
jr6_txt_magic.py
DESCRIPTION
converts JR6 .txt format files to magic_measurements format files
SYNTAX
jr6_txt_magic.py [command line options]
OPTIONS
-h: prints the help message and quits.
-f FILE: specify i... | python | def main(command_line=True, **kwargs):
"""
NAME
jr6_txt_magic.py
DESCRIPTION
converts JR6 .txt format files to magic_measurements format files
SYNTAX
jr6_txt_magic.py [command line options]
OPTIONS
-h: prints the help message and quits.
-f FILE: specify i... | [
"def",
"main",
"(",
"command_line",
"=",
"True",
",",
"*",
"*",
"kwargs",
")",
":",
"# initialize some stuff",
"noave",
"=",
"0",
"volume",
"=",
"2.5",
"*",
"1e-6",
"# default volume is 2.5 cm^3 (2.5 * 1e-6 meters^3)",
"inst",
"=",
"\"\"",
"samp_con",
",",
"Z",
... | NAME
jr6_txt_magic.py
DESCRIPTION
converts JR6 .txt format files to magic_measurements format files
SYNTAX
jr6_txt_magic.py [command line options]
OPTIONS
-h: prints the help message and quits.
-f FILE: specify input file, or
-F FILE: specify output file,... | [
"NAME",
"jr6_txt_magic",
".",
"py",
"DESCRIPTION",
"converts",
"JR6",
".",
"txt",
"format",
"files",
"to",
"magic_measurements",
"format",
"files"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/conversion_scripts2/jr6_txt_magic2.py#L7-L307 |
PmagPy/PmagPy | pmagpy/nlt.py | funk | def funk(p, x, y):
"""
Function misfit evaluation for best-fit tanh curve
f(x[:]) = alpha*tanh(beta*x[:])
alpha = params[0]
beta = params[1]
funk(params) = sqrt(sum((y[:] - f(x[:]))**2)/len(y[:]))
Output is RMS misfit
x=xx[0][:]
y=xx[1][:]q
"""
alpha=p[0]
beta... | python | def funk(p, x, y):
"""
Function misfit evaluation for best-fit tanh curve
f(x[:]) = alpha*tanh(beta*x[:])
alpha = params[0]
beta = params[1]
funk(params) = sqrt(sum((y[:] - f(x[:]))**2)/len(y[:]))
Output is RMS misfit
x=xx[0][:]
y=xx[1][:]q
"""
alpha=p[0]
beta... | [
"def",
"funk",
"(",
"p",
",",
"x",
",",
"y",
")",
":",
"alpha",
"=",
"p",
"[",
"0",
"]",
"beta",
"=",
"p",
"[",
"1",
"]",
"dev",
"=",
"0",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"x",
")",
")",
":",
"dev",
"=",
"dev",
"+",
"(",
"(... | Function misfit evaluation for best-fit tanh curve
f(x[:]) = alpha*tanh(beta*x[:])
alpha = params[0]
beta = params[1]
funk(params) = sqrt(sum((y[:] - f(x[:]))**2)/len(y[:]))
Output is RMS misfit
x=xx[0][:]
y=xx[1][:]q | [
"Function",
"misfit",
"evaluation",
"for",
"best",
"-",
"fit",
"tanh",
"curve",
"f",
"(",
"x",
"[",
":",
"]",
")",
"=",
"alpha",
"*",
"tanh",
"(",
"beta",
"*",
"x",
"[",
":",
"]",
")",
"alpha",
"=",
"params",
"[",
"0",
"]",
"beta",
"=",
"params... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/nlt.py#L15-L32 |
PmagPy/PmagPy | pmagpy/nlt.py | compare | def compare(a, b):
"""
Compare items in 2 arrays. Returns sum(abs(a(i)-b(i)))
"""
s=0
for i in range(len(a)):
s=s+abs(a[i]-b[i])
return s | python | def compare(a, b):
"""
Compare items in 2 arrays. Returns sum(abs(a(i)-b(i)))
"""
s=0
for i in range(len(a)):
s=s+abs(a[i]-b[i])
return s | [
"def",
"compare",
"(",
"a",
",",
"b",
")",
":",
"s",
"=",
"0",
"for",
"i",
"in",
"range",
"(",
"len",
"(",
"a",
")",
")",
":",
"s",
"=",
"s",
"+",
"abs",
"(",
"a",
"[",
"i",
"]",
"-",
"b",
"[",
"i",
"]",
")",
"return",
"s"
] | Compare items in 2 arrays. Returns sum(abs(a(i)-b(i))) | [
"Compare",
"items",
"in",
"2",
"arrays",
".",
"Returns",
"sum",
"(",
"abs",
"(",
"a",
"(",
"i",
")",
"-",
"b",
"(",
"i",
")))"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/nlt.py#L34-L41 |
PmagPy/PmagPy | pmagpy/nlt.py | TRM | def TRM(f,a,b):
"""
Calculate TRM using tanh relationship
TRM(f)=a*math.tanh(b*f)
"""
m = float(a) * math.tanh(float(b) * float(f))
return float(m) | python | def TRM(f,a,b):
"""
Calculate TRM using tanh relationship
TRM(f)=a*math.tanh(b*f)
"""
m = float(a) * math.tanh(float(b) * float(f))
return float(m) | [
"def",
"TRM",
"(",
"f",
",",
"a",
",",
"b",
")",
":",
"m",
"=",
"float",
"(",
"a",
")",
"*",
"math",
".",
"tanh",
"(",
"float",
"(",
"b",
")",
"*",
"float",
"(",
"f",
")",
")",
"return",
"float",
"(",
"m",
")"
] | Calculate TRM using tanh relationship
TRM(f)=a*math.tanh(b*f) | [
"Calculate",
"TRM",
"using",
"tanh",
"relationship",
"TRM",
"(",
"f",
")",
"=",
"a",
"*",
"math",
".",
"tanh",
"(",
"b",
"*",
"f",
")"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/nlt.py#L43-L49 |
PmagPy/PmagPy | pmagpy/nlt.py | TRMinv | def TRMinv(m,a,b):
WARN = True # Warn, rather than stop if I encounter a NaN...
"""
Calculate applied field from TRM using tanh relationship
TRMinv(m)=(1/b)*atanh(m/a)
"""
if float(a)==0:
print('ERROR: TRMinv: a==0.')
if not WARN : sys.exit()
if float(b)==0:
prin... | python | def TRMinv(m,a,b):
WARN = True # Warn, rather than stop if I encounter a NaN...
"""
Calculate applied field from TRM using tanh relationship
TRMinv(m)=(1/b)*atanh(m/a)
"""
if float(a)==0:
print('ERROR: TRMinv: a==0.')
if not WARN : sys.exit()
if float(b)==0:
prin... | [
"def",
"TRMinv",
"(",
"m",
",",
"a",
",",
"b",
")",
":",
"WARN",
"=",
"True",
"# Warn, rather than stop if I encounter a NaN...",
"if",
"float",
"(",
"a",
")",
"==",
"0",
":",
"print",
"(",
"'ERROR: TRMinv: a==0.'",
")",
"if",
"not",
"WARN",
":",
"sys",
... | Calculate applied field from TRM using tanh relationship
TRMinv(m)=(1/b)*atanh(m/a) | [
"Calculate",
"applied",
"field",
"from",
"TRM",
"using",
"tanh",
"relationship",
"TRMinv",
"(",
"m",
")",
"=",
"(",
"1",
"/",
"b",
")",
"*",
"atanh",
"(",
"m",
"/",
"a",
")"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/nlt.py#L52-L70 |
PmagPy/PmagPy | pmagpy/nlt.py | NRM | def NRM(f,a,b,best):
WARN = True # Warn, rather than stop if I encounter a NaN...
"""
Calculate NRM expected lab field and estimated ancient field
NRM(blab,best)= (best/blab)*TRM(blab)
"""
if float(f)==0:
print('ERROR: NRM: f==0.')
if not WARN : sys.exit()
m = (old_div(float(... | python | def NRM(f,a,b,best):
WARN = True # Warn, rather than stop if I encounter a NaN...
"""
Calculate NRM expected lab field and estimated ancient field
NRM(blab,best)= (best/blab)*TRM(blab)
"""
if float(f)==0:
print('ERROR: NRM: f==0.')
if not WARN : sys.exit()
m = (old_div(float(... | [
"def",
"NRM",
"(",
"f",
",",
"a",
",",
"b",
",",
"best",
")",
":",
"WARN",
"=",
"True",
"# Warn, rather than stop if I encounter a NaN...",
"if",
"float",
"(",
"f",
")",
"==",
"0",
":",
"print",
"(",
"'ERROR: NRM: f==0.'",
")",
"if",
"not",
"WARN",
":",
... | Calculate NRM expected lab field and estimated ancient field
NRM(blab,best)= (best/blab)*TRM(blab) | [
"Calculate",
"NRM",
"expected",
"lab",
"field",
"and",
"estimated",
"ancient",
"field",
"NRM",
"(",
"blab",
"best",
")",
"=",
"(",
"best",
"/",
"blab",
")",
"*",
"TRM",
"(",
"blab",
")"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/nlt.py#L72-L82 |
PmagPy/PmagPy | programs/plotdi_e.py | main | def main():
"""
NAME
plotdi_e.py
DESCRIPTION
plots equal area projection from dec inc data and cones of confidence
(Fisher, kent or Bingham or bootstrap).
INPUT FORMAT
takes dec/inc as first two columns in space delimited file
SYNTAX
plotdi_e.py [command li... | python | def main():
"""
NAME
plotdi_e.py
DESCRIPTION
plots equal area projection from dec inc data and cones of confidence
(Fisher, kent or Bingham or bootstrap).
INPUT FORMAT
takes dec/inc as first two columns in space delimited file
SYNTAX
plotdi_e.py [command li... | [
"def",
"main",
"(",
")",
":",
"dist",
"=",
"'F'",
"# default distribution is Fisherian",
"mode",
"=",
"1",
"title",
"=",
"\"\"",
"EQ",
"=",
"{",
"'eq'",
":",
"1",
"}",
"if",
"len",
"(",
"sys",
".",
"argv",
")",
">",
"0",
":",
"if",
"'-h'",
"in",
... | NAME
plotdi_e.py
DESCRIPTION
plots equal area projection from dec inc data and cones of confidence
(Fisher, kent or Bingham or bootstrap).
INPUT FORMAT
takes dec/inc as first two columns in space delimited file
SYNTAX
plotdi_e.py [command line options]
OPTIONS... | [
"NAME",
"plotdi_e",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/plotdi_e.py#L11-L257 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.init_UI | def init_UI(self):
"""
Builds User Interface for the interpretation Editor
"""
#set fonts
FONT_WEIGHT=1
if sys.platform.startswith('win'): FONT_WEIGHT=-1
font1 = wx.Font(9+FONT_WEIGHT, wx.SWISS, wx.NORMAL, wx.NORMAL, False, self.font_type)
font2 = wx.Font... | python | def init_UI(self):
"""
Builds User Interface for the interpretation Editor
"""
#set fonts
FONT_WEIGHT=1
if sys.platform.startswith('win'): FONT_WEIGHT=-1
font1 = wx.Font(9+FONT_WEIGHT, wx.SWISS, wx.NORMAL, wx.NORMAL, False, self.font_type)
font2 = wx.Font... | [
"def",
"init_UI",
"(",
"self",
")",
":",
"#set fonts",
"FONT_WEIGHT",
"=",
"1",
"if",
"sys",
".",
"platform",
".",
"startswith",
"(",
"'win'",
")",
":",
"FONT_WEIGHT",
"=",
"-",
"1",
"font1",
"=",
"wx",
".",
"Font",
"(",
"9",
"+",
"FONT_WEIGHT",
",",... | Builds User Interface for the interpretation Editor | [
"Builds",
"User",
"Interface",
"for",
"the",
"interpretation",
"Editor"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L55-L285 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.update_editor | def update_editor(self):
"""
updates the logger and plot on the interpretation editor window
"""
self.fit_list = []
self.search_choices = []
for specimen in self.specimens_list:
if specimen not in self.parent.pmag_results_data['specimens']: continue
... | python | def update_editor(self):
"""
updates the logger and plot on the interpretation editor window
"""
self.fit_list = []
self.search_choices = []
for specimen in self.specimens_list:
if specimen not in self.parent.pmag_results_data['specimens']: continue
... | [
"def",
"update_editor",
"(",
"self",
")",
":",
"self",
".",
"fit_list",
"=",
"[",
"]",
"self",
".",
"search_choices",
"=",
"[",
"]",
"for",
"specimen",
"in",
"self",
".",
"specimens_list",
":",
"if",
"specimen",
"not",
"in",
"self",
".",
"parent",
".",... | updates the logger and plot on the interpretation editor window | [
"updates",
"the",
"logger",
"and",
"plot",
"on",
"the",
"interpretation",
"editor",
"window"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L408-L424 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.update_logger_entry | def update_logger_entry(self,i):
"""
helper function that given a index in this objects fit_list parameter inserts a entry at that index
@param: i -> index in fit_list to find the (specimen_name,fit object) tup that determines all the data for this logger entry.
"""
if i < len(se... | python | def update_logger_entry(self,i):
"""
helper function that given a index in this objects fit_list parameter inserts a entry at that index
@param: i -> index in fit_list to find the (specimen_name,fit object) tup that determines all the data for this logger entry.
"""
if i < len(se... | [
"def",
"update_logger_entry",
"(",
"self",
",",
"i",
")",
":",
"if",
"i",
"<",
"len",
"(",
"self",
".",
"fit_list",
")",
":",
"tup",
"=",
"self",
".",
"fit_list",
"[",
"i",
"]",
"elif",
"i",
"<",
"self",
".",
"logger",
".",
"GetItemCount",
"(",
"... | helper function that given a index in this objects fit_list parameter inserts a entry at that index
@param: i -> index in fit_list to find the (specimen_name,fit object) tup that determines all the data for this logger entry. | [
"helper",
"function",
"that",
"given",
"a",
"index",
"in",
"this",
"objects",
"fit_list",
"parameter",
"inserts",
"a",
"entry",
"at",
"that",
"index"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L426-L531 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.change_selected | def change_selected(self,new_fit):
"""
updates passed in fit or index as current fit for the editor (does not affect parent),
if no parameters are passed in it sets first fit as current
@param: new_fit -> fit object to highlight as selected
"""
if len(self.fit_list)==0: r... | python | def change_selected(self,new_fit):
"""
updates passed in fit or index as current fit for the editor (does not affect parent),
if no parameters are passed in it sets first fit as current
@param: new_fit -> fit object to highlight as selected
"""
if len(self.fit_list)==0: r... | [
"def",
"change_selected",
"(",
"self",
",",
"new_fit",
")",
":",
"if",
"len",
"(",
"self",
".",
"fit_list",
")",
"==",
"0",
":",
"return",
"if",
"self",
".",
"search_query",
"and",
"self",
".",
"parent",
".",
"current_fit",
"not",
"in",
"[",
"x",
"["... | updates passed in fit or index as current fit for the editor (does not affect parent),
if no parameters are passed in it sets first fit as current
@param: new_fit -> fit object to highlight as selected | [
"updates",
"passed",
"in",
"fit",
"or",
"index",
"as",
"current",
"fit",
"for",
"the",
"editor",
"(",
"does",
"not",
"affect",
"parent",
")",
"if",
"no",
"parameters",
"are",
"passed",
"in",
"it",
"sets",
"first",
"fit",
"as",
"current"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L540-L573 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.logger_focus | def logger_focus(self,i,focus_shift=16):
"""
focuses the logger on an index 12 entries below i
@param: i -> index to focus on
"""
if self.logger.GetItemCount()-1 > i+focus_shift:
i += focus_shift
else:
i = self.logger.GetItemCount()-1
self.... | python | def logger_focus(self,i,focus_shift=16):
"""
focuses the logger on an index 12 entries below i
@param: i -> index to focus on
"""
if self.logger.GetItemCount()-1 > i+focus_shift:
i += focus_shift
else:
i = self.logger.GetItemCount()-1
self.... | [
"def",
"logger_focus",
"(",
"self",
",",
"i",
",",
"focus_shift",
"=",
"16",
")",
":",
"if",
"self",
".",
"logger",
".",
"GetItemCount",
"(",
")",
"-",
"1",
">",
"i",
"+",
"focus_shift",
":",
"i",
"+=",
"focus_shift",
"else",
":",
"i",
"=",
"self",... | focuses the logger on an index 12 entries below i
@param: i -> index to focus on | [
"focuses",
"the",
"logger",
"on",
"an",
"index",
"12",
"entries",
"below",
"i"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L575-L584 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.OnClick_listctrl | def OnClick_listctrl(self, event):
"""
Edits the logger and the Zeq_GUI parent object to select the fit that was newly selected by a double click
@param: event -> wx.ListCtrlEvent that triggered this function
"""
i = event.GetIndex()
if self.parent.current_fit == self.fit... | python | def OnClick_listctrl(self, event):
"""
Edits the logger and the Zeq_GUI parent object to select the fit that was newly selected by a double click
@param: event -> wx.ListCtrlEvent that triggered this function
"""
i = event.GetIndex()
if self.parent.current_fit == self.fit... | [
"def",
"OnClick_listctrl",
"(",
"self",
",",
"event",
")",
":",
"i",
"=",
"event",
".",
"GetIndex",
"(",
")",
"if",
"self",
".",
"parent",
".",
"current_fit",
"==",
"self",
".",
"fit_list",
"[",
"i",
"]",
"[",
"0",
"]",
":",
"return",
"self",
".",
... | Edits the logger and the Zeq_GUI parent object to select the fit that was newly selected by a double click
@param: event -> wx.ListCtrlEvent that triggered this function | [
"Edits",
"the",
"logger",
"and",
"the",
"Zeq_GUI",
"parent",
"object",
"to",
"select",
"the",
"fit",
"that",
"was",
"newly",
"selected",
"by",
"a",
"double",
"click"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L586-L602 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.OnRightClickListctrl | def OnRightClickListctrl(self, event):
"""
Edits the logger and the Zeq_GUI parent object so that the selected interpretation is now marked as bad
@param: event -> wx.ListCtrlEvent that triggered this function
"""
i = event.GetIndex()
fit,spec = self.fit_list[i][0],self.f... | python | def OnRightClickListctrl(self, event):
"""
Edits the logger and the Zeq_GUI parent object so that the selected interpretation is now marked as bad
@param: event -> wx.ListCtrlEvent that triggered this function
"""
i = event.GetIndex()
fit,spec = self.fit_list[i][0],self.f... | [
"def",
"OnRightClickListctrl",
"(",
"self",
",",
"event",
")",
":",
"i",
"=",
"event",
".",
"GetIndex",
"(",
")",
"fit",
",",
"spec",
"=",
"self",
".",
"fit_list",
"[",
"i",
"]",
"[",
"0",
"]",
",",
"self",
".",
"fit_list",
"[",
"i",
"]",
"[",
... | Edits the logger and the Zeq_GUI parent object so that the selected interpretation is now marked as bad
@param: event -> wx.ListCtrlEvent that triggered this function | [
"Edits",
"the",
"logger",
"and",
"the",
"Zeq_GUI",
"parent",
"object",
"so",
"that",
"the",
"selected",
"interpretation",
"is",
"now",
"marked",
"as",
"bad"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L604-L625 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.on_select_show_box | def on_select_show_box(self,event):
"""
Changes the type of mean shown on the high levels mean plot so that single dots represent one of whatever the value of this box is.
@param: event -> the wx.COMBOBOXEVENT that triggered this function
"""
self.parent.UPPER_LEVEL_SHOW=self.sho... | python | def on_select_show_box(self,event):
"""
Changes the type of mean shown on the high levels mean plot so that single dots represent one of whatever the value of this box is.
@param: event -> the wx.COMBOBOXEVENT that triggered this function
"""
self.parent.UPPER_LEVEL_SHOW=self.sho... | [
"def",
"on_select_show_box",
"(",
"self",
",",
"event",
")",
":",
"self",
".",
"parent",
".",
"UPPER_LEVEL_SHOW",
"=",
"self",
".",
"show_box",
".",
"GetValue",
"(",
")",
"self",
".",
"parent",
".",
"calculate_high_levels_data",
"(",
")",
"self",
".",
"par... | Changes the type of mean shown on the high levels mean plot so that single dots represent one of whatever the value of this box is.
@param: event -> the wx.COMBOBOXEVENT that triggered this function | [
"Changes",
"the",
"type",
"of",
"mean",
"shown",
"on",
"the",
"high",
"levels",
"mean",
"plot",
"so",
"that",
"single",
"dots",
"represent",
"one",
"of",
"whatever",
"the",
"value",
"of",
"this",
"box",
"is",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L669-L676 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.on_select_high_level | def on_select_high_level(self,event,called_by_parent=False):
"""
alters the possible entries in level_names combobox to give the user selections for which specimen interpretations to display in the logger
@param: event -> the wx.COMBOBOXEVENT that triggered this function
"""
UPPE... | python | def on_select_high_level(self,event,called_by_parent=False):
"""
alters the possible entries in level_names combobox to give the user selections for which specimen interpretations to display in the logger
@param: event -> the wx.COMBOBOXEVENT that triggered this function
"""
UPPE... | [
"def",
"on_select_high_level",
"(",
"self",
",",
"event",
",",
"called_by_parent",
"=",
"False",
")",
":",
"UPPER_LEVEL",
"=",
"self",
".",
"level_box",
".",
"GetValue",
"(",
")",
"if",
"UPPER_LEVEL",
"==",
"'sample'",
":",
"self",
".",
"level_names",
".",
... | alters the possible entries in level_names combobox to give the user selections for which specimen interpretations to display in the logger
@param: event -> the wx.COMBOBOXEVENT that triggered this function | [
"alters",
"the",
"possible",
"entries",
"in",
"level_names",
"combobox",
"to",
"give",
"the",
"user",
"selections",
"for",
"which",
"specimen",
"interpretations",
"to",
"display",
"in",
"the",
"logger"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L679-L706 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.on_select_level_name | def on_select_level_name(self,event,called_by_parent=False):
"""
change this objects specimens_list to control which specimen interpretatoins are displayed in this objects logger
@param: event -> the wx.ComboBoxEvent that triggered this function
"""
high_level_name=str(self.level... | python | def on_select_level_name(self,event,called_by_parent=False):
"""
change this objects specimens_list to control which specimen interpretatoins are displayed in this objects logger
@param: event -> the wx.ComboBoxEvent that triggered this function
"""
high_level_name=str(self.level... | [
"def",
"on_select_level_name",
"(",
"self",
",",
"event",
",",
"called_by_parent",
"=",
"False",
")",
":",
"high_level_name",
"=",
"str",
"(",
"self",
".",
"level_names",
".",
"GetValue",
"(",
")",
")",
"if",
"self",
".",
"level_box",
".",
"GetValue",
"(",... | change this objects specimens_list to control which specimen interpretatoins are displayed in this objects logger
@param: event -> the wx.ComboBoxEvent that triggered this function | [
"change",
"this",
"objects",
"specimens_list",
"to",
"control",
"which",
"specimen",
"interpretatoins",
"are",
"displayed",
"in",
"this",
"objects",
"logger"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L708-L729 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.on_select_mean_type_box | def on_select_mean_type_box(self, event):
"""
set parent Zeq_GUI to reflect change in this box and change the
@param: event -> the wx.ComboBoxEvent that triggered this function
"""
new_mean_type = self.mean_type_box.GetValue()
if new_mean_type == "None":
self.... | python | def on_select_mean_type_box(self, event):
"""
set parent Zeq_GUI to reflect change in this box and change the
@param: event -> the wx.ComboBoxEvent that triggered this function
"""
new_mean_type = self.mean_type_box.GetValue()
if new_mean_type == "None":
self.... | [
"def",
"on_select_mean_type_box",
"(",
"self",
",",
"event",
")",
":",
"new_mean_type",
"=",
"self",
".",
"mean_type_box",
".",
"GetValue",
"(",
")",
"if",
"new_mean_type",
"==",
"\"None\"",
":",
"self",
".",
"parent",
".",
"clear_high_level_pars",
"(",
")",
... | set parent Zeq_GUI to reflect change in this box and change the
@param: event -> the wx.ComboBoxEvent that triggered this function | [
"set",
"parent",
"Zeq_GUI",
"to",
"reflect",
"change",
"in",
"this",
"box",
"and",
"change",
"the"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L731-L740 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.on_select_mean_fit_box | def on_select_mean_fit_box(self, event):
"""
set parent Zeq_GUI to reflect the change in this box then replot the high level means plot
@param: event -> the wx.COMBOBOXEVENT that triggered this function
"""
new_mean_fit = self.mean_fit_box.GetValue()
self.parent.mean_fit_... | python | def on_select_mean_fit_box(self, event):
"""
set parent Zeq_GUI to reflect the change in this box then replot the high level means plot
@param: event -> the wx.COMBOBOXEVENT that triggered this function
"""
new_mean_fit = self.mean_fit_box.GetValue()
self.parent.mean_fit_... | [
"def",
"on_select_mean_fit_box",
"(",
"self",
",",
"event",
")",
":",
"new_mean_fit",
"=",
"self",
".",
"mean_fit_box",
".",
"GetValue",
"(",
")",
"self",
".",
"parent",
".",
"mean_fit_box",
".",
"SetStringSelection",
"(",
"new_mean_fit",
")",
"self",
".",
"... | set parent Zeq_GUI to reflect the change in this box then replot the high level means plot
@param: event -> the wx.COMBOBOXEVENT that triggered this function | [
"set",
"parent",
"Zeq_GUI",
"to",
"reflect",
"the",
"change",
"in",
"this",
"box",
"then",
"replot",
"the",
"high",
"level",
"means",
"plot"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L742-L749 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.add_highlighted_fits | def add_highlighted_fits(self, evnet):
"""
adds a new interpretation to each specimen highlighted in logger if multiple interpretations are highlighted of the same specimen only one new interpretation is added
@param: event -> the wx.ButtonEvent that triggered this function
"""
... | python | def add_highlighted_fits(self, evnet):
"""
adds a new interpretation to each specimen highlighted in logger if multiple interpretations are highlighted of the same specimen only one new interpretation is added
@param: event -> the wx.ButtonEvent that triggered this function
"""
... | [
"def",
"add_highlighted_fits",
"(",
"self",
",",
"evnet",
")",
":",
"specimens",
"=",
"[",
"]",
"next_i",
"=",
"self",
".",
"logger",
".",
"GetNextSelected",
"(",
"-",
"1",
")",
"if",
"next_i",
"==",
"-",
"1",
":",
"return",
"while",
"next_i",
"!=",
... | adds a new interpretation to each specimen highlighted in logger if multiple interpretations are highlighted of the same specimen only one new interpretation is added
@param: event -> the wx.ButtonEvent that triggered this function | [
"adds",
"a",
"new",
"interpretation",
"to",
"each",
"specimen",
"highlighted",
"in",
"logger",
"if",
"multiple",
"interpretations",
"are",
"highlighted",
"of",
"the",
"same",
"specimen",
"only",
"one",
"new",
"interpretation",
"is",
"added"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L761-L782 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.delete_highlighted_fits | def delete_highlighted_fits(self, event):
"""
iterates through all highlighted fits in the logger of this object and removes them from the logger and the Zeq_GUI parent object
@param: event -> the wx.ButtonEvent that triggered this function
"""
next_i = -1
deleted_items ... | python | def delete_highlighted_fits(self, event):
"""
iterates through all highlighted fits in the logger of this object and removes them from the logger and the Zeq_GUI parent object
@param: event -> the wx.ButtonEvent that triggered this function
"""
next_i = -1
deleted_items ... | [
"def",
"delete_highlighted_fits",
"(",
"self",
",",
"event",
")",
":",
"next_i",
"=",
"-",
"1",
"deleted_items",
"=",
"[",
"]",
"while",
"True",
":",
"next_i",
"=",
"self",
".",
"logger",
".",
"GetNextSelected",
"(",
"next_i",
")",
"if",
"next_i",
"==",
... | iterates through all highlighted fits in the logger of this object and removes them from the logger and the Zeq_GUI parent object
@param: event -> the wx.ButtonEvent that triggered this function | [
"iterates",
"through",
"all",
"highlighted",
"fits",
"in",
"the",
"logger",
"of",
"this",
"object",
"and",
"removes",
"them",
"from",
"the",
"logger",
"and",
"the",
"Zeq_GUI",
"parent",
"object"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L818-L834 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.delete_entry | def delete_entry(self, fit = None, index = None):
"""
deletes the single item from the logger of this object that corrisponds to either the passed in fit or index. Note this function mutaits the logger of this object if deleting more than one entry be sure to pass items to delete in from highest index t... | python | def delete_entry(self, fit = None, index = None):
"""
deletes the single item from the logger of this object that corrisponds to either the passed in fit or index. Note this function mutaits the logger of this object if deleting more than one entry be sure to pass items to delete in from highest index t... | [
"def",
"delete_entry",
"(",
"self",
",",
"fit",
"=",
"None",
",",
"index",
"=",
"None",
")",
":",
"if",
"type",
"(",
"index",
")",
"==",
"int",
"and",
"not",
"fit",
":",
"fit",
",",
"specimen",
"=",
"self",
".",
"fit_list",
"[",
"index",
"]",
"if... | deletes the single item from the logger of this object that corrisponds to either the passed in fit or index. Note this function mutaits the logger of this object if deleting more than one entry be sure to pass items to delete in from highest index to lowest or else odd things can happen.
@param: fit -> Fit obj... | [
"deletes",
"the",
"single",
"item",
"from",
"the",
"logger",
"of",
"this",
"object",
"that",
"corrisponds",
"to",
"either",
"the",
"passed",
"in",
"fit",
"or",
"index",
".",
"Note",
"this",
"function",
"mutaits",
"the",
"logger",
"of",
"this",
"object",
"i... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L836-L857 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.apply_changes | def apply_changes(self, event):
"""
applies the changes in the various attribute boxes of this object to all highlighted fit objects in the logger, these changes are reflected both in this object and in the Zeq_GUI parent object.
@param: event -> the wx.ButtonEvent that triggered this function
... | python | def apply_changes(self, event):
"""
applies the changes in the various attribute boxes of this object to all highlighted fit objects in the logger, these changes are reflected both in this object and in the Zeq_GUI parent object.
@param: event -> the wx.ButtonEvent that triggered this function
... | [
"def",
"apply_changes",
"(",
"self",
",",
"event",
")",
":",
"new_name",
"=",
"self",
".",
"name_box",
".",
"GetLineText",
"(",
"0",
")",
"new_color",
"=",
"self",
".",
"color_box",
".",
"GetValue",
"(",
")",
"new_tmin",
"=",
"self",
".",
"tmin_box",
"... | applies the changes in the various attribute boxes of this object to all highlighted fit objects in the logger, these changes are reflected both in this object and in the Zeq_GUI parent object.
@param: event -> the wx.ButtonEvent that triggered this function | [
"applies",
"the",
"changes",
"in",
"the",
"various",
"attribute",
"boxes",
"of",
"this",
"object",
"to",
"all",
"highlighted",
"fit",
"objects",
"in",
"the",
"logger",
"these",
"changes",
"are",
"reflected",
"both",
"in",
"this",
"object",
"and",
"in",
"the"... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L859-L907 |
PmagPy/PmagPy | dialogs/demag_interpretation_editor.py | InterpretationEditorFrame.pan_zoom_high_equalarea | def pan_zoom_high_equalarea(self,event):
"""
Uses the toolbar for the canvas to change the function from zoom to pan or pan to zoom
@param: event -> the wx.MouseEvent that triggered this funciton
"""
if event.LeftIsDown() or event.ButtonDClick():
return
elif s... | python | def pan_zoom_high_equalarea(self,event):
"""
Uses the toolbar for the canvas to change the function from zoom to pan or pan to zoom
@param: event -> the wx.MouseEvent that triggered this funciton
"""
if event.LeftIsDown() or event.ButtonDClick():
return
elif s... | [
"def",
"pan_zoom_high_equalarea",
"(",
"self",
",",
"event",
")",
":",
"if",
"event",
".",
"LeftIsDown",
"(",
")",
"or",
"event",
".",
"ButtonDClick",
"(",
")",
":",
"return",
"elif",
"self",
".",
"high_EA_setting",
"==",
"\"Zoom\"",
":",
"self",
".",
"h... | Uses the toolbar for the canvas to change the function from zoom to pan or pan to zoom
@param: event -> the wx.MouseEvent that triggered this funciton | [
"Uses",
"the",
"toolbar",
"for",
"the",
"canvas",
"to",
"change",
"the",
"function",
"from",
"zoom",
"to",
"pan",
"or",
"pan",
"to",
"zoom"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_interpretation_editor.py#L935-L953 |
PmagPy/PmagPy | programs/tk03.py | main | def main():
"""
NAME
tk03.py
DESCRIPTION
generates set of vectors drawn from TK03.gad at given lat and
rotated about vertical axis by given Dec
INPUT (COMMAND LINE ENTRY)
OUTPUT
dec, inc, int
SYNTAX
tk03.py [command line options] [> OutputFileName]
... | python | def main():
"""
NAME
tk03.py
DESCRIPTION
generates set of vectors drawn from TK03.gad at given lat and
rotated about vertical axis by given Dec
INPUT (COMMAND LINE ENTRY)
OUTPUT
dec, inc, int
SYNTAX
tk03.py [command line options] [> OutputFileName]
... | [
"def",
"main",
"(",
")",
":",
"N",
",",
"L",
",",
"D",
",",
"R",
"=",
"100",
",",
"0.",
",",
"0.",
",",
"0",
"G2",
",",
"G3",
"=",
"0.",
",",
"0.",
"cnt",
"=",
"1",
"Imax",
"=",
"0",
"if",
"len",
"(",
"sys",
".",
"argv",
")",
"!=",
"0... | NAME
tk03.py
DESCRIPTION
generates set of vectors drawn from TK03.gad at given lat and
rotated about vertical axis by given Dec
INPUT (COMMAND LINE ENTRY)
OUTPUT
dec, inc, int
SYNTAX
tk03.py [command line options] [> OutputFileName]
OPTIONS
-n N s... | [
"NAME",
"tk03",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/tk03.py#L9-L74 |
PmagPy/PmagPy | programs/gaussian.py | main | def main():
"""
NAME
gaussian.py
DESCRIPTION
generates set of normally distribed data from specified distribution
INPUT (COMMAND LINE ENTRY)
OUTPUT
x
SYNTAX
gaussian.py [command line options]
OPTIONS
-h prints help message and quits
-s spe... | python | def main():
"""
NAME
gaussian.py
DESCRIPTION
generates set of normally distribed data from specified distribution
INPUT (COMMAND LINE ENTRY)
OUTPUT
x
SYNTAX
gaussian.py [command line options]
OPTIONS
-h prints help message and quits
-s spe... | [
"def",
"main",
"(",
")",
":",
"N",
",",
"mean",
",",
"sigma",
"=",
"100",
",",
"0",
",",
"1.",
"outfile",
"=",
"\"\"",
"if",
"'-h'",
"in",
"sys",
".",
"argv",
":",
"print",
"(",
"main",
".",
"__doc__",
")",
"sys",
".",
"exit",
"(",
")",
"else... | NAME
gaussian.py
DESCRIPTION
generates set of normally distribed data from specified distribution
INPUT (COMMAND LINE ENTRY)
OUTPUT
x
SYNTAX
gaussian.py [command line options]
OPTIONS
-h prints help message and quits
-s specify standard deviation ... | [
"NAME",
"gaussian",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/gaussian.py#L7-L54 |
PmagPy/PmagPy | programs/qqunf.py | main | def main():
"""
NAME
qqunf.py
DESCRIPTION
makes qq plot from input data against uniform distribution
SYNTAX
qqunf.py [command line options]
OPTIONS
-h help message
-f FILE, specify file on command line
"""
fmt,plot='svg',0
if '-h' in sys.argv: # c... | python | def main():
"""
NAME
qqunf.py
DESCRIPTION
makes qq plot from input data against uniform distribution
SYNTAX
qqunf.py [command line options]
OPTIONS
-h help message
-f FILE, specify file on command line
"""
fmt,plot='svg',0
if '-h' in sys.argv: # c... | [
"def",
"main",
"(",
")",
":",
"fmt",
",",
"plot",
"=",
"'svg'",
",",
"0",
"if",
"'-h'",
"in",
"sys",
".",
"argv",
":",
"# check if help is needed",
"print",
"(",
"main",
".",
"__doc__",
")",
"sys",
".",
"exit",
"(",
")",
"# graceful quit",
"elif",
"'... | NAME
qqunf.py
DESCRIPTION
makes qq plot from input data against uniform distribution
SYNTAX
qqunf.py [command line options]
OPTIONS
-h help message
-f FILE, specify file on command line | [
"NAME",
"qqunf",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/qqunf.py#L10-L68 |
PmagPy/PmagPy | programs/qqplot.py | main | def main():
"""
NAME
qqplot.py
DESCRIPTION
makes qq plot of input data against a Normal distribution.
INPUT FORMAT
takes real numbers in single column
SYNTAX
qqplot.py [-h][-i][-f FILE]
OPTIONS
-f FILE, specify file on command line
-f... | python | def main():
"""
NAME
qqplot.py
DESCRIPTION
makes qq plot of input data against a Normal distribution.
INPUT FORMAT
takes real numbers in single column
SYNTAX
qqplot.py [-h][-i][-f FILE]
OPTIONS
-f FILE, specify file on command line
-f... | [
"def",
"main",
"(",
")",
":",
"fmt",
",",
"plot",
"=",
"'svg'",
",",
"0",
"if",
"'-h'",
"in",
"sys",
".",
"argv",
":",
"# check if help is needed",
"print",
"(",
"main",
".",
"__doc__",
")",
"sys",
".",
"exit",
"(",
")",
"# graceful quit",
"if",
"'-s... | NAME
qqplot.py
DESCRIPTION
makes qq plot of input data against a Normal distribution.
INPUT FORMAT
takes real numbers in single column
SYNTAX
qqplot.py [-h][-i][-f FILE]
OPTIONS
-f FILE, specify file on command line
-fmt [png,svg,jpg,eps] set... | [
"NAME",
"qqplot",
".",
"py"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/qqplot.py#L11-L74 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.InitUI | def InitUI(self):
"""
initialize window
"""
self.main_sizer = wx.BoxSizer(wx.VERTICAL)
if self.grid_type in self.contribution.tables:
dataframe = self.contribution.tables[self.grid_type]
else:
dataframe = None
self.grid_builder = GridBuild... | python | def InitUI(self):
"""
initialize window
"""
self.main_sizer = wx.BoxSizer(wx.VERTICAL)
if self.grid_type in self.contribution.tables:
dataframe = self.contribution.tables[self.grid_type]
else:
dataframe = None
self.grid_builder = GridBuild... | [
"def",
"InitUI",
"(",
"self",
")",
":",
"self",
".",
"main_sizer",
"=",
"wx",
".",
"BoxSizer",
"(",
"wx",
".",
"VERTICAL",
")",
"if",
"self",
".",
"grid_type",
"in",
"self",
".",
"contribution",
".",
"tables",
":",
"dataframe",
"=",
"self",
".",
"con... | initialize window | [
"initialize",
"window"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L89-L291 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.on_key_down | def on_key_down(self, event):
"""
If user does command v,
re-size window in case pasting has changed the content size.
"""
keycode = event.GetKeyCode()
meta_down = event.MetaDown() or event.GetCmdDown()
if keycode == 86 and meta_down:
# treat it as if ... | python | def on_key_down(self, event):
"""
If user does command v,
re-size window in case pasting has changed the content size.
"""
keycode = event.GetKeyCode()
meta_down = event.MetaDown() or event.GetCmdDown()
if keycode == 86 and meta_down:
# treat it as if ... | [
"def",
"on_key_down",
"(",
"self",
",",
"event",
")",
":",
"keycode",
"=",
"event",
".",
"GetKeyCode",
"(",
")",
"meta_down",
"=",
"event",
".",
"MetaDown",
"(",
")",
"or",
"event",
".",
"GetCmdDown",
"(",
")",
"if",
"keycode",
"==",
"86",
"and",
"me... | If user does command v,
re-size window in case pasting has changed the content size. | [
"If",
"user",
"does",
"command",
"v",
"re",
"-",
"size",
"window",
"in",
"case",
"pasting",
"has",
"changed",
"the",
"content",
"size",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L293-L302 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.do_fit | def do_fit(self, event, min_size=None):
"""
Re-fit the window to the size of the content.
"""
#self.grid.ShowScrollbars(wx.SHOW_SB_NEVER, wx.SHOW_SB_NEVER)
if event:
event.Skip()
self.main_sizer.Fit(self)
disp_size = wx.GetDisplaySize()
actual_... | python | def do_fit(self, event, min_size=None):
"""
Re-fit the window to the size of the content.
"""
#self.grid.ShowScrollbars(wx.SHOW_SB_NEVER, wx.SHOW_SB_NEVER)
if event:
event.Skip()
self.main_sizer.Fit(self)
disp_size = wx.GetDisplaySize()
actual_... | [
"def",
"do_fit",
"(",
"self",
",",
"event",
",",
"min_size",
"=",
"None",
")",
":",
"#self.grid.ShowScrollbars(wx.SHOW_SB_NEVER, wx.SHOW_SB_NEVER)",
"if",
"event",
":",
"event",
".",
"Skip",
"(",
")",
"self",
".",
"main_sizer",
".",
"Fit",
"(",
"self",
")",
... | Re-fit the window to the size of the content. | [
"Re",
"-",
"fit",
"the",
"window",
"to",
"the",
"size",
"of",
"the",
"content",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L304-L325 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.toggle_help | def toggle_help(self, event, mode=None):
"""
Show/hide help message on help button click.
"""
# if mode == 'open', show no matter what.
# if mode == 'close', close. otherwise, change state
btn = self.toggle_help_btn
shown = self.help_msg_boxsizer.GetStaticBox().I... | python | def toggle_help(self, event, mode=None):
"""
Show/hide help message on help button click.
"""
# if mode == 'open', show no matter what.
# if mode == 'close', close. otherwise, change state
btn = self.toggle_help_btn
shown = self.help_msg_boxsizer.GetStaticBox().I... | [
"def",
"toggle_help",
"(",
"self",
",",
"event",
",",
"mode",
"=",
"None",
")",
":",
"# if mode == 'open', show no matter what.",
"# if mode == 'close', close. otherwise, change state",
"btn",
"=",
"self",
".",
"toggle_help_btn",
"shown",
"=",
"self",
".",
"help_msg_bo... | Show/hide help message on help button click. | [
"Show",
"/",
"hide",
"help",
"message",
"on",
"help",
"button",
"click",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L327-L350 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.toggle_codes | def toggle_codes(self, event):
"""
Show/hide method code explanation widget on button click
"""
btn = event.GetEventObject()
if btn.Label == 'Show method codes':
self.code_msg_boxsizer.ShowItems(True)
btn.SetLabel('Hide method codes')
else:
... | python | def toggle_codes(self, event):
"""
Show/hide method code explanation widget on button click
"""
btn = event.GetEventObject()
if btn.Label == 'Show method codes':
self.code_msg_boxsizer.ShowItems(True)
btn.SetLabel('Hide method codes')
else:
... | [
"def",
"toggle_codes",
"(",
"self",
",",
"event",
")",
":",
"btn",
"=",
"event",
".",
"GetEventObject",
"(",
")",
"if",
"btn",
".",
"Label",
"==",
"'Show method codes'",
":",
"self",
".",
"code_msg_boxsizer",
".",
"ShowItems",
"(",
"True",
")",
"btn",
".... | Show/hide method code explanation widget on button click | [
"Show",
"/",
"hide",
"method",
"code",
"explanation",
"widget",
"on",
"button",
"click"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L353-L364 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.remove_col_label | def remove_col_label(self, event=None, col=None):
"""
check to see if column is required
if it is not, delete it from grid
"""
if event:
col = event.GetCol()
if not col:
return
label = self.grid.GetColLabelValue(col)
if '**' in labe... | python | def remove_col_label(self, event=None, col=None):
"""
check to see if column is required
if it is not, delete it from grid
"""
if event:
col = event.GetCol()
if not col:
return
label = self.grid.GetColLabelValue(col)
if '**' in labe... | [
"def",
"remove_col_label",
"(",
"self",
",",
"event",
"=",
"None",
",",
"col",
"=",
"None",
")",
":",
"if",
"event",
":",
"col",
"=",
"event",
".",
"GetCol",
"(",
")",
"if",
"not",
"col",
":",
"return",
"label",
"=",
"self",
".",
"grid",
".",
"Ge... | check to see if column is required
if it is not, delete it from grid | [
"check",
"to",
"see",
"if",
"column",
"is",
"required",
"if",
"it",
"is",
"not",
"delete",
"it",
"from",
"grid"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L381-L408 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.on_add_cols | def on_add_cols(self, event):
"""
Show simple dialog that allows user to add a new column name
"""
col_labels = self.grid.col_labels
dia = pw.ChooseOne(self, yes="Add single columns", no="Add groups")
result1 = dia.ShowModal()
if result1 == wx.ID_CANCEL:
... | python | def on_add_cols(self, event):
"""
Show simple dialog that allows user to add a new column name
"""
col_labels = self.grid.col_labels
dia = pw.ChooseOne(self, yes="Add single columns", no="Add groups")
result1 = dia.ShowModal()
if result1 == wx.ID_CANCEL:
... | [
"def",
"on_add_cols",
"(",
"self",
",",
"event",
")",
":",
"col_labels",
"=",
"self",
".",
"grid",
".",
"col_labels",
"dia",
"=",
"pw",
".",
"ChooseOne",
"(",
"self",
",",
"yes",
"=",
"\"Add single columns\"",
",",
"no",
"=",
"\"Add groups\"",
")",
"resu... | Show simple dialog that allows user to add a new column name | [
"Show",
"simple",
"dialog",
"that",
"allows",
"user",
"to",
"add",
"a",
"new",
"column",
"name"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L410-L458 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.add_new_header_groups | def add_new_header_groups(self, groups):
"""
compile list of all headers belonging to all specified groups
eliminate all headers that are already included
add any req'd drop-down menus
return errors
"""
already_present = []
for group in groups:
... | python | def add_new_header_groups(self, groups):
"""
compile list of all headers belonging to all specified groups
eliminate all headers that are already included
add any req'd drop-down menus
return errors
"""
already_present = []
for group in groups:
... | [
"def",
"add_new_header_groups",
"(",
"self",
",",
"groups",
")",
":",
"already_present",
"=",
"[",
"]",
"for",
"group",
"in",
"groups",
":",
"col_names",
"=",
"self",
".",
"dm",
"[",
"self",
".",
"dm",
"[",
"'group'",
"]",
"==",
"group",
"]",
".",
"i... | compile list of all headers belonging to all specified groups
eliminate all headers that are already included
add any req'd drop-down menus
return errors | [
"compile",
"list",
"of",
"all",
"headers",
"belonging",
"to",
"all",
"specified",
"groups",
"eliminate",
"all",
"headers",
"that",
"are",
"already",
"included",
"add",
"any",
"req",
"d",
"drop",
"-",
"down",
"menus",
"return",
"errors"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L460-L488 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.add_new_grid_headers | def add_new_grid_headers(self, new_headers):
"""
Add in all user-added headers.
If those new headers depend on other headers,
add the other headers too.
"""
already_present = []
for name in new_headers:
if name:
if name not in self.grid... | python | def add_new_grid_headers(self, new_headers):
"""
Add in all user-added headers.
If those new headers depend on other headers,
add the other headers too.
"""
already_present = []
for name in new_headers:
if name:
if name not in self.grid... | [
"def",
"add_new_grid_headers",
"(",
"self",
",",
"new_headers",
")",
":",
"already_present",
"=",
"[",
"]",
"for",
"name",
"in",
"new_headers",
":",
"if",
"name",
":",
"if",
"name",
"not",
"in",
"self",
".",
"grid",
".",
"col_labels",
":",
"col_number",
... | Add in all user-added headers.
If those new headers depend on other headers,
add the other headers too. | [
"Add",
"in",
"all",
"user",
"-",
"added",
"headers",
".",
"If",
"those",
"new",
"headers",
"depend",
"on",
"other",
"headers",
"add",
"the",
"other",
"headers",
"too",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L490-L517 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.on_add_rows | def on_add_rows(self, event):
"""
add rows to grid
"""
num_rows = self.rows_spin_ctrl.GetValue()
#last_row = self.grid.GetNumberRows()
for row in range(num_rows):
self.grid.add_row()
#if not self.grid.changes:
# self.grid.changes = s... | python | def on_add_rows(self, event):
"""
add rows to grid
"""
num_rows = self.rows_spin_ctrl.GetValue()
#last_row = self.grid.GetNumberRows()
for row in range(num_rows):
self.grid.add_row()
#if not self.grid.changes:
# self.grid.changes = s... | [
"def",
"on_add_rows",
"(",
"self",
",",
"event",
")",
":",
"num_rows",
"=",
"self",
".",
"rows_spin_ctrl",
".",
"GetValue",
"(",
")",
"#last_row = self.grid.GetNumberRows()",
"for",
"row",
"in",
"range",
"(",
"num_rows",
")",
":",
"self",
".",
"grid",
".",
... | add rows to grid | [
"add",
"rows",
"to",
"grid"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L545-L557 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.on_remove_row | def on_remove_row(self, event, row_num=-1):
"""
Remove specified grid row.
If no row number is given, remove the last row.
"""
text = "Are you sure? If you select delete you won't be able to retrieve these rows..."
dia = pw.ChooseOne(self, "Yes, delete rows", "Leave rows... | python | def on_remove_row(self, event, row_num=-1):
"""
Remove specified grid row.
If no row number is given, remove the last row.
"""
text = "Are you sure? If you select delete you won't be able to retrieve these rows..."
dia = pw.ChooseOne(self, "Yes, delete rows", "Leave rows... | [
"def",
"on_remove_row",
"(",
"self",
",",
"event",
",",
"row_num",
"=",
"-",
"1",
")",
":",
"text",
"=",
"\"Are you sure? If you select delete you won't be able to retrieve these rows...\"",
"dia",
"=",
"pw",
".",
"ChooseOne",
"(",
"self",
",",
"\"Yes, delete rows\""... | Remove specified grid row.
If no row number is given, remove the last row. | [
"Remove",
"specified",
"grid",
"row",
".",
"If",
"no",
"row",
"number",
"is",
"given",
"remove",
"the",
"last",
"row",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L559-L599 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.onLeftClickLabel | def onLeftClickLabel(self, event):
"""
When user clicks on a grid label,
determine if it is a row label or a col label.
Pass along the event to the appropriate function.
(It will either highlight a column for editing all values,
or highlight a row for deletion).
"... | python | def onLeftClickLabel(self, event):
"""
When user clicks on a grid label,
determine if it is a row label or a col label.
Pass along the event to the appropriate function.
(It will either highlight a column for editing all values,
or highlight a row for deletion).
"... | [
"def",
"onLeftClickLabel",
"(",
"self",
",",
"event",
")",
":",
"if",
"event",
".",
"Col",
"==",
"-",
"1",
"and",
"event",
".",
"Row",
"==",
"-",
"1",
":",
"pass",
"if",
"event",
".",
"Row",
"<",
"0",
":",
"if",
"self",
".",
"remove_cols_mode",
"... | When user clicks on a grid label,
determine if it is a row label or a col label.
Pass along the event to the appropriate function.
(It will either highlight a column for editing all values,
or highlight a row for deletion). | [
"When",
"user",
"clicks",
"on",
"a",
"grid",
"label",
"determine",
"if",
"it",
"is",
"a",
"row",
"label",
"or",
"a",
"col",
"label",
".",
"Pass",
"along",
"the",
"event",
"to",
"the",
"appropriate",
"function",
".",
"(",
"It",
"will",
"either",
"highli... | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L651-L668 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.onImport | def onImport(self, event):
"""
Import a MagIC-format file
"""
if self.grid.changes:
print("-W- Your changes will be overwritten...")
wind = pw.ChooseOne(self, "Import file anyway", "Save grid first",
"-W- Your grid has unsaved chang... | python | def onImport(self, event):
"""
Import a MagIC-format file
"""
if self.grid.changes:
print("-W- Your changes will be overwritten...")
wind = pw.ChooseOne(self, "Import file anyway", "Save grid first",
"-W- Your grid has unsaved chang... | [
"def",
"onImport",
"(",
"self",
",",
"event",
")",
":",
"if",
"self",
".",
"grid",
".",
"changes",
":",
"print",
"(",
"\"-W- Your changes will be overwritten...\"",
")",
"wind",
"=",
"pw",
".",
"ChooseOne",
"(",
"self",
",",
"\"Import file anyway\"",
",",
"\... | Import a MagIC-format file | [
"Import",
"a",
"MagIC",
"-",
"format",
"file"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L672-L741 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.onCancelButton | def onCancelButton(self, event):
"""
Quit grid with warning if unsaved changes present
"""
if self.grid.changes:
dlg1 = wx.MessageDialog(self, caption="Message:",
message="Are you sure you want to exit this grid?\nYour changes will not be s... | python | def onCancelButton(self, event):
"""
Quit grid with warning if unsaved changes present
"""
if self.grid.changes:
dlg1 = wx.MessageDialog(self, caption="Message:",
message="Are you sure you want to exit this grid?\nYour changes will not be s... | [
"def",
"onCancelButton",
"(",
"self",
",",
"event",
")",
":",
"if",
"self",
".",
"grid",
".",
"changes",
":",
"dlg1",
"=",
"wx",
".",
"MessageDialog",
"(",
"self",
",",
"caption",
"=",
"\"Message:\"",
",",
"message",
"=",
"\"Are you sure you want to exit thi... | Quit grid with warning if unsaved changes present | [
"Quit",
"grid",
"with",
"warning",
"if",
"unsaved",
"changes",
"present"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L743-L759 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.onSave | def onSave(self, event, alert=False, destroy=True):
"""
Save grid data
"""
# tidy up drop_down menu
if self.drop_down_menu:
self.drop_down_menu.clean_up()
# then save actual data
self.grid_builder.save_grid_data()
if not event and not alert:
... | python | def onSave(self, event, alert=False, destroy=True):
"""
Save grid data
"""
# tidy up drop_down menu
if self.drop_down_menu:
self.drop_down_menu.clean_up()
# then save actual data
self.grid_builder.save_grid_data()
if not event and not alert:
... | [
"def",
"onSave",
"(",
"self",
",",
"event",
",",
"alert",
"=",
"False",
",",
"destroy",
"=",
"True",
")",
":",
"# tidy up drop_down menu",
"if",
"self",
".",
"drop_down_menu",
":",
"self",
".",
"drop_down_menu",
".",
"clean_up",
"(",
")",
"# then save actual... | Save grid data | [
"Save",
"grid",
"data"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L762-L777 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.onDragSelection | def onDragSelection(self, event):
"""
Set self.df_slice based on user's selection
"""
if self.grid.GetSelectionBlockTopLeft():
#top_left = self.grid.GetSelectionBlockTopLeft()
#bottom_right = self.grid.GetSelectionBlockBottomRight()
# awkward hack to f... | python | def onDragSelection(self, event):
"""
Set self.df_slice based on user's selection
"""
if self.grid.GetSelectionBlockTopLeft():
#top_left = self.grid.GetSelectionBlockTopLeft()
#bottom_right = self.grid.GetSelectionBlockBottomRight()
# awkward hack to f... | [
"def",
"onDragSelection",
"(",
"self",
",",
"event",
")",
":",
"if",
"self",
".",
"grid",
".",
"GetSelectionBlockTopLeft",
"(",
")",
":",
"#top_left = self.grid.GetSelectionBlockTopLeft()",
"#bottom_right = self.grid.GetSelectionBlockBottomRight()",
"# awkward hack to fix wxPho... | Set self.df_slice based on user's selection | [
"Set",
"self",
".",
"df_slice",
"based",
"on",
"user",
"s",
"selection"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L829-L849 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.onKey | def onKey(self, event):
"""
Copy selection if control down and 'c'
"""
if event.CmdDown() or event.ControlDown():
if event.GetKeyCode() == 67:
self.onCopySelection(None) | python | def onKey(self, event):
"""
Copy selection if control down and 'c'
"""
if event.CmdDown() or event.ControlDown():
if event.GetKeyCode() == 67:
self.onCopySelection(None) | [
"def",
"onKey",
"(",
"self",
",",
"event",
")",
":",
"if",
"event",
".",
"CmdDown",
"(",
")",
"or",
"event",
".",
"ControlDown",
"(",
")",
":",
"if",
"event",
".",
"GetKeyCode",
"(",
")",
"==",
"67",
":",
"self",
".",
"onCopySelection",
"(",
"None"... | Copy selection if control down and 'c' | [
"Copy",
"selection",
"if",
"control",
"down",
"and",
"c"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L859-L865 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.onSelectAll | def onSelectAll(self, event):
"""
Selects full grid and copies it to the Clipboard
"""
# do clean up here!!!
if self.drop_down_menu:
self.drop_down_menu.clean_up()
# save all grid data
self.grid_builder.save_grid_data()
df = self.contribution.t... | python | def onSelectAll(self, event):
"""
Selects full grid and copies it to the Clipboard
"""
# do clean up here!!!
if self.drop_down_menu:
self.drop_down_menu.clean_up()
# save all grid data
self.grid_builder.save_grid_data()
df = self.contribution.t... | [
"def",
"onSelectAll",
"(",
"self",
",",
"event",
")",
":",
"# do clean up here!!!",
"if",
"self",
".",
"drop_down_menu",
":",
"self",
".",
"drop_down_menu",
".",
"clean_up",
"(",
")",
"# save all grid data",
"self",
".",
"grid_builder",
".",
"save_grid_data",
"(... | Selects full grid and copies it to the Clipboard | [
"Selects",
"full",
"grid",
"and",
"copies",
"it",
"to",
"the",
"Clipboard"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L867-L881 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridFrame.onCopySelection | def onCopySelection(self, event):
"""
Copies self.df_slice to the Clipboard if slice exists
"""
if self.df_slice is not None:
pd.DataFrame.to_clipboard(self.df_slice, header=False, index=False)
self.grid.ClearSelection()
self.df_slice = None
... | python | def onCopySelection(self, event):
"""
Copies self.df_slice to the Clipboard if slice exists
"""
if self.df_slice is not None:
pd.DataFrame.to_clipboard(self.df_slice, header=False, index=False)
self.grid.ClearSelection()
self.df_slice = None
... | [
"def",
"onCopySelection",
"(",
"self",
",",
"event",
")",
":",
"if",
"self",
".",
"df_slice",
"is",
"not",
"None",
":",
"pd",
".",
"DataFrame",
".",
"to_clipboard",
"(",
"self",
".",
"df_slice",
",",
"header",
"=",
"False",
",",
"index",
"=",
"False",
... | Copies self.df_slice to the Clipboard if slice exists | [
"Copies",
"self",
".",
"df_slice",
"to",
"the",
"Clipboard",
"if",
"slice",
"exists"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L884-L894 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridBuilder.make_grid | def make_grid(self):
"""
return grid
"""
changes = None
# if there is a MagicDataFrame, extract data from it
if isinstance(self.magic_dataframe, cb.MagicDataFrame):
# get columns and reorder slightly
col_labels = list(self.magic_dataframe.df.column... | python | def make_grid(self):
"""
return grid
"""
changes = None
# if there is a MagicDataFrame, extract data from it
if isinstance(self.magic_dataframe, cb.MagicDataFrame):
# get columns and reorder slightly
col_labels = list(self.magic_dataframe.df.column... | [
"def",
"make_grid",
"(",
"self",
")",
":",
"changes",
"=",
"None",
"# if there is a MagicDataFrame, extract data from it",
"if",
"isinstance",
"(",
"self",
".",
"magic_dataframe",
",",
"cb",
".",
"MagicDataFrame",
")",
":",
"# get columns and reorder slightly",
"col_lab... | return grid | [
"return",
"grid"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L948-L1028 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridBuilder.add_age_defaults | def add_age_defaults(self):
"""
Add columns as needed:
age, age_unit, specimen, sample, site, location.
"""
if isinstance(self.magic_dataframe, cb.MagicDataFrame):
for col in ['age', 'age_unit']:
if col not in self.grid.col_labels:
... | python | def add_age_defaults(self):
"""
Add columns as needed:
age, age_unit, specimen, sample, site, location.
"""
if isinstance(self.magic_dataframe, cb.MagicDataFrame):
for col in ['age', 'age_unit']:
if col not in self.grid.col_labels:
... | [
"def",
"add_age_defaults",
"(",
"self",
")",
":",
"if",
"isinstance",
"(",
"self",
".",
"magic_dataframe",
",",
"cb",
".",
"MagicDataFrame",
")",
":",
"for",
"col",
"in",
"[",
"'age'",
",",
"'age_unit'",
"]",
":",
"if",
"col",
"not",
"in",
"self",
".",... | Add columns as needed:
age, age_unit, specimen, sample, site, location. | [
"Add",
"columns",
"as",
"needed",
":",
"age",
"age_unit",
"specimen",
"sample",
"site",
"location",
"."
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L1054-L1066 |
PmagPy/PmagPy | dialogs/grid_frame3.py | GridBuilder.current_grid_empty | def current_grid_empty(self):
"""
Check to see if grid is empty except for default values
"""
empty = True
# df IS empty if there are no rows
if not any(self.magic_dataframe.df.index):
empty = True
# df is NOT empty if there are at least two rows
... | python | def current_grid_empty(self):
"""
Check to see if grid is empty except for default values
"""
empty = True
# df IS empty if there are no rows
if not any(self.magic_dataframe.df.index):
empty = True
# df is NOT empty if there are at least two rows
... | [
"def",
"current_grid_empty",
"(",
"self",
")",
":",
"empty",
"=",
"True",
"# df IS empty if there are no rows",
"if",
"not",
"any",
"(",
"self",
".",
"magic_dataframe",
".",
"df",
".",
"index",
")",
":",
"empty",
"=",
"True",
"# df is NOT empty if there are at lea... | Check to see if grid is empty except for default values | [
"Check",
"to",
"see",
"if",
"grid",
"is",
"empty",
"except",
"for",
"default",
"values"
] | train | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/grid_frame3.py#L1068-L1091 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.