repo stringlengths 7 54 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 20 28.4k | docstring stringlengths 1 46.3k | docstring_tokens listlengths 1 1.66k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value | summary stringlengths 4 350 | obf_code stringlengths 7.85k 764k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.write_age_file | def write_age_file(self):
"""
Write er_ages.txt based on updated ErMagicBuilder data object
"""
if not self.write_ages:
print('-I- No age data available to write')
return
first_headers = self.first_age_headers
actual_headers = sorted(self.headers['... | python | def write_age_file(self):
"""
Write er_ages.txt based on updated ErMagicBuilder data object
"""
if not self.write_ages:
print('-I- No age data available to write')
return
first_headers = self.first_age_headers
actual_headers = sorted(self.headers['... | [
"def",
"write_age_file",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"write_ages",
":",
"print",
"(",
"'-I- No age data available to write'",
")",
"return",
"first_headers",
"=",
"self",
".",
"first_age_headers",
"actual_headers",
"=",
"sorted",
"(",
"self",
... | Write er_ages.txt based on updated ErMagicBuilder data object | [
"Write",
"er_ages",
".",
"txt",
"based",
"on",
"updated",
"ErMagicBuilder",
"data",
"object"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1113-L1189 | train | Write er_ages. txt based on updated ErMagicBuilder data object | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.validate_data | def validate_data(self):
"""
Validate specimen, sample, site, and location data.
"""
warnings = {}
spec_warnings, samp_warnings, site_warnings, loc_warnings = {}, {}, {}, {}
if self.specimens:
spec_warnings = self.validate_items(self.specimens, 'specimen')
... | python | def validate_data(self):
"""
Validate specimen, sample, site, and location data.
"""
warnings = {}
spec_warnings, samp_warnings, site_warnings, loc_warnings = {}, {}, {}, {}
if self.specimens:
spec_warnings = self.validate_items(self.specimens, 'specimen')
... | [
"def",
"validate_data",
"(",
"self",
")",
":",
"warnings",
"=",
"{",
"}",
"spec_warnings",
",",
"samp_warnings",
",",
"site_warnings",
",",
"loc_warnings",
"=",
"{",
"}",
",",
"{",
"}",
",",
"{",
"}",
",",
"{",
"}",
"if",
"self",
".",
"specimens",
":... | Validate specimen, sample, site, and location data. | [
"Validate",
"specimen",
"sample",
"site",
"and",
"location",
"data",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1193-L1207 | train | Validate specimen sample site and location data. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.validate_items | def validate_items(self, item_list, item_type):
"""
Go through a list Pmag_objects and check for:
parent errors,
children errors,
type errors.
Return a dictionary of exceptions in this format:
{sample1: {'parent': [warning1, warning2, warning3], 'child': [warning1... | python | def validate_items(self, item_list, item_type):
"""
Go through a list Pmag_objects and check for:
parent errors,
children errors,
type errors.
Return a dictionary of exceptions in this format:
{sample1: {'parent': [warning1, warning2, warning3], 'child': [warning1... | [
"def",
"validate_items",
"(",
"self",
",",
"item_list",
",",
"item_type",
")",
":",
"def",
"append_or_create_dict_item",
"(",
"warning_type",
",",
"dictionary",
",",
"key",
",",
"value",
")",
":",
"\"\"\"\n Add to dictionary with this format:\n {key1... | Go through a list Pmag_objects and check for:
parent errors,
children errors,
type errors.
Return a dictionary of exceptions in this format:
{sample1: {'parent': [warning1, warning2, warning3], 'child': [warning1, warning2]},
sample2: {'child': [warning1], 'type': [warni... | [
"Go",
"through",
"a",
"list",
"Pmag_objects",
"and",
"check",
"for",
":",
"parent",
"errors",
"children",
"errors",
"type",
"errors",
".",
"Return",
"a",
"dictionary",
"of",
"exceptions",
"in",
"this",
"format",
":",
"{",
"sample1",
":",
"{",
"parent",
":"... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1210-L1302 | train | Validate a list of items and return a dictionary of errors. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | pmagpy/builder2.py | ErMagicBuilder.get_min_max_lat_lon | def get_min_max_lat_lon(self, locations):
"""
Take a list of locations and return a dictionary with:
location1:
'location_begin_lat', 'location_begin_lon',
'location_end_lat', 'location_end_lon'.
and so on.
"""
d = {}
for location in locations:
... | python | def get_min_max_lat_lon(self, locations):
"""
Take a list of locations and return a dictionary with:
location1:
'location_begin_lat', 'location_begin_lon',
'location_end_lat', 'location_end_lon'.
and so on.
"""
d = {}
for location in locations:
... | [
"def",
"get_min_max_lat_lon",
"(",
"self",
",",
"locations",
")",
":",
"d",
"=",
"{",
"}",
"for",
"location",
"in",
"locations",
":",
"sites",
"=",
"location",
".",
"sites",
"max_lat",
",",
"min_lat",
"=",
"''",
",",
"''",
"max_lon",
",",
"min_lon",
"=... | Take a list of locations and return a dictionary with:
location1:
'location_begin_lat', 'location_begin_lon',
'location_end_lat', 'location_end_lon'.
and so on. | [
"Take",
"a",
"list",
"of",
"locations",
"and",
"return",
"a",
"dictionary",
"with",
":",
"location1",
":",
"location_begin_lat",
"location_begin_lon",
"location_end_lat",
"location_end_lon",
".",
"and",
"so",
"on",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1391-L1426 | train | Take a list of locations and return a dictionary with the keys location_begin_lat location_begin_lon location_end_lat and location_end_lon. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | pmagpy/builder2.py | Specimen.set_parent | def set_parent(self, new_samp):
"""
Set self.sample as either an empty string, or with a new Sample.
"""
self.sample = new_samp
if new_samp:
if not isinstance(new_samp, Sample):
raise Exception
self.propagate_data()
return new_samp | python | def set_parent(self, new_samp):
"""
Set self.sample as either an empty string, or with a new Sample.
"""
self.sample = new_samp
if new_samp:
if not isinstance(new_samp, Sample):
raise Exception
self.propagate_data()
return new_samp | [
"def",
"set_parent",
"(",
"self",
",",
"new_samp",
")",
":",
"self",
".",
"sample",
"=",
"new_samp",
"if",
"new_samp",
":",
"if",
"not",
"isinstance",
"(",
"new_samp",
",",
"Sample",
")",
":",
"raise",
"Exception",
"self",
".",
"propagate_data",
"(",
")"... | Set self.sample as either an empty string, or with a new Sample. | [
"Set",
"self",
".",
"sample",
"as",
"either",
"an",
"empty",
"string",
"or",
"with",
"a",
"new",
"Sample",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1551-L1560 | train | Set self. sample as either an empty string or a new Sample. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | pmagpy/builder2.py | Sample.set_parent | def set_parent(self, new_site):
"""
Set self.site as either an empty string, or with a new Site.
"""
if new_site:
if not isinstance(new_site, Site):
raise Exception
self.site = new_site
self.propagate_data()
return new_site | python | def set_parent(self, new_site):
"""
Set self.site as either an empty string, or with a new Site.
"""
if new_site:
if not isinstance(new_site, Site):
raise Exception
self.site = new_site
self.propagate_data()
return new_site | [
"def",
"set_parent",
"(",
"self",
",",
"new_site",
")",
":",
"if",
"new_site",
":",
"if",
"not",
"isinstance",
"(",
"new_site",
",",
"Site",
")",
":",
"raise",
"Exception",
"self",
".",
"site",
"=",
"new_site",
"self",
".",
"propagate_data",
"(",
")",
... | Set self.site as either an empty string, or with a new Site. | [
"Set",
"self",
".",
"site",
"as",
"either",
"an",
"empty",
"string",
"or",
"with",
"a",
"new",
"Site",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1600-L1609 | train | Set self. site as either an empty string or a new Site. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | pmagpy/builder2.py | Site.change_site | def change_site(self, new_name, new_location=None, new_er_data=None,
new_pmag_data=None, replace_data=False):
"""
Update a site's name, location, er_data, and pmag_data.
By default, new data will be added in to pre-existing data, overwriting existing values.
If replac... | python | def change_site(self, new_name, new_location=None, new_er_data=None,
new_pmag_data=None, replace_data=False):
"""
Update a site's name, location, er_data, and pmag_data.
By default, new data will be added in to pre-existing data, overwriting existing values.
If replac... | [
"def",
"change_site",
"(",
"self",
",",
"new_name",
",",
"new_location",
"=",
"None",
",",
"new_er_data",
"=",
"None",
",",
"new_pmag_data",
"=",
"None",
",",
"replace_data",
"=",
"False",
")",
":",
"self",
".",
"name",
"=",
"new_name",
"if",
"new_location... | Update a site's name, location, er_data, and pmag_data.
By default, new data will be added in to pre-existing data, overwriting existing values.
If replace_data is True, the new data dictionary will simply take the place of the existing dict. | [
"Update",
"a",
"site",
"s",
"name",
"location",
"er_data",
"and",
"pmag_data",
".",
"By",
"default",
"new",
"data",
"will",
"be",
"added",
"in",
"to",
"pre",
"-",
"existing",
"data",
"overwriting",
"existing",
"values",
".",
"If",
"replace_data",
"is",
"Tr... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/builder2.py#L1666-L1676 | train | Change the name location er_data and pmag_data of a specific site. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/thellier_magic2.py | main | def main():
"""
NAME
thellier_magic.py
DESCRIPTION
plots Thellier-Thellier, allowing interactive setting of bounds
and customizing of selection criteria. Saves and reads interpretations
from a pmag_specimen formatted table, default: thellier_specimens.txt
SYNTAX
... | python | def main():
"""
NAME
thellier_magic.py
DESCRIPTION
plots Thellier-Thellier, allowing interactive setting of bounds
and customizing of selection criteria. Saves and reads interpretations
from a pmag_specimen formatted table, default: thellier_specimens.txt
SYNTAX
... | [
"def",
"main",
"(",
")",
":",
"#",
"# initializations",
"#",
"meas_file",
",",
"critout",
",",
"inspec",
"=",
"\"magic_measurements.txt\"",
",",
"\"\"",
",",
"\"thellier_specimens.txt\"",
"first",
"=",
"1",
"inlt",
"=",
"0",
"version_num",
"=",
"pmag",
".",
... | NAME
thellier_magic.py
DESCRIPTION
plots Thellier-Thellier, allowing interactive setting of bounds
and customizing of selection criteria. Saves and reads interpretations
from a pmag_specimen formatted table, default: thellier_specimens.txt
SYNTAX
thellier_magic.py [com... | [
"NAME",
"thellier_magic",
".",
"py"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/thellier_magic2.py#L21-L725 | train | This function is the main function for the thellier_magic. py script. It will take a magic table and plot the values of the current specimen and specimen and set the values of the specimen s interpretations and values for the current specimen s interpretations. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/deprecated/nrm_specimens_magic.py | main | def main():
"""
NAME
nrm_specimens_magic.py
Note: this program has been deprecated and is not maintained
DESCRIPTION
converts NRM data in a measurements type file to
geographic and tilt corrected data in a specimens type file
SYNTAX
... | python | def main():
"""
NAME
nrm_specimens_magic.py
Note: this program has been deprecated and is not maintained
DESCRIPTION
converts NRM data in a measurements type file to
geographic and tilt corrected data in a specimens type file
SYNTAX
... | [
"def",
"main",
"(",
")",
":",
"#",
"# define some variables",
"#",
"beg",
",",
"end",
",",
"pole",
",",
"geo",
",",
"tilt",
",",
"askave",
",",
"save",
"=",
"0",
",",
"0",
",",
"[",
"]",
",",
"0",
",",
"0",
",",
"0",
",",
"0",
"samp_file",
... | NAME
nrm_specimens_magic.py
Note: this program has been deprecated and is not maintained
DESCRIPTION
converts NRM data in a measurements type file to
geographic and tilt corrected data in a specimens type file
SYNTAX
nrm_specimens_magic.py [-h... | [
"NAME",
"nrm_specimens_magic",
".",
"py",
"Note",
":",
"this",
"program",
"has",
"been",
"deprecated",
"and",
"is",
"not",
"maintained"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/deprecated/nrm_specimens_magic.py#L10-L154 | train | This function is the main entry point for the nrm_specimens_magic. py program. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | dialogs/thellier_interpreter.py | thellier_auto_interpreter.run_interpreter | def run_interpreter(self):
"""
Run thellier_auto_interpreter
"""
import random
import copy
start_time = time.time()
#------------------------------------------------
# Clean work directory
#------------------------------------------------
... | python | def run_interpreter(self):
"""
Run thellier_auto_interpreter
"""
import random
import copy
start_time = time.time()
#------------------------------------------------
# Clean work directory
#------------------------------------------------
... | [
"def",
"run_interpreter",
"(",
"self",
")",
":",
"import",
"random",
"import",
"copy",
"start_time",
"=",
"time",
".",
"time",
"(",
")",
"#------------------------------------------------",
"# Clean work directory",
"#------------------------------------------------",
"# self... | Run thellier_auto_interpreter | [
"Run",
"thellier_auto_interpreter"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/thellier_interpreter.py#L54-L583 | train | Runs the interpreter and returns the unique identifier for the interpreter. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | dialogs/thellier_interpreter.py | thellier_auto_interpreter.find_close_value | def find_close_value(self, LIST, value):
'''
take a LIST and find the nearest value in LIST to 'value'
'''
diff = inf
for a in LIST:
if abs(value - a) < diff:
diff = abs(value - a)
result = a
return(result) | python | def find_close_value(self, LIST, value):
'''
take a LIST and find the nearest value in LIST to 'value'
'''
diff = inf
for a in LIST:
if abs(value - a) < diff:
diff = abs(value - a)
result = a
return(result) | [
"def",
"find_close_value",
"(",
"self",
",",
"LIST",
",",
"value",
")",
":",
"diff",
"=",
"inf",
"for",
"a",
"in",
"LIST",
":",
"if",
"abs",
"(",
"value",
"-",
"a",
")",
"<",
"diff",
":",
"diff",
"=",
"abs",
"(",
"value",
"-",
"a",
")",
"result... | take a LIST and find the nearest value in LIST to 'value' | [
"take",
"a",
"LIST",
"and",
"find",
"the",
"nearest",
"value",
"in",
"LIST",
"to",
"value"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/thellier_interpreter.py#L1000-L1009 | train | take a LIST and find the nearest value in LIST to value | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | dialogs/thellier_interpreter.py | thellier_auto_interpreter.find_sample_min_std | def find_sample_min_std(self, Intensities):
'''
find the best interpretation with the minimum stratard deviation (in units of percent % !)
'''
Best_array = []
best_array_std_perc = inf
Best_array_tmp = []
Best_interpretations = {}
Best_interpretations_tmp... | python | def find_sample_min_std(self, Intensities):
'''
find the best interpretation with the minimum stratard deviation (in units of percent % !)
'''
Best_array = []
best_array_std_perc = inf
Best_array_tmp = []
Best_interpretations = {}
Best_interpretations_tmp... | [
"def",
"find_sample_min_std",
"(",
"self",
",",
"Intensities",
")",
":",
"Best_array",
"=",
"[",
"]",
"best_array_std_perc",
"=",
"inf",
"Best_array_tmp",
"=",
"[",
"]",
"Best_interpretations",
"=",
"{",
"}",
"Best_interpretations_tmp",
"=",
"{",
"}",
"for",
"... | find the best interpretation with the minimum stratard deviation (in units of percent % !) | [
"find",
"the",
"best",
"interpretation",
"with",
"the",
"minimum",
"stratard",
"deviation",
"(",
"in",
"units",
"of",
"percent",
"%",
"!",
")"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/thellier_interpreter.py#L1011-L1041 | train | find the best interpretation with the minimum stratard deviation | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | dialogs/thellier_interpreter.py | thellier_auto_interpreter.thellier_interpreter_pars_calc | def thellier_interpreter_pars_calc(self, Grade_As):
'''
calcualte sample or site STDEV-OPT paleointensities
and statistics
Grade_As={}
'''
thellier_interpreter_pars = {}
thellier_interpreter_pars['stdev-opt'] = {}
# thellier_interpreter_pars['stdev-opt'][... | python | def thellier_interpreter_pars_calc(self, Grade_As):
'''
calcualte sample or site STDEV-OPT paleointensities
and statistics
Grade_As={}
'''
thellier_interpreter_pars = {}
thellier_interpreter_pars['stdev-opt'] = {}
# thellier_interpreter_pars['stdev-opt'][... | [
"def",
"thellier_interpreter_pars_calc",
"(",
"self",
",",
"Grade_As",
")",
":",
"thellier_interpreter_pars",
"=",
"{",
"}",
"thellier_interpreter_pars",
"[",
"'stdev-opt'",
"]",
"=",
"{",
"}",
"# thellier_interpreter_pars['stdev-opt']['B']=",
"# thellier_interpreter_pars['st... | calcualte sample or site STDEV-OPT paleointensities
and statistics
Grade_As={} | [
"calcualte",
"sample",
"or",
"site",
"STDEV",
"-",
"OPT",
"paleointensities",
"and",
"statistics",
"Grade_As",
"=",
"{}"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/thellier_interpreter.py#L1158-L1251 | train | Calculates the Thellier Interpreter Parameters for the given site or sample. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | dialogs/thellier_interpreter.py | thellier_auto_interpreter.thellier_interpreter_BS_pars_calc | def thellier_interpreter_BS_pars_calc(self, Grade_As):
'''
calcualte sample or site bootstrap paleointensities
and statistics
Grade_As={}
'''
thellier_interpreter_pars = {}
thellier_interpreter_pars['fail_criteria'] = []
thellier_interpreter_pars['pass_or_... | python | def thellier_interpreter_BS_pars_calc(self, Grade_As):
'''
calcualte sample or site bootstrap paleointensities
and statistics
Grade_As={}
'''
thellier_interpreter_pars = {}
thellier_interpreter_pars['fail_criteria'] = []
thellier_interpreter_pars['pass_or_... | [
"def",
"thellier_interpreter_BS_pars_calc",
"(",
"self",
",",
"Grade_As",
")",
":",
"thellier_interpreter_pars",
"=",
"{",
"}",
"thellier_interpreter_pars",
"[",
"'fail_criteria'",
"]",
"=",
"[",
"]",
"thellier_interpreter_pars",
"[",
"'pass_or_fail'",
"]",
"=",
"'pas... | calcualte sample or site bootstrap paleointensities
and statistics
Grade_As={} | [
"calcualte",
"sample",
"or",
"site",
"bootstrap",
"paleointensities",
"and",
"statistics",
"Grade_As",
"=",
"{}"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/thellier_interpreter.py#L1253-L1314 | train | calcualte sample or site bootstrap paleointensities and statistics | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | pmagpy/mapping/map_magic.py | mapping | def mapping(dictionary, mapping):
"""
takes in a dictionary and a mapping which contains new key names,
and returns a new dictionary with the updated key names, i.e.:
dictionary = {'a': 1, 'b': 2, 'c': 3}
mapping = {'a': 'aa', 'c': 'cc'}
mapped_dictionary = mapping(dictionary, mapping)
mappe... | python | def mapping(dictionary, mapping):
"""
takes in a dictionary and a mapping which contains new key names,
and returns a new dictionary with the updated key names, i.e.:
dictionary = {'a': 1, 'b': 2, 'c': 3}
mapping = {'a': 'aa', 'c': 'cc'}
mapped_dictionary = mapping(dictionary, mapping)
mappe... | [
"def",
"mapping",
"(",
"dictionary",
",",
"mapping",
")",
":",
"mapped_dictionary",
"=",
"{",
"}",
"for",
"key",
",",
"value",
"in",
"dictionary",
".",
"items",
"(",
")",
":",
"if",
"key",
"in",
"list",
"(",
"mapping",
".",
"keys",
"(",
")",
")",
"... | takes in a dictionary and a mapping which contains new key names,
and returns a new dictionary with the updated key names, i.e.:
dictionary = {'a': 1, 'b': 2, 'c': 3}
mapping = {'a': 'aa', 'c': 'cc'}
mapped_dictionary = mapping(dictionary, mapping)
mapped_dictionary = {'aa': 1, b, 2, 'cc': 3} | [
"takes",
"in",
"a",
"dictionary",
"and",
"a",
"mapping",
"which",
"contains",
"new",
"key",
"names",
"and",
"returns",
"a",
"new",
"dictionary",
"with",
"the",
"updated",
"key",
"names",
"i",
".",
"e",
".",
":",
"dictionary",
"=",
"{",
"a",
":",
"1",
... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/mapping/map_magic.py#L13-L69 | train | Takes in a dictionary and a mapping which contains new key names and returns a new dictionary with the updated key names. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | pmagpy/mapping/map_magic.py | cache_mappings | def cache_mappings(file_path):
"""
Make a full mapping for 2 --> 3 columns.
Output the mapping to json in the specified file_path.
Note: This file is currently called maps.py,
full path is PmagPy/pmagpy/mapping/maps.py.
Parameters
----------
file_path : string with full file path to dum... | python | def cache_mappings(file_path):
"""
Make a full mapping for 2 --> 3 columns.
Output the mapping to json in the specified file_path.
Note: This file is currently called maps.py,
full path is PmagPy/pmagpy/mapping/maps.py.
Parameters
----------
file_path : string with full file path to dum... | [
"def",
"cache_mappings",
"(",
"file_path",
")",
":",
"def",
"get_2_to_3",
"(",
"dm_type",
",",
"dm",
")",
":",
"table_names3_2_table_names2",
"=",
"{",
"'measurements'",
":",
"[",
"'magic_measurements'",
"]",
",",
"'locations'",
":",
"[",
"'er_locations'",
"]",
... | Make a full mapping for 2 --> 3 columns.
Output the mapping to json in the specified file_path.
Note: This file is currently called maps.py,
full path is PmagPy/pmagpy/mapping/maps.py.
Parameters
----------
file_path : string with full file path to dump mapping json.
Returns
---------
... | [
"Make",
"a",
"full",
"mapping",
"for",
"2",
"--",
">",
"3",
"columns",
".",
"Output",
"the",
"mapping",
"to",
"json",
"in",
"the",
"specified",
"file_path",
".",
"Note",
":",
"This",
"file",
"is",
"currently",
"called",
"maps",
".",
"py",
"full",
"path... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/mapping/map_magic.py#L85-L146 | train | This function creates a full mapping for 2. 5 columns. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | pmagpy/mapping/map_magic.py | get_thellier_gui_meas_mapping | def get_thellier_gui_meas_mapping(input_df, output=2):
"""
Get the appropriate mapping for translating measurements in Thellier GUI.
This requires special handling for treat_step_num/measurement/measurement_number.
Parameters
----------
input_df : pandas DataFrame
MagIC records
outp... | python | def get_thellier_gui_meas_mapping(input_df, output=2):
"""
Get the appropriate mapping for translating measurements in Thellier GUI.
This requires special handling for treat_step_num/measurement/measurement_number.
Parameters
----------
input_df : pandas DataFrame
MagIC records
outp... | [
"def",
"get_thellier_gui_meas_mapping",
"(",
"input_df",
",",
"output",
"=",
"2",
")",
":",
"if",
"int",
"(",
"output",
")",
"==",
"2",
":",
"thellier_gui_meas3_2_meas2_map",
"=",
"meas_magic3_2_magic2_map",
".",
"copy",
"(",
")",
"if",
"'treat_step_num'",
"in",... | Get the appropriate mapping for translating measurements in Thellier GUI.
This requires special handling for treat_step_num/measurement/measurement_number.
Parameters
----------
input_df : pandas DataFrame
MagIC records
output : int
output to this MagIC data model (2 or 3)
Outp... | [
"Get",
"the",
"appropriate",
"mapping",
"for",
"translating",
"measurements",
"in",
"Thellier",
"GUI",
".",
"This",
"requires",
"special",
"handling",
"for",
"treat_step_num",
"/",
"measurement",
"/",
"measurement_number",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/mapping/map_magic.py#L168-L202 | train | Returns the appropriate mapping for translating measurements in Thellier GUI to MagIC records. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | pmagpy/mapping/map_magic.py | convert_meas_df_thellier_gui | def convert_meas_df_thellier_gui(meas_df_in, output):
"""
Take a measurement dataframe and convert column names
from MagIC 2 --> 3 or vice versa.
Use treat_step_num --> measurement_number if available,
otherwise measurement --> measurement_number.
Parameters
----------
meas_df_in : pand... | python | def convert_meas_df_thellier_gui(meas_df_in, output):
"""
Take a measurement dataframe and convert column names
from MagIC 2 --> 3 or vice versa.
Use treat_step_num --> measurement_number if available,
otherwise measurement --> measurement_number.
Parameters
----------
meas_df_in : pand... | [
"def",
"convert_meas_df_thellier_gui",
"(",
"meas_df_in",
",",
"output",
")",
":",
"output",
"=",
"int",
"(",
"output",
")",
"meas_mapping",
"=",
"get_thellier_gui_meas_mapping",
"(",
"meas_df_in",
",",
"output",
")",
"meas_df_out",
"=",
"meas_df_in",
".",
"rename... | Take a measurement dataframe and convert column names
from MagIC 2 --> 3 or vice versa.
Use treat_step_num --> measurement_number if available,
otherwise measurement --> measurement_number.
Parameters
----------
meas_df_in : pandas DataFrame
input dataframe with measurement data
out... | [
"Take",
"a",
"measurement",
"dataframe",
"and",
"convert",
"column",
"names",
"from",
"MagIC",
"2",
"--",
">",
"3",
"or",
"vice",
"versa",
".",
"Use",
"treat_step_num",
"--",
">",
"measurement_number",
"if",
"available",
"otherwise",
"measurement",
"--",
">",
... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/mapping/map_magic.py#L205-L224 | train | Convert a dataframe with measurement names to MagIC 2 or 3 or vice versa. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | pmagpy/mapping/map_magic.py | convert_meas | def convert_meas(direction, Rec):
"""
converts measurments tables from magic 2 to 3 (direction=magic3)
or from model 3 to 2.5 (direction=magic2) [not available]
"""
if direction == 'magic3':
columns = meas_magic2_2_magic3_map
MeasRec = {}
for key in columns:
if ke... | python | def convert_meas(direction, Rec):
"""
converts measurments tables from magic 2 to 3 (direction=magic3)
or from model 3 to 2.5 (direction=magic2) [not available]
"""
if direction == 'magic3':
columns = meas_magic2_2_magic3_map
MeasRec = {}
for key in columns:
if ke... | [
"def",
"convert_meas",
"(",
"direction",
",",
"Rec",
")",
":",
"if",
"direction",
"==",
"'magic3'",
":",
"columns",
"=",
"meas_magic2_2_magic3_map",
"MeasRec",
"=",
"{",
"}",
"for",
"key",
"in",
"columns",
":",
"if",
"key",
"in",
"list",
"(",
"Rec",
".",... | converts measurments tables from magic 2 to 3 (direction=magic3)
or from model 3 to 2.5 (direction=magic2) [not available] | [
"converts",
"measurments",
"tables",
"from",
"magic",
"2",
"to",
"3",
"(",
"direction",
"=",
"magic3",
")",
"or",
"from",
"model",
"3",
"to",
"2",
".",
"5",
"(",
"direction",
"=",
"magic2",
")",
"[",
"not",
"available",
"]"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/mapping/map_magic.py#L368-L382 | train | converts measurments tables from magic 2 to 3 | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | pmagpy/mapping/map_magic.py | convert_site_dm3_table_intensity | def convert_site_dm3_table_intensity(sites_df):
"""
Convert MagIC site headers to short/readable
headers for a figure (used by ipmag.sites_extract)
Intensity data only.
Parameters
----------
sites_df : pandas DataFrame
sites information
Returns
---------
int_df : pandas... | python | def convert_site_dm3_table_intensity(sites_df):
"""
Convert MagIC site headers to short/readable
headers for a figure (used by ipmag.sites_extract)
Intensity data only.
Parameters
----------
sites_df : pandas DataFrame
sites information
Returns
---------
int_df : pandas... | [
"def",
"convert_site_dm3_table_intensity",
"(",
"sites_df",
")",
":",
"# now for the intensities",
"has_vadms",
",",
"has_vdms",
"=",
"False",
",",
"False",
"if",
"'int_abs'",
"not",
"in",
"sites_df",
":",
"sites_df",
"[",
"'int_abs'",
"]",
"=",
"None",
"if",
"'... | Convert MagIC site headers to short/readable
headers for a figure (used by ipmag.sites_extract)
Intensity data only.
Parameters
----------
sites_df : pandas DataFrame
sites information
Returns
---------
int_df : pandas DataFrame
intensity site data with easily readable ... | [
"Convert",
"MagIC",
"site",
"headers",
"to",
"short",
"/",
"readable",
"headers",
"for",
"a",
"figure",
"(",
"used",
"by",
"ipmag",
".",
"sites_extract",
")",
"Intensity",
"data",
"only",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/mapping/map_magic.py#L477-L562 | train | Convert MagIC site headers to short or readable tables for a figure. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | pmagpy/mapping/map_magic.py | convert_site_dm3_table_directions | def convert_site_dm3_table_directions(sites_df):
"""
Convert MagIC site headers to short/readable
headers for a figure (used by ipmag.sites_extract)
Directional table only.
Parameters
----------
sites_df : pandas DataFrame
sites information
Returns
---------
dir_df : pa... | python | def convert_site_dm3_table_directions(sites_df):
"""
Convert MagIC site headers to short/readable
headers for a figure (used by ipmag.sites_extract)
Directional table only.
Parameters
----------
sites_df : pandas DataFrame
sites information
Returns
---------
dir_df : pa... | [
"def",
"convert_site_dm3_table_directions",
"(",
"sites_df",
")",
":",
"# directional",
"# do directional stuff first",
"# a few things need cleaning up",
"dir_df",
"=",
"sites_df",
".",
"copy",
"(",
")",
".",
"dropna",
"(",
"subset",
"=",
"[",
"'dir_dec'",
",",
"'dir... | Convert MagIC site headers to short/readable
headers for a figure (used by ipmag.sites_extract)
Directional table only.
Parameters
----------
sites_df : pandas DataFrame
sites information
Returns
---------
dir_df : pandas DataFrame
directional site data with easily read... | [
"Convert",
"MagIC",
"site",
"headers",
"to",
"short",
"/",
"readable",
"headers",
"for",
"a",
"figure",
"(",
"used",
"by",
"ipmag",
".",
"sites_extract",
")",
"Directional",
"table",
"only",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/mapping/map_magic.py#L565-L622 | train | Convert MagIC site headers to short or readable headers for a figure. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | pmagpy/mapping/map_magic.py | convert_specimen_dm3_table | def convert_specimen_dm3_table(spec_df):
"""
Convert MagIC specimen headers to short/readable
headers for a figure (used by ipmag.specimens_extract)
"""
from pmagpy import data_model3 as dm3
# get the data model
dm = dm3.DataModel()
# get the specimen absolute intensity column headers
... | python | def convert_specimen_dm3_table(spec_df):
"""
Convert MagIC specimen headers to short/readable
headers for a figure (used by ipmag.specimens_extract)
"""
from pmagpy import data_model3 as dm3
# get the data model
dm = dm3.DataModel()
# get the specimen absolute intensity column headers
... | [
"def",
"convert_specimen_dm3_table",
"(",
"spec_df",
")",
":",
"from",
"pmagpy",
"import",
"data_model3",
"as",
"dm3",
"# get the data model",
"dm",
"=",
"dm3",
".",
"DataModel",
"(",
")",
"# get the specimen absolute intensity column headers",
"meas_group",
"=",
"[",
... | Convert MagIC specimen headers to short/readable
headers for a figure (used by ipmag.specimens_extract) | [
"Convert",
"MagIC",
"specimen",
"headers",
"to",
"short",
"/",
"readable",
"headers",
"for",
"a",
"figure",
"(",
"used",
"by",
"ipmag",
".",
"specimens_extract",
")"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/mapping/map_magic.py#L625-L676 | train | Convert MagIC specimen dataframe to short or readable format for a figure | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/conversion_scripts/sufar4_asc_magic.py | main | def main():
"""
NAME
sufar4-asc_magic.py
DESCRIPTION
converts ascii files generated by SUFAR ver.4.0 to MagIC formated
files for use with PmagPy plotting software
SYNTAX
sufar4-asc_magic.py -h [command line options]
OPTIONS
-h: prints the help message and q... | python | def main():
"""
NAME
sufar4-asc_magic.py
DESCRIPTION
converts ascii files generated by SUFAR ver.4.0 to MagIC formated
files for use with PmagPy plotting software
SYNTAX
sufar4-asc_magic.py -h [command line options]
OPTIONS
-h: prints the help message and q... | [
"def",
"main",
"(",
")",
":",
"args",
"=",
"sys",
".",
"argv",
"if",
"'-h'",
"in",
"args",
":",
"print",
"(",
"main",
".",
"__doc__",
")",
"sys",
".",
"exit",
"(",
")",
"dataframe",
"=",
"extractor",
".",
"command_line_dataframe",
"(",
"[",
"[",
"'... | NAME
sufar4-asc_magic.py
DESCRIPTION
converts ascii files generated by SUFAR ver.4.0 to MagIC formated
files for use with PmagPy plotting software
SYNTAX
sufar4-asc_magic.py -h [command line options]
OPTIONS
-h: prints the help message and quits
-f FILE: sp... | [
"NAME",
"sufar4",
"-",
"asc_magic",
".",
"py"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/conversion_scripts/sufar4_asc_magic.py#L6-L79 | train | This function is the main entry point for the sufar4 - asc_magic. py script. It is used to convert ascii files generated by SUFAR ver. 4. 0 to MagIC formated and add all new specimen files to the current structure. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/deprecated/make_magic_plots2.py | main | def main():
"""
NAME
make_magic_plots.py
DESCRIPTION
inspects magic directory for available plots.
SYNTAX
make_magic_plots.py [command line options]
INPUT
magic files
OPTIONS
-h prints help message and quits
-f FILE specifies input file name
... | python | def main():
"""
NAME
make_magic_plots.py
DESCRIPTION
inspects magic directory for available plots.
SYNTAX
make_magic_plots.py [command line options]
INPUT
magic files
OPTIONS
-h prints help message and quits
-f FILE specifies input file name
... | [
"def",
"main",
"(",
")",
":",
"dirlist",
"=",
"[",
"'./'",
"]",
"dir_path",
"=",
"os",
".",
"getcwd",
"(",
")",
"names",
"=",
"os",
".",
"listdir",
"(",
"dir_path",
")",
"for",
"n",
"in",
"names",
":",
"if",
"'Location'",
"in",
"n",
":",
"dirlist... | NAME
make_magic_plots.py
DESCRIPTION
inspects magic directory for available plots.
SYNTAX
make_magic_plots.py [command line options]
INPUT
magic files
OPTIONS
-h prints help message and quits
-f FILE specifies input file name
-fmt [png,eps,svg,jpg,... | [
"NAME",
"make_magic_plots",
".",
"py"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/deprecated/make_magic_plots2.py#L8-L207 | train | This function is the main function of the magic_plots. py script. It will take a directory and returns a list of available plots. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.init_UI | def init_UI(self):
"""
Set display variables (font, resolution of GUI, sizer proportions)
then builds the Side bar panel, Top bar panel, and Plots scrolleing
panel which are then placed placed together in a sizer and fit to
the GUI wx.Frame
"""
# -------------------------... | python | def init_UI(self):
"""
Set display variables (font, resolution of GUI, sizer proportions)
then builds the Side bar panel, Top bar panel, and Plots scrolleing
panel which are then placed placed together in a sizer and fit to
the GUI wx.Frame
"""
# -------------------------... | [
"def",
"init_UI",
"(",
"self",
")",
":",
"# --------------------------------------------------------------------------",
"# Setup ScrolledPanel Ctrls---------------------------------------------",
"# --------------------------------------------------------------------------",
"# ------------------... | Set display variables (font, resolution of GUI, sizer proportions)
then builds the Side bar panel, Top bar panel, and Plots scrolleing
panel which are then placed placed together in a sizer and fit to
the GUI wx.Frame | [
"Set",
"display",
"variables",
"(",
"font",
"resolution",
"of",
"GUI",
"sizer",
"proportions",
")",
"then",
"builds",
"the",
"Side",
"bar",
"panel",
"Top",
"bar",
"panel",
"and",
"Plots",
"scrolleing",
"panel",
"which",
"are",
"then",
"placed",
"placed",
"to... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L332-L821 | train | Initializes the main GUI for the current locale. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.get_coordinate_system | def get_coordinate_system(self):
"""
Check self.Data for available coordinate systems.
Returns
---------
initial_coordinate, coordinate_list : str, list
i.e., 'geographic', ['specimen', 'geographic']
"""
coordinate_list = ['specimen']
initial_coor... | python | def get_coordinate_system(self):
"""
Check self.Data for available coordinate systems.
Returns
---------
initial_coordinate, coordinate_list : str, list
i.e., 'geographic', ['specimen', 'geographic']
"""
coordinate_list = ['specimen']
initial_coor... | [
"def",
"get_coordinate_system",
"(",
"self",
")",
":",
"coordinate_list",
"=",
"[",
"'specimen'",
"]",
"initial_coordinate",
"=",
"'specimen'",
"for",
"specimen",
"in",
"self",
".",
"specimens",
":",
"if",
"'geographic'",
"not",
"in",
"coordinate_list",
"and",
"... | Check self.Data for available coordinate systems.
Returns
---------
initial_coordinate, coordinate_list : str, list
i.e., 'geographic', ['specimen', 'geographic'] | [
"Check",
"self",
".",
"Data",
"for",
"available",
"coordinate",
"systems",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L824-L841 | train | Get the available coordinate system. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.create_menu | def create_menu(self):
"""
Create the MenuBar for the GUI current structure is:
File : Change Working Directory, Import Interpretations from LSQ
file, Import interpretations from a redo file, Save interpretations
to a redo file, Save MagIC tables, Save Plots
Edit : New In... | python | def create_menu(self):
"""
Create the MenuBar for the GUI current structure is:
File : Change Working Directory, Import Interpretations from LSQ
file, Import interpretations from a redo file, Save interpretations
to a redo file, Save MagIC tables, Save Plots
Edit : New In... | [
"def",
"create_menu",
"(",
"self",
")",
":",
"self",
".",
"menubar",
"=",
"wx",
".",
"MenuBar",
"(",
")",
"# -----------------",
"# File Menu",
"# -----------------",
"menu_file",
"=",
"wx",
".",
"Menu",
"(",
")",
"m_change_WD",
"=",
"menu_file",
".",
"Appen... | Create the MenuBar for the GUI current structure is:
File : Change Working Directory, Import Interpretations from LSQ
file, Import interpretations from a redo file, Save interpretations
to a redo file, Save MagIC tables, Save Plots
Edit : New Interpretation, Delete Interpretation, Next
... | [
"Create",
"the",
"MenuBar",
"for",
"the",
"GUI",
"current",
"structure",
"is",
":",
"File",
":",
"Change",
"Working",
"Directory",
"Import",
"Interpretations",
"from",
"LSQ",
"file",
"Import",
"interpretations",
"from",
"a",
"redo",
"file",
"Save",
"interpretati... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L844-L1085 | train | Create the menu for the GUI current structure | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.draw_figure | def draw_figure(self, s, update_high_plots=True):
"""
Convenience function that sets current specimen to s and calculates
data for that specimen then redraws all plots.
Parameters
----------
s : specimen to set current specimen too
update_high_plots : bool which ... | python | def draw_figure(self, s, update_high_plots=True):
"""
Convenience function that sets current specimen to s and calculates
data for that specimen then redraws all plots.
Parameters
----------
s : specimen to set current specimen too
update_high_plots : bool which ... | [
"def",
"draw_figure",
"(",
"self",
",",
"s",
",",
"update_high_plots",
"=",
"True",
")",
":",
"self",
".",
"initialize_CART_rot",
"(",
"s",
")",
"# Draw Zij plot",
"self",
".",
"draw_zijderveld",
"(",
")",
"# Draw specimen equal area",
"self",
".",
"draw_spec_eq... | Convenience function that sets current specimen to s and calculates
data for that specimen then redraws all plots.
Parameters
----------
s : specimen to set current specimen too
update_high_plots : bool which decides if high level mean plot
updates (default: False) | [
"Convenience",
"function",
"that",
"sets",
"current",
"specimen",
"to",
"s",
"and",
"calculates",
"data",
"for",
"that",
"specimen",
"then",
"redraws",
"all",
"plots",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L1091-L1120 | train | This method draws the current figure for the current specimen and updates all plots. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.draw_zijderveld | def draw_zijderveld(self):
"""
Draws the zijderveld plot in the GUI on canvas1
"""
self.fig1.clf()
axis_bounds = [0, .1, 1, .85]
self.zijplot = self.fig1.add_axes(
axis_bounds, frameon=False, facecolor='None', label='zig_orig', zorder=0)
self.zijplot.c... | python | def draw_zijderveld(self):
"""
Draws the zijderveld plot in the GUI on canvas1
"""
self.fig1.clf()
axis_bounds = [0, .1, 1, .85]
self.zijplot = self.fig1.add_axes(
axis_bounds, frameon=False, facecolor='None', label='zig_orig', zorder=0)
self.zijplot.c... | [
"def",
"draw_zijderveld",
"(",
"self",
")",
":",
"self",
".",
"fig1",
".",
"clf",
"(",
")",
"axis_bounds",
"=",
"[",
"0",
",",
".1",
",",
"1",
",",
".85",
"]",
"self",
".",
"zijplot",
"=",
"self",
".",
"fig1",
".",
"add_axes",
"(",
"axis_bounds",
... | Draws the zijderveld plot in the GUI on canvas1 | [
"Draws",
"the",
"zijderveld",
"plot",
"in",
"the",
"GUI",
"on",
"canvas1"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L1122-L1274 | train | Draws the zijderveld plot on canvas1 | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.draw_spec_eqarea | def draw_spec_eqarea(self):
"""
Calculates point positions and draws the Specimen eqarea plot on
canvas2
"""
draw_net(self.specimen_eqarea)
self.specimen_eqarea.text(-1.2, 1.15, "specimen: %s" % self.s, {
'family': self.font_type, 'fontsi... | python | def draw_spec_eqarea(self):
"""
Calculates point positions and draws the Specimen eqarea plot on
canvas2
"""
draw_net(self.specimen_eqarea)
self.specimen_eqarea.text(-1.2, 1.15, "specimen: %s" % self.s, {
'family': self.font_type, 'fontsi... | [
"def",
"draw_spec_eqarea",
"(",
"self",
")",
":",
"draw_net",
"(",
"self",
".",
"specimen_eqarea",
")",
"self",
".",
"specimen_eqarea",
".",
"text",
"(",
"-",
"1.2",
",",
"1.15",
",",
"\"specimen: %s\"",
"%",
"self",
".",
"s",
",",
"{",
"'family'",
":",
... | Calculates point positions and draws the Specimen eqarea plot on
canvas2 | [
"Calculates",
"point",
"positions",
"and",
"draws",
"the",
"Specimen",
"eqarea",
"plot",
"on",
"canvas2"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L1276-L1371 | train | Calculates point positions and draws the Specimen eqarea plot on canvas2
| GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.draw_MM0 | def draw_MM0(self):
"""
Draws the M/M0 plot in the GUI on canvas3
"""
self.fig3.clf()
self.fig3.text(0.02, 0.96, 'M/M0', {'family': self.font_type, 'fontsize': 10 *
self.GUI_RESOLUTION, 'style': 'normal', 'va': 'center', 'ha': 'left'})
... | python | def draw_MM0(self):
"""
Draws the M/M0 plot in the GUI on canvas3
"""
self.fig3.clf()
self.fig3.text(0.02, 0.96, 'M/M0', {'family': self.font_type, 'fontsize': 10 *
self.GUI_RESOLUTION, 'style': 'normal', 'va': 'center', 'ha': 'left'})
... | [
"def",
"draw_MM0",
"(",
"self",
")",
":",
"self",
".",
"fig3",
".",
"clf",
"(",
")",
"self",
".",
"fig3",
".",
"text",
"(",
"0.02",
",",
"0.96",
",",
"'M/M0'",
",",
"{",
"'family'",
":",
"self",
".",
"font_type",
",",
"'fontsize'",
":",
"10",
"*"... | Draws the M/M0 plot in the GUI on canvas3 | [
"Draws",
"the",
"M",
"/",
"M0",
"plot",
"in",
"the",
"GUI",
"on",
"canvas3"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L1373-L1459 | train | Draws the M and M0 plot on canvas3. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.plot_selected_meas | def plot_selected_meas(self):
"""
Goes through all measurements selected in logger and draws darker
marker over all specimen plots to display which measurements have
been selected
"""
self.close_warning = True
# set hex colors for cover and size of selected meas m... | python | def plot_selected_meas(self):
"""
Goes through all measurements selected in logger and draws darker
marker over all specimen plots to display which measurements have
been selected
"""
self.close_warning = True
# set hex colors for cover and size of selected meas m... | [
"def",
"plot_selected_meas",
"(",
"self",
")",
":",
"self",
".",
"close_warning",
"=",
"True",
"# set hex colors for cover and size of selected meas marker",
"blue_cover",
"=",
"\"#9999FF\"",
"red_cover",
"=",
"\"#FF9999\"",
"eqarea_outline",
"=",
"\"#FF0000\"",
"MS_selecte... | Goes through all measurements selected in logger and draws darker
marker over all specimen plots to display which measurements have
been selected | [
"Goes",
"through",
"all",
"measurements",
"selected",
"in",
"logger",
"and",
"draws",
"darker",
"marker",
"over",
"all",
"specimen",
"plots",
"to",
"display",
"which",
"measurements",
"have",
"been",
"selected"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L1461-L1557 | train | Goes through all measurements selected in logger and draws darker and eqarea plots to display which measurements have been selected in specimen plots. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.draw_interpretations | def draw_interpretations(self):
"""
draw the specimen interpretations on the zijderveld, the specimen
equal area, and the M/M0 plots
Alters
------
fit.lines, fit.points, fit.eqarea_data, fit.mm0_data,
zijplot, specimen_eqarea_interpretation, mplot_interpretation
... | python | def draw_interpretations(self):
"""
draw the specimen interpretations on the zijderveld, the specimen
equal area, and the M/M0 plots
Alters
------
fit.lines, fit.points, fit.eqarea_data, fit.mm0_data,
zijplot, specimen_eqarea_interpretation, mplot_interpretation
... | [
"def",
"draw_interpretations",
"(",
"self",
")",
":",
"problems",
"=",
"{",
"}",
"if",
"self",
".",
"s",
"in",
"self",
".",
"pmag_results_data",
"[",
"'specimens'",
"]",
"and",
"self",
".",
"pmag_results_data",
"[",
"'specimens'",
"]",
"[",
"self",
".",
... | draw the specimen interpretations on the zijderveld, the specimen
equal area, and the M/M0 plots
Alters
------
fit.lines, fit.points, fit.eqarea_data, fit.mm0_data,
zijplot, specimen_eqarea_interpretation, mplot_interpretation | [
"draw",
"the",
"specimen",
"interpretations",
"on",
"the",
"zijderveld",
"the",
"specimen",
"equal",
"area",
"and",
"the",
"M",
"/",
"M0",
"plots"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L1559-L1833 | train | draw the interpretations on the specimen and the M - M0 plots | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.get_levels_and_coordinates_names | def get_levels_and_coordinates_names(self):
"""
Get the current level of the high level mean plot and the name of
the corrisponding site, study, etc. As well as the code for the
current coordinate system.
Returns
-------
(high_level_type,high_level_name,coordinat... | python | def get_levels_and_coordinates_names(self):
"""
Get the current level of the high level mean plot and the name of
the corrisponding site, study, etc. As well as the code for the
current coordinate system.
Returns
-------
(high_level_type,high_level_name,coordinat... | [
"def",
"get_levels_and_coordinates_names",
"(",
"self",
")",
":",
"if",
"self",
".",
"COORDINATE_SYSTEM",
"==",
"\"geographic\"",
":",
"dirtype",
"=",
"'DA-DIR-GEO'",
"elif",
"self",
".",
"COORDINATE_SYSTEM",
"==",
"\"tilt-corrected\"",
":",
"dirtype",
"=",
"'DA-DIR... | Get the current level of the high level mean plot and the name of
the corrisponding site, study, etc. As well as the code for the
current coordinate system.
Returns
-------
(high_level_type,high_level_name,coordinate_system) : tuple object
containing current high lev... | [
"Get",
"the",
"current",
"level",
"of",
"the",
"high",
"level",
"mean",
"plot",
"and",
"the",
"name",
"of",
"the",
"corrisponding",
"site",
"study",
"etc",
".",
"As",
"well",
"as",
"the",
"code",
"for",
"the",
"current",
"coordinate",
"system",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L1875-L1903 | train | Get the current level of the high level mean plot and the name of the corrisponding site study etc. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.calc_and_plot_sample_orient_check | def calc_and_plot_sample_orient_check(self):
"""
If sample orientation is on plots the wrong arrow, wrong compass,
and rotated sample error directions for the current specimen
interpretation on the high level mean plot so that you can check
sample orientation good/bad.
""... | python | def calc_and_plot_sample_orient_check(self):
"""
If sample orientation is on plots the wrong arrow, wrong compass,
and rotated sample error directions for the current specimen
interpretation on the high level mean plot so that you can check
sample orientation good/bad.
""... | [
"def",
"calc_and_plot_sample_orient_check",
"(",
"self",
")",
":",
"fit",
"=",
"self",
".",
"current_fit",
"if",
"fit",
"==",
"None",
":",
"return",
"pars",
"=",
"fit",
".",
"get",
"(",
"'specimen'",
")",
"if",
"'specimen_dec'",
"not",
"in",
"list",
"(",
... | If sample orientation is on plots the wrong arrow, wrong compass,
and rotated sample error directions for the current specimen
interpretation on the high level mean plot so that you can check
sample orientation good/bad. | [
"If",
"sample",
"orientation",
"is",
"on",
"plots",
"the",
"wrong",
"arrow",
"wrong",
"compass",
"and",
"rotated",
"sample",
"error",
"directions",
"for",
"the",
"current",
"specimen",
"interpretation",
"on",
"the",
"high",
"level",
"mean",
"plot",
"so",
"that... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L1997-L2080 | train | Calculates and plots the sample orientation of the current specimen and checks if the sample orientation is on plots the wrong arrow wrong compass wrong compass and rotated sample error directions for the current specimen | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.plot_high_level_equalarea | def plot_high_level_equalarea(self, element):
"""
Given a GUI element such as a sample or specimen tries to plot to
high level mean plot
"""
if self.ie_open:
high_level = self.ie.show_box.GetValue()
else:
high_level = self.UPPER_LEVEL_SHOW
... | python | def plot_high_level_equalarea(self, element):
"""
Given a GUI element such as a sample or specimen tries to plot to
high level mean plot
"""
if self.ie_open:
high_level = self.ie.show_box.GetValue()
else:
high_level = self.UPPER_LEVEL_SHOW
... | [
"def",
"plot_high_level_equalarea",
"(",
"self",
",",
"element",
")",
":",
"if",
"self",
".",
"ie_open",
":",
"high_level",
"=",
"self",
".",
"ie",
".",
"show_box",
".",
"GetValue",
"(",
")",
"else",
":",
"high_level",
"=",
"self",
".",
"UPPER_LEVEL_SHOW",... | Given a GUI element such as a sample or specimen tries to plot to
high level mean plot | [
"Given",
"a",
"GUI",
"element",
"such",
"as",
"a",
"sample",
"or",
"specimen",
"tries",
"to",
"plot",
"to",
"high",
"level",
"mean",
"plot"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L2082-L2201 | train | Given an element in the GUI plot to the high level mean plot | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.plot_eqarea_pars | def plot_eqarea_pars(self, pars, fig):
"""
Given a dictionary of parameters (pars) that is returned from
pmag.domean plots those pars to the given fig
"""
if pars == {}:
pass
elif 'calculation_type' in list(pars.keys()) and pars['calculation_type'] == 'DE-BFP'... | python | def plot_eqarea_pars(self, pars, fig):
"""
Given a dictionary of parameters (pars) that is returned from
pmag.domean plots those pars to the given fig
"""
if pars == {}:
pass
elif 'calculation_type' in list(pars.keys()) and pars['calculation_type'] == 'DE-BFP'... | [
"def",
"plot_eqarea_pars",
"(",
"self",
",",
"pars",
",",
"fig",
")",
":",
"if",
"pars",
"==",
"{",
"}",
":",
"pass",
"elif",
"'calculation_type'",
"in",
"list",
"(",
"pars",
".",
"keys",
"(",
")",
")",
"and",
"pars",
"[",
"'calculation_type'",
"]",
... | Given a dictionary of parameters (pars) that is returned from
pmag.domean plots those pars to the given fig | [
"Given",
"a",
"dictionary",
"of",
"parameters",
"(",
"pars",
")",
"that",
"is",
"returned",
"from",
"pmag",
".",
"domean",
"plots",
"those",
"pars",
"to",
"the",
"given",
"fig"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L2203-L2269 | train | Plots the parameters that are returned from pmag. domean and returns the corresponding plot of the species in the given figure. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.plot_eqarea_mean | def plot_eqarea_mean(self, meanpars, fig):
"""
Given a dictionary of parameters from pmag.dofisher, pmag.dolnp, or
pmag.dobingham (meanpars) plots parameters to fig
"""
mpars_to_plot = []
if meanpars == {}:
return
if meanpars['calculation_type'] == 'Fi... | python | def plot_eqarea_mean(self, meanpars, fig):
"""
Given a dictionary of parameters from pmag.dofisher, pmag.dolnp, or
pmag.dobingham (meanpars) plots parameters to fig
"""
mpars_to_plot = []
if meanpars == {}:
return
if meanpars['calculation_type'] == 'Fi... | [
"def",
"plot_eqarea_mean",
"(",
"self",
",",
"meanpars",
",",
"fig",
")",
":",
"mpars_to_plot",
"=",
"[",
"]",
"if",
"meanpars",
"==",
"{",
"}",
":",
"return",
"if",
"meanpars",
"[",
"'calculation_type'",
"]",
"==",
"'Fisher by polarity'",
":",
"for",
"mod... | Given a dictionary of parameters from pmag.dofisher, pmag.dolnp, or
pmag.dobingham (meanpars) plots parameters to fig | [
"Given",
"a",
"dictionary",
"of",
"parameters",
"from",
"pmag",
".",
"dofisher",
"pmag",
".",
"dolnp",
"or",
"pmag",
".",
"dobingham",
"(",
"meanpars",
")",
"plots",
"parameters",
"to",
"fig"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L2271-L2326 | train | Plots the mean parameters of the eqarea of the current object. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.initialize_CART_rot | def initialize_CART_rot(self, s):
"""
Sets current specimen to s and calculates the data necessary to plot
the specimen plots (zijderveld, specimen eqarea, M/M0)
Parameters
----------
s: specimen to set as the GUI's current specimen
"""
self.s = s # only... | python | def initialize_CART_rot(self, s):
"""
Sets current specimen to s and calculates the data necessary to plot
the specimen plots (zijderveld, specimen eqarea, M/M0)
Parameters
----------
s: specimen to set as the GUI's current specimen
"""
self.s = s # only... | [
"def",
"initialize_CART_rot",
"(",
"self",
",",
"s",
")",
":",
"self",
".",
"s",
"=",
"s",
"# only place in code where self.s is to be set directly",
"if",
"self",
".",
"orthogonal_box",
".",
"GetValue",
"(",
")",
"==",
"\"X=East\"",
":",
"self",
".",
"ORTHO_PLO... | Sets current specimen to s and calculates the data necessary to plot
the specimen plots (zijderveld, specimen eqarea, M/M0)
Parameters
----------
s: specimen to set as the GUI's current specimen | [
"Sets",
"current",
"specimen",
"to",
"s",
"and",
"calculates",
"the",
"data",
"necessary",
"to",
"plot",
"the",
"specimen",
"plots",
"(",
"zijderveld",
"specimen",
"eqarea",
"M",
"/",
"M0",
")"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L2336-L2434 | train | Initializes the internal structure of the current specimen and calculates the data necessary to plot the specimen plots. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.add_fit | def add_fit(self, specimen, name, fmin, fmax, PCA_type="DE-BFL", color=None, suppress_warnings=False, saved=True):
"""
Goes through the data checks required to add an interpretation to
the param specimen with the name param name, the bounds param fmin
and param fmax, and calculation type... | python | def add_fit(self, specimen, name, fmin, fmax, PCA_type="DE-BFL", color=None, suppress_warnings=False, saved=True):
"""
Goes through the data checks required to add an interpretation to
the param specimen with the name param name, the bounds param fmin
and param fmax, and calculation type... | [
"def",
"add_fit",
"(",
"self",
",",
"specimen",
",",
"name",
",",
"fmin",
",",
"fmax",
",",
"PCA_type",
"=",
"\"DE-BFL\"",
",",
"color",
"=",
"None",
",",
"suppress_warnings",
"=",
"False",
",",
"saved",
"=",
"True",
")",
":",
"if",
"specimen",
"not",
... | Goes through the data checks required to add an interpretation to
the param specimen with the name param name, the bounds param fmin
and param fmax, and calculation type param PCA_type.
Parameters
----------
specimen : specimen with measurement data to add the
interpreta... | [
"Goes",
"through",
"the",
"data",
"checks",
"required",
"to",
"add",
"an",
"interpretation",
"to",
"the",
"param",
"specimen",
"with",
"the",
"name",
"param",
"name",
"the",
"bounds",
"param",
"fmin",
"and",
"param",
"fmax",
"and",
"calculation",
"type",
"pa... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L2436-L2494 | train | Adds a new fit to the current fit. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.delete_fit | def delete_fit(self, fit, specimen=None):
"""
removes fit from GUI results data
Parameters
----------
fit : fit to remove
specimen : specimen of fit to remove, if not provided and
set to None then the function will find the specimen itself
"""
if ... | python | def delete_fit(self, fit, specimen=None):
"""
removes fit from GUI results data
Parameters
----------
fit : fit to remove
specimen : specimen of fit to remove, if not provided and
set to None then the function will find the specimen itself
"""
if ... | [
"def",
"delete_fit",
"(",
"self",
",",
"fit",
",",
"specimen",
"=",
"None",
")",
":",
"if",
"specimen",
"==",
"None",
":",
"for",
"spec",
"in",
"self",
".",
"pmag_results_data",
"[",
"'specimens'",
"]",
":",
"if",
"fit",
"in",
"self",
".",
"pmag_result... | removes fit from GUI results data
Parameters
----------
fit : fit to remove
specimen : specimen of fit to remove, if not provided and
set to None then the function will find the specimen itself | [
"removes",
"fit",
"from",
"GUI",
"results",
"data"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L2496-L2524 | train | Removes fit from GUI results data | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.calculate_vgp_data | def calculate_vgp_data(self):
"""
Calculates VGPS for all samples, sites, and locations
Returns
-------
VGP_Data : dictionary of structure {sample: {comp: data},
site: {comp: data}, location: {comp: data}}
"""
# get criteria if it exists else use defa... | python | def calculate_vgp_data(self):
"""
Calculates VGPS for all samples, sites, and locations
Returns
-------
VGP_Data : dictionary of structure {sample: {comp: data},
site: {comp: data}, location: {comp: data}}
"""
# get criteria if it exists else use defa... | [
"def",
"calculate_vgp_data",
"(",
"self",
")",
":",
"# get criteria if it exists else use default",
"crit_data",
"=",
"self",
".",
"read_criteria_file",
"(",
")",
"if",
"crit_data",
"==",
"None",
":",
"crit_data",
"=",
"pmag",
".",
"default_criteria",
"(",
"0",
")... | Calculates VGPS for all samples, sites, and locations
Returns
-------
VGP_Data : dictionary of structure {sample: {comp: data},
site: {comp: data}, location: {comp: data}} | [
"Calculates",
"VGPS",
"for",
"all",
"samples",
"sites",
"and",
"locations"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L2526-L2771 | train | Calculates VGPS for all samples sites and locations | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.convert_ages_to_calendar_year | def convert_ages_to_calendar_year(self, er_ages_rec):
"""
convert all age units to calendar year
Parameters
----------
er_ages_rec : Dict type object containing preferbly at least keys
'age', 'age_unit', and either 'age_range_high', 'age_range_low'
or 'ag... | python | def convert_ages_to_calendar_year(self, er_ages_rec):
"""
convert all age units to calendar year
Parameters
----------
er_ages_rec : Dict type object containing preferbly at least keys
'age', 'age_unit', and either 'age_range_high', 'age_range_low'
or 'ag... | [
"def",
"convert_ages_to_calendar_year",
"(",
"self",
",",
"er_ages_rec",
")",
":",
"if",
"\"age\"",
"not",
"in",
"list",
"(",
"er_ages_rec",
".",
"keys",
"(",
")",
")",
":",
"return",
"(",
"er_ages_rec",
")",
"if",
"\"age_unit\"",
"not",
"in",
"list",
"(",... | convert all age units to calendar year
Parameters
----------
er_ages_rec : Dict type object containing preferbly at least keys
'age', 'age_unit', and either 'age_range_high', 'age_range_low'
or 'age_sigma'
Returns
-------
er_ages_rec : Same dict ... | [
"convert",
"all",
"age",
"units",
"to",
"calendar",
"year"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L2773-L2846 | train | Convert all age units to calendar year | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.generate_warning_text | def generate_warning_text(self):
"""
generates warnings for the current specimen then adds them to the
current warning text for the GUI which will be rendered on a call to
update_warning_box.
"""
self.warning_text = ""
if self.s in list(self.pmag_results_data['spe... | python | def generate_warning_text(self):
"""
generates warnings for the current specimen then adds them to the
current warning text for the GUI which will be rendered on a call to
update_warning_box.
"""
self.warning_text = ""
if self.s in list(self.pmag_results_data['spe... | [
"def",
"generate_warning_text",
"(",
"self",
")",
":",
"self",
".",
"warning_text",
"=",
"\"\"",
"if",
"self",
".",
"s",
"in",
"list",
"(",
"self",
".",
"pmag_results_data",
"[",
"'specimens'",
"]",
".",
"keys",
"(",
")",
")",
":",
"for",
"fit",
"in",
... | generates warnings for the current specimen then adds them to the
current warning text for the GUI which will be rendered on a call to
update_warning_box. | [
"generates",
"warnings",
"for",
"the",
"current",
"specimen",
"then",
"adds",
"them",
"to",
"the",
"current",
"warning",
"text",
"for",
"the",
"GUI",
"which",
"will",
"be",
"rendered",
"on",
"a",
"call",
"to",
"update_warning_box",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L2848-L2907 | train | Generates the warning text for the current specimen and adds them to the warning_text attribute of the GUI. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.read_criteria_file | def read_criteria_file(self, criteria_file_name=None):
"""
reads 2.5 or 3.0 formatted PmagPy criteria file and returns a set of
nested dictionary 2.5 formated criteria data that can be passed into
pmag.grade to filter data.
Parameters
----------
criteria_file : n... | python | def read_criteria_file(self, criteria_file_name=None):
"""
reads 2.5 or 3.0 formatted PmagPy criteria file and returns a set of
nested dictionary 2.5 formated criteria data that can be passed into
pmag.grade to filter data.
Parameters
----------
criteria_file : n... | [
"def",
"read_criteria_file",
"(",
"self",
",",
"criteria_file_name",
"=",
"None",
")",
":",
"# import pdb; pdb.set_trace()",
"acceptance_criteria",
"=",
"pmag",
".",
"initialize_acceptance_criteria",
"(",
")",
"if",
"self",
".",
"data_model",
"==",
"3",
":",
... | reads 2.5 or 3.0 formatted PmagPy criteria file and returns a set of
nested dictionary 2.5 formated criteria data that can be passed into
pmag.grade to filter data.
Parameters
----------
criteria_file : name of criteria file to read in
Returns
-------
ne... | [
"reads",
"2",
".",
"5",
"or",
"3",
".",
"0",
"formatted",
"PmagPy",
"criteria",
"file",
"and",
"returns",
"a",
"set",
"of",
"nested",
"dictionary",
"2",
".",
"5",
"formated",
"criteria",
"data",
"that",
"can",
"be",
"passed",
"into",
"pmag",
".",
"grad... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L2909-L2960 | train | Reads the pmag_criteria. txt file and returns a set of dicts that can be passed into pmag. grade to filter data. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.get_PCA_parameters | def get_PCA_parameters(self, specimen, fit, tmin, tmax, coordinate_system, calculation_type):
"""
Uses pmag.domean to preform a line, line-with-origin, line-anchored,
or plane least squared regression or a fisher mean on the
measurement data of specimen in coordinate system between bound... | python | def get_PCA_parameters(self, specimen, fit, tmin, tmax, coordinate_system, calculation_type):
"""
Uses pmag.domean to preform a line, line-with-origin, line-anchored,
or plane least squared regression or a fisher mean on the
measurement data of specimen in coordinate system between bound... | [
"def",
"get_PCA_parameters",
"(",
"self",
",",
"specimen",
",",
"fit",
",",
"tmin",
",",
"tmax",
",",
"coordinate_system",
",",
"calculation_type",
")",
":",
"if",
"tmin",
"==",
"''",
"or",
"tmax",
"==",
"''",
":",
"return",
"beg_pca",
",",
"end_pca",
"=... | Uses pmag.domean to preform a line, line-with-origin, line-anchored,
or plane least squared regression or a fisher mean on the
measurement data of specimen in coordinate system between bounds
tmin to tmax
Parameters
----------
specimen : specimen with measurement data in... | [
"Uses",
"pmag",
".",
"domean",
"to",
"preform",
"a",
"line",
"line",
"-",
"with",
"-",
"origin",
"line",
"-",
"anchored",
"or",
"plane",
"least",
"squared",
"regression",
"or",
"a",
"fisher",
"mean",
"on",
"the",
"measurement",
"data",
"of",
"specimen",
... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L2962-L3029 | train | Returns a dictionary of specimen record parameters for the specified specimen and fit. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.autointerpret | def autointerpret(self, event, step_size=None, calculation_type="DE-BFL"):
"""
Clears current interpretations and adds interpretations to every
specimen of type = calculation_type by attempting fits of size =
step size and type = calculation_type and testing the mad or a95
then f... | python | def autointerpret(self, event, step_size=None, calculation_type="DE-BFL"):
"""
Clears current interpretations and adds interpretations to every
specimen of type = calculation_type by attempting fits of size =
step size and type = calculation_type and testing the mad or a95
then f... | [
"def",
"autointerpret",
"(",
"self",
",",
"event",
",",
"step_size",
"=",
"None",
",",
"calculation_type",
"=",
"\"DE-BFL\"",
")",
":",
"if",
"not",
"self",
".",
"user_warning",
"(",
"\"This feature is in ALPHA and still in development and testing. It is subject to bugs a... | Clears current interpretations and adds interpretations to every
specimen of type = calculation_type by attempting fits of size =
step size and type = calculation_type and testing the mad or a95
then finding peaks in these to note areas of maximum error then fits
between these peaks excl... | [
"Clears",
"current",
"interpretations",
"and",
"adds",
"interpretations",
"to",
"every",
"specimen",
"of",
"type",
"=",
"calculation_type",
"by",
"attempting",
"fits",
"of",
"size",
"=",
"step",
"size",
"and",
"type",
"=",
"calculation_type",
"and",
"testing",
"... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3031-L3066 | train | Autointerprets the current interpretations for all the specimen in the current specimen and adds interpretations to every specimen in the current specimen. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.autointerpret_specimen | def autointerpret_specimen(self, specimen, step_size, calculation_type):
"""In Dev"""
if self.COORDINATE_SYSTEM == 'geographic':
block = self.Data[specimen]['zijdblock_geo']
elif self.COORDINATE_SYSTEM == 'tilt-corrected':
block = self.Data[specimen]['zijdblock_tilt']
... | python | def autointerpret_specimen(self, specimen, step_size, calculation_type):
"""In Dev"""
if self.COORDINATE_SYSTEM == 'geographic':
block = self.Data[specimen]['zijdblock_geo']
elif self.COORDINATE_SYSTEM == 'tilt-corrected':
block = self.Data[specimen]['zijdblock_tilt']
... | [
"def",
"autointerpret_specimen",
"(",
"self",
",",
"specimen",
",",
"step_size",
",",
"calculation_type",
")",
":",
"if",
"self",
".",
"COORDINATE_SYSTEM",
"==",
"'geographic'",
":",
"block",
"=",
"self",
".",
"Data",
"[",
"specimen",
"]",
"[",
"'zijdblock_geo... | In Dev | [
"In",
"Dev"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3068-L3107 | train | Autointerprets a specimen in the current data structure. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.get_high_level_mean_pars | def get_high_level_mean_pars(self, high_level_type, high_level_name, calculation_type, elements_type, mean_fit, dirtype):
"""
Gets the Parameters of a mean of lower level data such as a Site
level Fisher mean of Specimen interpretations
Parameters
----------
high_level_t... | python | def get_high_level_mean_pars(self, high_level_type, high_level_name, calculation_type, elements_type, mean_fit, dirtype):
"""
Gets the Parameters of a mean of lower level data such as a Site
level Fisher mean of Specimen interpretations
Parameters
----------
high_level_t... | [
"def",
"get_high_level_mean_pars",
"(",
"self",
",",
"high_level_type",
",",
"high_level_name",
",",
"calculation_type",
",",
"elements_type",
",",
"mean_fit",
",",
"dirtype",
")",
":",
"elements_list",
"=",
"self",
".",
"Data_hierarchy",
"[",
"high_level_type",
"]"... | Gets the Parameters of a mean of lower level data such as a Site
level Fisher mean of Specimen interpretations
Parameters
----------
high_level_type : 'samples','sites','locations','study'
high_level_name : sample, site, location, or study whose
data to which to appl... | [
"Gets",
"the",
"Parameters",
"of",
"a",
"mean",
"of",
"lower",
"level",
"data",
"such",
"as",
"a",
"Site",
"level",
"Fisher",
"mean",
"of",
"Specimen",
"interpretations"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3109-L3184 | train | Get the Parameters of a specific high level mean of the specimen interpretations | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.calculate_mean | def calculate_mean(self, pars_for_mean, calculation_type):
"""
Uses pmag.dolnp or pmag.fisher_by_pol to do a fisher mean or fisher
mean by polarity on the list of dictionaries in pars for mean
Parameters
----------
pars_for_mean : list of dictionaries with all data to av... | python | def calculate_mean(self, pars_for_mean, calculation_type):
"""
Uses pmag.dolnp or pmag.fisher_by_pol to do a fisher mean or fisher
mean by polarity on the list of dictionaries in pars for mean
Parameters
----------
pars_for_mean : list of dictionaries with all data to av... | [
"def",
"calculate_mean",
"(",
"self",
",",
"pars_for_mean",
",",
"calculation_type",
")",
":",
"if",
"len",
"(",
"pars_for_mean",
")",
"==",
"0",
":",
"return",
"(",
"{",
"}",
")",
"elif",
"len",
"(",
"pars_for_mean",
")",
"==",
"1",
":",
"return",
"("... | Uses pmag.dolnp or pmag.fisher_by_pol to do a fisher mean or fisher
mean by polarity on the list of dictionaries in pars for mean
Parameters
----------
pars_for_mean : list of dictionaries with all data to average
calculation_type : type of mean to take (options: Fisher,
... | [
"Uses",
"pmag",
".",
"dolnp",
"or",
"pmag",
".",
"fisher_by_pol",
"to",
"do",
"a",
"fisher",
"mean",
"or",
"fisher",
"mean",
"by",
"polarity",
"on",
"the",
"list",
"of",
"dictionaries",
"in",
"pars",
"for",
"mean"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3219-L3265 | train | Calculates the mean of the in - memory data for a given set of parameters. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.calculate_high_levels_data | def calculate_high_levels_data(self):
"""
calculates high level mean data for the high level mean plot using
information in level_box, level_names, mean_type_box, and
mean_fit_box also updates the information in the ie to match high
level mean data in main GUI.
"""
... | python | def calculate_high_levels_data(self):
"""
calculates high level mean data for the high level mean plot using
information in level_box, level_names, mean_type_box, and
mean_fit_box also updates the information in the ie to match high
level mean data in main GUI.
"""
... | [
"def",
"calculate_high_levels_data",
"(",
"self",
")",
":",
"high_level_type",
"=",
"str",
"(",
"self",
".",
"level_box",
".",
"GetValue",
"(",
")",
")",
"if",
"high_level_type",
"==",
"'sample'",
":",
"high_level_type",
"=",
"'samples'",
"if",
"high_level_type"... | calculates high level mean data for the high level mean plot using
information in level_box, level_names, mean_type_box, and
mean_fit_box also updates the information in the ie to match high
level mean data in main GUI. | [
"calculates",
"high",
"level",
"mean",
"data",
"for",
"the",
"high",
"level",
"mean",
"plot",
"using",
"information",
"in",
"level_box",
"level_names",
"mean_type_box",
"and",
"mean_fit_box",
"also",
"updates",
"the",
"information",
"in",
"the",
"ie",
"to",
"mat... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3307-L3327 | train | Calculates the high level mean data for the high level mean plot using the information in level_box level_names mean_type_box and mean_fit_box. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.quiet_reset_backend | def quiet_reset_backend(self, reset_interps=True):
"""
Doesn't update plots or logger or any visable data but resets all
measurement data, hierarchy data, and optionally resets
intepretations.
Parameters
----------
reset_interps : bool to tell the function to res... | python | def quiet_reset_backend(self, reset_interps=True):
"""
Doesn't update plots or logger or any visable data but resets all
measurement data, hierarchy data, and optionally resets
intepretations.
Parameters
----------
reset_interps : bool to tell the function to res... | [
"def",
"quiet_reset_backend",
"(",
"self",
",",
"reset_interps",
"=",
"True",
")",
":",
"new_Data_info",
"=",
"self",
".",
"get_data_info",
"(",
")",
"new_Data",
",",
"new_Data_hierarchy",
"=",
"self",
".",
"get_data",
"(",
")",
"if",
"not",
"new_Data",
":",... | Doesn't update plots or logger or any visable data but resets all
measurement data, hierarchy data, and optionally resets
intepretations.
Parameters
----------
reset_interps : bool to tell the function to reset fits or
not. | [
"Doesn",
"t",
"update",
"plots",
"or",
"logger",
"or",
"any",
"visable",
"data",
"but",
"resets",
"all",
"measurement",
"data",
"hierarchy",
"data",
"and",
"optionally",
"resets",
"intepretations",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3329-L3397 | train | Resets all the data in the backend to the original data and returns the new data and the new data_info. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.reset_backend | def reset_backend(self, warn_user=True, reset_interps=True):
"""
Resets GUI data and updates GUI displays such as plots, boxes, and
logger
Parameters
----------
warn_user : bool which decides if a warning dialog is displayed to
the user to ask about reseting ... | python | def reset_backend(self, warn_user=True, reset_interps=True):
"""
Resets GUI data and updates GUI displays such as plots, boxes, and
logger
Parameters
----------
warn_user : bool which decides if a warning dialog is displayed to
the user to ask about reseting ... | [
"def",
"reset_backend",
"(",
"self",
",",
"warn_user",
"=",
"True",
",",
"reset_interps",
"=",
"True",
")",
":",
"if",
"warn_user",
"and",
"not",
"self",
".",
"data_loss_warning",
"(",
")",
":",
"return",
"False",
"# reset backend, including get_data(), get_data_i... | Resets GUI data and updates GUI displays such as plots, boxes, and
logger
Parameters
----------
warn_user : bool which decides if a warning dialog is displayed to
the user to ask about reseting data
reset_interps : bool which decides if interpretations are read in
... | [
"Resets",
"GUI",
"data",
"and",
"updates",
"GUI",
"displays",
"such",
"as",
"plots",
"boxes",
"and",
"logger"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3399-L3446 | train | Resets the current backend and updates GUI displays such as plots boxes and GUI displays. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.recalculate_current_specimen_interpreatations | def recalculate_current_specimen_interpreatations(self):
"""
recalculates all interpretations on all specimens for all coordinate
systems. Does not display recalcuated data.
"""
self.initialize_CART_rot(self.s)
if str(self.s) in self.pmag_results_data['specimens']:
... | python | def recalculate_current_specimen_interpreatations(self):
"""
recalculates all interpretations on all specimens for all coordinate
systems. Does not display recalcuated data.
"""
self.initialize_CART_rot(self.s)
if str(self.s) in self.pmag_results_data['specimens']:
... | [
"def",
"recalculate_current_specimen_interpreatations",
"(",
"self",
")",
":",
"self",
".",
"initialize_CART_rot",
"(",
"self",
".",
"s",
")",
"if",
"str",
"(",
"self",
".",
"s",
")",
"in",
"self",
".",
"pmag_results_data",
"[",
"'specimens'",
"]",
":",
"for... | recalculates all interpretations on all specimens for all coordinate
systems. Does not display recalcuated data. | [
"recalculates",
"all",
"interpretations",
"on",
"all",
"specimens",
"for",
"all",
"coordinate",
"systems",
".",
"Does",
"not",
"display",
"recalcuated",
"data",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3448-L3464 | train | recalculates all interpretations on all coordinate systems for all coordinate systems. Does not display recalcuated data. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.parse_bound_data | def parse_bound_data(self, tmin0, tmax0, specimen):
"""
converts Kelvin/Tesla temperature/AF data from the MagIC/Redo format
to that of Celsius/milliTesla which is used by the GUI as it is
often more intuitive
Parameters
----------
tmin0 : the input temperature/A... | python | def parse_bound_data(self, tmin0, tmax0, specimen):
"""
converts Kelvin/Tesla temperature/AF data from the MagIC/Redo format
to that of Celsius/milliTesla which is used by the GUI as it is
often more intuitive
Parameters
----------
tmin0 : the input temperature/A... | [
"def",
"parse_bound_data",
"(",
"self",
",",
"tmin0",
",",
"tmax0",
",",
"specimen",
")",
":",
"if",
"specimen",
"not",
"in",
"self",
".",
"Data",
":",
"print",
"(",
"(",
"\"no measurement data found loaded for specimen %s and will be ignored\"",
"%",
"(",
"specim... | converts Kelvin/Tesla temperature/AF data from the MagIC/Redo format
to that of Celsius/milliTesla which is used by the GUI as it is
often more intuitive
Parameters
----------
tmin0 : the input temperature/AF lower bound value to convert
tmax0 : the input temperature/AF ... | [
"converts",
"Kelvin",
"/",
"Tesla",
"temperature",
"/",
"AF",
"data",
"from",
"the",
"MagIC",
"/",
"Redo",
"format",
"to",
"that",
"of",
"Celsius",
"/",
"milliTesla",
"which",
"is",
"used",
"by",
"the",
"GUI",
"as",
"it",
"is",
"often",
"more",
"intuitiv... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3466-L3522 | train | This function converts the input temperature and upper bound values from the MagIC and Redo format to that of Celsius and MilliTesla which is often more intuitive and returns the minimum and maximum values for the current is
. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.get_indices | def get_indices(self, fit=None, tmin=None, tmax=None, specimen=None):
"""
Finds the appropriate indices in self.Data[self.s]['zijdplot_steps']
given a set of upper/lower bounds. This is to resolve duplicate
steps using the convention that the first good step of that name is
the i... | python | def get_indices(self, fit=None, tmin=None, tmax=None, specimen=None):
"""
Finds the appropriate indices in self.Data[self.s]['zijdplot_steps']
given a set of upper/lower bounds. This is to resolve duplicate
steps using the convention that the first good step of that name is
the i... | [
"def",
"get_indices",
"(",
"self",
",",
"fit",
"=",
"None",
",",
"tmin",
"=",
"None",
",",
"tmax",
"=",
"None",
",",
"specimen",
"=",
"None",
")",
":",
"if",
"specimen",
"==",
"None",
":",
"specimen",
"=",
"self",
".",
"s",
"if",
"fit",
"and",
"n... | Finds the appropriate indices in self.Data[self.s]['zijdplot_steps']
given a set of upper/lower bounds. This is to resolve duplicate
steps using the convention that the first good step of that name is
the indicated step by that bound if there are no steps of the names
tmin or tmax then i... | [
"Finds",
"the",
"appropriate",
"indices",
"in",
"self",
".",
"Data",
"[",
"self",
".",
"s",
"]",
"[",
"zijdplot_steps",
"]",
"given",
"a",
"set",
"of",
"upper",
"/",
"lower",
"bounds",
".",
"This",
"is",
"to",
"resolve",
"duplicate",
"steps",
"using",
... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3524-L3635 | train | Finds the appropriate indices in the order of the indecies in the given order of the indecies in the given specimen. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.merge_pmag_recs | def merge_pmag_recs(self, old_recs):
"""
Takes in a list of dictionaries old_recs and returns a list of
dictionaries where every dictionary in the returned list has the
same keys as all the others.
Parameters
----------
old_recs : list of dictionaries to fix
... | python | def merge_pmag_recs(self, old_recs):
"""
Takes in a list of dictionaries old_recs and returns a list of
dictionaries where every dictionary in the returned list has the
same keys as all the others.
Parameters
----------
old_recs : list of dictionaries to fix
... | [
"def",
"merge_pmag_recs",
"(",
"self",
",",
"old_recs",
")",
":",
"recs",
"=",
"{",
"}",
"recs",
"=",
"deepcopy",
"(",
"old_recs",
")",
"headers",
"=",
"[",
"]",
"for",
"rec",
"in",
"recs",
":",
"for",
"key",
"in",
"list",
"(",
"rec",
".",
"keys",
... | Takes in a list of dictionaries old_recs and returns a list of
dictionaries where every dictionary in the returned list has the
same keys as all the others.
Parameters
----------
old_recs : list of dictionaries to fix
Returns
-------
recs : list of dicti... | [
"Takes",
"in",
"a",
"list",
"of",
"dictionaries",
"old_recs",
"and",
"returns",
"a",
"list",
"of",
"dictionaries",
"where",
"every",
"dictionary",
"in",
"the",
"returned",
"list",
"has",
"the",
"same",
"keys",
"as",
"all",
"the",
"others",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3637-L3662 | train | Merges a list of dictionaries with the keys in the old_recs and returns a list of dictionaries with the same keys as all the others. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.select_specimen | def select_specimen(self, specimen):
"""
Goes through the calculations necessary to plot measurement data for
specimen and sets specimen as current GUI specimen, also attempts to
handle changing current fit.
"""
try:
fit_index = self.pmag_results_data['specime... | python | def select_specimen(self, specimen):
"""
Goes through the calculations necessary to plot measurement data for
specimen and sets specimen as current GUI specimen, also attempts to
handle changing current fit.
"""
try:
fit_index = self.pmag_results_data['specime... | [
"def",
"select_specimen",
"(",
"self",
",",
"specimen",
")",
":",
"try",
":",
"fit_index",
"=",
"self",
".",
"pmag_results_data",
"[",
"'specimens'",
"]",
"[",
"self",
".",
"s",
"]",
".",
"index",
"(",
"self",
".",
"current_fit",
")",
"except",
"KeyError... | Goes through the calculations necessary to plot measurement data for
specimen and sets specimen as current GUI specimen, also attempts to
handle changing current fit. | [
"Goes",
"through",
"the",
"calculations",
"necessary",
"to",
"plot",
"measurement",
"data",
"for",
"specimen",
"and",
"sets",
"specimen",
"as",
"current",
"GUI",
"specimen",
"also",
"attempts",
"to",
"handle",
"changing",
"current",
"fit",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3668-L3692 | train | Selects the specimen and sets the current GUI specimen to the specimen. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.clear_interpretations | def clear_interpretations(self, message=None):
"""
Clears all specimen interpretations
Parameters
----------
message : message to display when warning the user that all
fits will be deleted. If None default message is used (None is
default)
"""
if... | python | def clear_interpretations(self, message=None):
"""
Clears all specimen interpretations
Parameters
----------
message : message to display when warning the user that all
fits will be deleted. If None default message is used (None is
default)
"""
if... | [
"def",
"clear_interpretations",
"(",
"self",
",",
"message",
"=",
"None",
")",
":",
"if",
"self",
".",
"total_num_of_interpertations",
"(",
")",
"==",
"0",
":",
"print",
"(",
"\"There are no interpretations\"",
")",
"return",
"True",
"if",
"message",
"==",
"No... | Clears all specimen interpretations
Parameters
----------
message : message to display when warning the user that all
fits will be deleted. If None default message is used (None is
default) | [
"Clears",
"all",
"specimen",
"interpretations"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3694-L3725 | train | Clears all interpretations in the current directory | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.mark_meas_good | def mark_meas_good(self, g_index):
"""
Marks the g_index'th measuremnt of current specimen good
Parameters
----------
g_index : int that gives the index of the measurement to mark good,
indexed from 0
"""
meas_index, ind_data = 0, []
for i, me... | python | def mark_meas_good(self, g_index):
"""
Marks the g_index'th measuremnt of current specimen good
Parameters
----------
g_index : int that gives the index of the measurement to mark good,
indexed from 0
"""
meas_index, ind_data = 0, []
for i, me... | [
"def",
"mark_meas_good",
"(",
"self",
",",
"g_index",
")",
":",
"meas_index",
",",
"ind_data",
"=",
"0",
",",
"[",
"]",
"for",
"i",
",",
"meas_data",
"in",
"enumerate",
"(",
"self",
".",
"mag_meas_data",
")",
":",
"if",
"meas_data",
"[",
"'er_specimen_na... | Marks the g_index'th measuremnt of current specimen good
Parameters
----------
g_index : int that gives the index of the measurement to mark good,
indexed from 0 | [
"Marks",
"the",
"g_index",
"th",
"measuremnt",
"of",
"current",
"specimen",
"good"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3740-L3776 | train | Mark the g_index'th measuremnt of current specimen good | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.mark_fit_good | def mark_fit_good(self, fit, spec=None):
"""
Marks fit good so it is used in high level means
Parameters
----------
fit : fit to mark good
spec : specimen of fit to mark good (optional though runtime will
increase if not provided)
"""
if spec ... | python | def mark_fit_good(self, fit, spec=None):
"""
Marks fit good so it is used in high level means
Parameters
----------
fit : fit to mark good
spec : specimen of fit to mark good (optional though runtime will
increase if not provided)
"""
if spec ... | [
"def",
"mark_fit_good",
"(",
"self",
",",
"fit",
",",
"spec",
"=",
"None",
")",
":",
"if",
"spec",
"==",
"None",
":",
"for",
"spec",
",",
"fits",
"in",
"list",
"(",
"self",
".",
"pmag_results_data",
"[",
"'specimens'",
"]",
".",
"items",
"(",
")",
... | Marks fit good so it is used in high level means
Parameters
----------
fit : fit to mark good
spec : specimen of fit to mark good (optional though runtime will
increase if not provided) | [
"Marks",
"fit",
"good",
"so",
"it",
"is",
"used",
"in",
"high",
"level",
"means"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3817-L3841 | train | Mark a fit good so it is used in high level means
| GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.mark_fit_bad | def mark_fit_bad(self, fit):
"""
Marks fit bad so it is excluded from high level means
Parameters
----------
fit : fit to mark bad
"""
if fit not in self.bad_fits:
self.bad_fits.append(fit)
return True
else:
return Fals... | python | def mark_fit_bad(self, fit):
"""
Marks fit bad so it is excluded from high level means
Parameters
----------
fit : fit to mark bad
"""
if fit not in self.bad_fits:
self.bad_fits.append(fit)
return True
else:
return Fals... | [
"def",
"mark_fit_bad",
"(",
"self",
",",
"fit",
")",
":",
"if",
"fit",
"not",
"in",
"self",
".",
"bad_fits",
":",
"self",
".",
"bad_fits",
".",
"append",
"(",
"fit",
")",
"return",
"True",
"else",
":",
"return",
"False"
] | Marks fit bad so it is excluded from high level means
Parameters
----------
fit : fit to mark bad | [
"Marks",
"fit",
"bad",
"so",
"it",
"is",
"excluded",
"from",
"high",
"level",
"means"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3843-L3855 | train | Mark a fit bad so it is excluded from high level means
| GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.get_data | def get_data(self):
"""
reads data from current WD measurement.txt or magic_measurements.txt
depending on data model and sorts it into main measurements data
structures given bellow:
Data - {specimen: {
zijdblock:[[treatment temp-str,dec-float, inc-float,
... | python | def get_data(self):
"""
reads data from current WD measurement.txt or magic_measurements.txt
depending on data model and sorts it into main measurements data
structures given bellow:
Data - {specimen: {
zijdblock:[[treatment temp-str,dec-float, inc-float,
... | [
"def",
"get_data",
"(",
"self",
")",
":",
"# ------------------------------------------------",
"# Read magic measurement file and sort to blocks",
"# ------------------------------------------------",
"# All meas data information is stored in Data[secimen]={}",
"Data",
"=",
"{",
"}",
"D... | reads data from current WD measurement.txt or magic_measurements.txt
depending on data model and sorts it into main measurements data
structures given bellow:
Data - {specimen: {
zijdblock:[[treatment temp-str,dec-float, inc-float,
mag_moment-float, ZI-flo... | [
"reads",
"data",
"from",
"current",
"WD",
"measurement",
".",
"txt",
"or",
"magic_measurements",
".",
"txt",
"depending",
"on",
"data",
"model",
"and",
"sorts",
"it",
"into",
"main",
"measurements",
"data",
"structures",
"given",
"bellow",
":",
"Data",
"-",
... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L3861-L4422 | train | Reads data from current WD measurement. txt or magic_measurements. txt and sorts it into main measurements data structures given bellow | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.get_interpretations3 | def get_interpretations3(self):
"""
Used instead of update_pmag_tables in data model 3.0 to fetch
interpretations from contribution objects
"""
if "specimen" not in self.spec_data.columns or \
"meas_step_min" not in self.spec_data.columns or \
"meas_step_max... | python | def get_interpretations3(self):
"""
Used instead of update_pmag_tables in data model 3.0 to fetch
interpretations from contribution objects
"""
if "specimen" not in self.spec_data.columns or \
"meas_step_min" not in self.spec_data.columns or \
"meas_step_max... | [
"def",
"get_interpretations3",
"(",
"self",
")",
":",
"if",
"\"specimen\"",
"not",
"in",
"self",
".",
"spec_data",
".",
"columns",
"or",
"\"meas_step_min\"",
"not",
"in",
"self",
".",
"spec_data",
".",
"columns",
"or",
"\"meas_step_max\"",
"not",
"in",
"self",... | Used instead of update_pmag_tables in data model 3.0 to fetch
interpretations from contribution objects | [
"Used",
"instead",
"of",
"update_pmag_tables",
"in",
"data",
"model",
"3",
".",
"0",
"to",
"fetch",
"interpretations",
"from",
"contribution",
"objects"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L4424-L4495 | train | Get interpretations from contribution objects in data model 3. 0. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.get_data_info | def get_data_info(self):
"""
imports er tables and places data into Data_info data structure
outlined bellow:
Data_info - {er_samples: {er_samples.txt info}
er_sites: {er_sites.txt info}
er_locations: {er_locations.txt info}
... | python | def get_data_info(self):
"""
imports er tables and places data into Data_info data structure
outlined bellow:
Data_info - {er_samples: {er_samples.txt info}
er_sites: {er_sites.txt info}
er_locations: {er_locations.txt info}
... | [
"def",
"get_data_info",
"(",
"self",
")",
":",
"Data_info",
"=",
"{",
"}",
"data_er_samples",
"=",
"{",
"}",
"data_er_sites",
"=",
"{",
"}",
"data_er_locations",
"=",
"{",
"}",
"data_er_ages",
"=",
"{",
"}",
"if",
"self",
".",
"data_model",
"==",
"3.0",
... | imports er tables and places data into Data_info data structure
outlined bellow:
Data_info - {er_samples: {er_samples.txt info}
er_sites: {er_sites.txt info}
er_locations: {er_locations.txt info}
er_ages: {er_ages.txt info}} | [
"imports",
"er",
"tables",
"and",
"places",
"data",
"into",
"Data_info",
"data",
"structure",
"outlined",
"bellow",
":",
"Data_info",
"-",
"{",
"er_samples",
":",
"{",
"er_samples",
".",
"txt",
"info",
"}",
"er_sites",
":",
"{",
"er_sites",
".",
"txt",
"in... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L4497-L4630 | train | Get the data structure of the current instance of the class. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.get_preferences | def get_preferences(self):
"""
Gets preferences for certain display variables from
zeq_gui_preferences.
"""
# default
preferences = {}
preferences['gui_resolution'] = 100.
preferences['show_Zij_treatments'] = True
preferences['show_Zij_treatments_s... | python | def get_preferences(self):
"""
Gets preferences for certain display variables from
zeq_gui_preferences.
"""
# default
preferences = {}
preferences['gui_resolution'] = 100.
preferences['show_Zij_treatments'] = True
preferences['show_Zij_treatments_s... | [
"def",
"get_preferences",
"(",
"self",
")",
":",
"# default",
"preferences",
"=",
"{",
"}",
"preferences",
"[",
"'gui_resolution'",
"]",
"=",
"100.",
"preferences",
"[",
"'show_Zij_treatments'",
"]",
"=",
"True",
"preferences",
"[",
"'show_Zij_treatments_steps'",
... | Gets preferences for certain display variables from
zeq_gui_preferences. | [
"Gets",
"preferences",
"for",
"certain",
"display",
"variables",
"from",
"zeq_gui_preferences",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L4632-L4655 | train | Gets preferences for certain display variables from zeq_gui_preferences. json file. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.read_magic_file | def read_magic_file(self, path, sort_by_this_name):
"""
reads a magic formated data file from path and sorts the keys
according to sort_by_this_name
Parameters
----------
path : path to file to read
sort_by_this_name : variable to sort data by
"""
... | python | def read_magic_file(self, path, sort_by_this_name):
"""
reads a magic formated data file from path and sorts the keys
according to sort_by_this_name
Parameters
----------
path : path to file to read
sort_by_this_name : variable to sort data by
"""
... | [
"def",
"read_magic_file",
"(",
"self",
",",
"path",
",",
"sort_by_this_name",
")",
":",
"DATA",
"=",
"{",
"}",
"try",
":",
"with",
"open",
"(",
"path",
",",
"'r'",
")",
"as",
"finput",
":",
"lines",
"=",
"list",
"(",
"finput",
".",
"readlines",
"(",
... | reads a magic formated data file from path and sorts the keys
according to sort_by_this_name
Parameters
----------
path : path to file to read
sort_by_this_name : variable to sort data by | [
"reads",
"a",
"magic",
"formated",
"data",
"file",
"from",
"path",
"and",
"sorts",
"the",
"keys",
"according",
"to",
"sort_by_this_name"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L4657-L4693 | train | reads a magic formated data file from path and sorts the keysbythis_name according to sort_by_this_name | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.read_from_LSQ | def read_from_LSQ(self, LSQ_file):
"""
Clears all current interpretations and replaces them with
interpretations read from LSQ file.
Parameters
----------
LSQ_file : path to LSQ file to read in
"""
cont = self.user_warning(
"LSQ import only wo... | python | def read_from_LSQ(self, LSQ_file):
"""
Clears all current interpretations and replaces them with
interpretations read from LSQ file.
Parameters
----------
LSQ_file : path to LSQ file to read in
"""
cont = self.user_warning(
"LSQ import only wo... | [
"def",
"read_from_LSQ",
"(",
"self",
",",
"LSQ_file",
")",
":",
"cont",
"=",
"self",
".",
"user_warning",
"(",
"\"LSQ import only works if all measurements are present and not averaged during import from magnetometer files to magic format. Do you wish to continue reading interpretations?... | Clears all current interpretations and replaces them with
interpretations read from LSQ file.
Parameters
----------
LSQ_file : path to LSQ file to read in | [
"Clears",
"all",
"current",
"interpretations",
"and",
"replaces",
"them",
"with",
"interpretations",
"read",
"from",
"LSQ",
"file",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L4695-L4744 | train | Reads interpretations from an LSQ file and replaces them with interpretations read from the magic format. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.read_redo_file | def read_redo_file(self, redo_file):
"""
Reads a .redo formated file and replaces all current interpretations
with interpretations taken from the .redo file
Parameters
----------
redo_file : path to .redo file to read
"""
if not self.clear_interpretations... | python | def read_redo_file(self, redo_file):
"""
Reads a .redo formated file and replaces all current interpretations
with interpretations taken from the .redo file
Parameters
----------
redo_file : path to .redo file to read
"""
if not self.clear_interpretations... | [
"def",
"read_redo_file",
"(",
"self",
",",
"redo_file",
")",
":",
"if",
"not",
"self",
".",
"clear_interpretations",
"(",
")",
":",
"return",
"print",
"(",
"\"-I- read redo file and processing new bounds\"",
")",
"fin",
"=",
"open",
"(",
"redo_file",
",",
"'r'",... | Reads a .redo formated file and replaces all current interpretations
with interpretations taken from the .redo file
Parameters
----------
redo_file : path to .redo file to read | [
"Reads",
"a",
".",
"redo",
"formated",
"file",
"and",
"replaces",
"all",
"current",
"interpretations",
"with",
"interpretations",
"taken",
"from",
"the",
".",
"redo",
"file"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L4746-L4799 | train | Reads a. redo formated file and replaces all current interpretations with interpretations taken from the. redo file. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.change_WD | def change_WD(self, new_WD, meas_file=""):
"""
Changes Demag GUI's current WD to new_WD if possible
Parameters
----------
new_WD : WD to change to current GUI's WD
"""
new_WD = os.path.abspath(new_WD)
if not os.path.isdir(new_WD):
return
... | python | def change_WD(self, new_WD, meas_file=""):
"""
Changes Demag GUI's current WD to new_WD if possible
Parameters
----------
new_WD : WD to change to current GUI's WD
"""
new_WD = os.path.abspath(new_WD)
if not os.path.isdir(new_WD):
return
... | [
"def",
"change_WD",
"(",
"self",
",",
"new_WD",
",",
"meas_file",
"=",
"\"\"",
")",
":",
"new_WD",
"=",
"os",
".",
"path",
".",
"abspath",
"(",
"new_WD",
")",
"if",
"not",
"os",
".",
"path",
".",
"isdir",
"(",
"new_WD",
")",
":",
"return",
"self",
... | Changes Demag GUI's current WD to new_WD if possible
Parameters
----------
new_WD : WD to change to current GUI's WD | [
"Changes",
"Demag",
"GUI",
"s",
"current",
"WD",
"to",
"new_WD",
"if",
"possible"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L4801-L4849 | train | Changes Demag GUI s current WD to new_WD | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.init_log_file | def init_log_file(self):
"""
redirects stdout to a log file to prevent printing to a hanging
terminal when dealing with the compiled binary.
"""
# redirect terminal output
self.old_stdout = sys.stdout
sys.stdout = open(os.path.join(self.WD, "demag_gui.log"), 'w+') | python | def init_log_file(self):
"""
redirects stdout to a log file to prevent printing to a hanging
terminal when dealing with the compiled binary.
"""
# redirect terminal output
self.old_stdout = sys.stdout
sys.stdout = open(os.path.join(self.WD, "demag_gui.log"), 'w+') | [
"def",
"init_log_file",
"(",
"self",
")",
":",
"# redirect terminal output",
"self",
".",
"old_stdout",
"=",
"sys",
".",
"stdout",
"sys",
".",
"stdout",
"=",
"open",
"(",
"os",
".",
"path",
".",
"join",
"(",
"self",
".",
"WD",
",",
"\"demag_gui.log\"",
"... | redirects stdout to a log file to prevent printing to a hanging
terminal when dealing with the compiled binary. | [
"redirects",
"stdout",
"to",
"a",
"log",
"file",
"to",
"prevent",
"printing",
"to",
"a",
"hanging",
"terminal",
"when",
"dealing",
"with",
"the",
"compiled",
"binary",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L4855-L4862 | train | Redirect stdout to a log file to prevent printing to a hanging
terminal when dealing with the compiled binary. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.update_pmag_tables | def update_pmag_tables(self):
"""
Reads pmag tables from data model 2.5 and updates them with updates
their data
"""
pmag_specimens, pmag_samples, pmag_sites = [], [], []
print("-I- Reading previous interpretations from specimen/sample/site tables")
try:
... | python | def update_pmag_tables(self):
"""
Reads pmag tables from data model 2.5 and updates them with updates
their data
"""
pmag_specimens, pmag_samples, pmag_sites = [], [], []
print("-I- Reading previous interpretations from specimen/sample/site tables")
try:
... | [
"def",
"update_pmag_tables",
"(",
"self",
")",
":",
"pmag_specimens",
",",
"pmag_samples",
",",
"pmag_sites",
"=",
"[",
"]",
",",
"[",
"]",
",",
"[",
"]",
"print",
"(",
"\"-I- Reading previous interpretations from specimen/sample/site tables\"",
")",
"try",
":",
"... | Reads pmag tables from data model 2.5 and updates them with updates
their data | [
"Reads",
"pmag",
"tables",
"from",
"data",
"model",
"2",
".",
"5",
"and",
"updates",
"them",
"with",
"updates",
"their",
"data"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L4875-L5038 | train | Reads pmag tables from data model 2. 5 and updates them with updates
their data | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.write_acceptance_criteria_to_file | def write_acceptance_criteria_to_file(self):
"""
Writes current GUI acceptance criteria to criteria.txt or
pmag_criteria.txt depending on data model
"""
crit_list = list(self.acceptance_criteria.keys())
crit_list.sort()
rec = {}
rec['pmag_criteria_code'] =... | python | def write_acceptance_criteria_to_file(self):
"""
Writes current GUI acceptance criteria to criteria.txt or
pmag_criteria.txt depending on data model
"""
crit_list = list(self.acceptance_criteria.keys())
crit_list.sort()
rec = {}
rec['pmag_criteria_code'] =... | [
"def",
"write_acceptance_criteria_to_file",
"(",
"self",
")",
":",
"crit_list",
"=",
"list",
"(",
"self",
".",
"acceptance_criteria",
".",
"keys",
"(",
")",
")",
"crit_list",
".",
"sort",
"(",
")",
"rec",
"=",
"{",
"}",
"rec",
"[",
"'pmag_criteria_code'",
... | Writes current GUI acceptance criteria to criteria.txt or
pmag_criteria.txt depending on data model | [
"Writes",
"current",
"GUI",
"acceptance",
"criteria",
"to",
"criteria",
".",
"txt",
"or",
"pmag_criteria",
".",
"txt",
"depending",
"on",
"data",
"model"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L5040-L5073 | train | Writes current GUI acceptance criteria to criteria. txt or pmag_criteria. txt depending on data model | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.show_dlg | def show_dlg(self, dlg):
"""
Abstraction function that is to be used instead of dlg.ShowModal
Parameters
----------
dlg : dialog to ShowModal if possible
"""
if not self.test_mode:
dlg.Center()
return dlg.ShowModal()
else:
... | python | def show_dlg(self, dlg):
"""
Abstraction function that is to be used instead of dlg.ShowModal
Parameters
----------
dlg : dialog to ShowModal if possible
"""
if not self.test_mode:
dlg.Center()
return dlg.ShowModal()
else:
... | [
"def",
"show_dlg",
"(",
"self",
",",
"dlg",
")",
":",
"if",
"not",
"self",
".",
"test_mode",
":",
"dlg",
".",
"Center",
"(",
")",
"return",
"dlg",
".",
"ShowModal",
"(",
")",
"else",
":",
"return",
"dlg",
".",
"GetAffirmativeId",
"(",
")"
] | Abstraction function that is to be used instead of dlg.ShowModal
Parameters
----------
dlg : dialog to ShowModal if possible | [
"Abstraction",
"function",
"that",
"is",
"to",
"be",
"used",
"instead",
"of",
"dlg",
".",
"ShowModal"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L5079-L5091 | train | This function is used to be used instead of dlg. ShowModal | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.get_DIR | def get_DIR(self):
"""
Dialog that allows user to choose a working directory
"""
dlg = wx.DirDialog(self, "Choose a directory:", defaultPath=self.currentDirectory,
style=wx.DD_DEFAULT_STYLE | wx.DD_NEW_DIR_BUTTON | wx.DD_CHANGE_DIR)
ok = self.show_dlg(d... | python | def get_DIR(self):
"""
Dialog that allows user to choose a working directory
"""
dlg = wx.DirDialog(self, "Choose a directory:", defaultPath=self.currentDirectory,
style=wx.DD_DEFAULT_STYLE | wx.DD_NEW_DIR_BUTTON | wx.DD_CHANGE_DIR)
ok = self.show_dlg(d... | [
"def",
"get_DIR",
"(",
"self",
")",
":",
"dlg",
"=",
"wx",
".",
"DirDialog",
"(",
"self",
",",
"\"Choose a directory:\"",
",",
"defaultPath",
"=",
"self",
".",
"currentDirectory",
",",
"style",
"=",
"wx",
".",
"DD_DEFAULT_STYLE",
"|",
"wx",
".",
"DD_NEW_DI... | Dialog that allows user to choose a working directory | [
"Dialog",
"that",
"allows",
"user",
"to",
"choose",
"a",
"working",
"directory"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L5093-L5106 | train | Show a dialog that allows user to choose a working directory | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.choose_meas_file | def choose_meas_file(self, event=None):
"""
Opens a dialog allowing the user to pick a measurement file
"""
dlg = wx.FileDialog(
self, message="Please choose a measurement file",
defaultDir=self.WD,
defaultFile="measurements.txt",
wildcard=... | python | def choose_meas_file(self, event=None):
"""
Opens a dialog allowing the user to pick a measurement file
"""
dlg = wx.FileDialog(
self, message="Please choose a measurement file",
defaultDir=self.WD,
defaultFile="measurements.txt",
wildcard=... | [
"def",
"choose_meas_file",
"(",
"self",
",",
"event",
"=",
"None",
")",
":",
"dlg",
"=",
"wx",
".",
"FileDialog",
"(",
"self",
",",
"message",
"=",
"\"Please choose a measurement file\"",
",",
"defaultDir",
"=",
"self",
".",
"WD",
",",
"defaultFile",
"=",
... | Opens a dialog allowing the user to pick a measurement file | [
"Opens",
"a",
"dialog",
"allowing",
"the",
"user",
"to",
"pick",
"a",
"measurement",
"file"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L5108-L5126 | train | Opens a dialog allowing the user to choose a measurement file | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.saved_dlg | def saved_dlg(self, message, caption='Saved:'):
"""
Shows a dialog that tells the user that a file has been saved
Parameters
----------
message : message to display to user
caption : title for dialog (default: "Saved:")
"""
dlg = wx.MessageDialog(self, ca... | python | def saved_dlg(self, message, caption='Saved:'):
"""
Shows a dialog that tells the user that a file has been saved
Parameters
----------
message : message to display to user
caption : title for dialog (default: "Saved:")
"""
dlg = wx.MessageDialog(self, ca... | [
"def",
"saved_dlg",
"(",
"self",
",",
"message",
",",
"caption",
"=",
"'Saved:'",
")",
":",
"dlg",
"=",
"wx",
".",
"MessageDialog",
"(",
"self",
",",
"caption",
"=",
"caption",
",",
"message",
"=",
"message",
",",
"style",
"=",
"wx",
".",
"OK",
")",
... | Shows a dialog that tells the user that a file has been saved
Parameters
----------
message : message to display to user
caption : title for dialog (default: "Saved:") | [
"Shows",
"a",
"dialog",
"that",
"tells",
"the",
"user",
"that",
"a",
"file",
"has",
"been",
"saved"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L5128-L5140 | train | Show a dialog that tells the user that a file has been saved | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.user_warning | def user_warning(self, message, caption='Warning!'):
"""
Shows a dialog that warns the user about some action
Parameters
----------
message : message to display to user
caption : title for dialog (default: "Warning!")
Returns
-------
continue_boo... | python | def user_warning(self, message, caption='Warning!'):
"""
Shows a dialog that warns the user about some action
Parameters
----------
message : message to display to user
caption : title for dialog (default: "Warning!")
Returns
-------
continue_boo... | [
"def",
"user_warning",
"(",
"self",
",",
"message",
",",
"caption",
"=",
"'Warning!'",
")",
":",
"dlg",
"=",
"wx",
".",
"MessageDialog",
"(",
"self",
",",
"message",
",",
"caption",
",",
"wx",
".",
"OK",
"|",
"wx",
".",
"CANCEL",
"|",
"wx",
".",
"I... | Shows a dialog that warns the user about some action
Parameters
----------
message : message to display to user
caption : title for dialog (default: "Warning!")
Returns
-------
continue_bool : True or False | [
"Shows",
"a",
"dialog",
"that",
"warns",
"the",
"user",
"about",
"some",
"action"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L5142-L5162 | train | Shows a dialog that warns the user about some action | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.on_close_criteria_box | def on_close_criteria_box(self, dia):
"""
Function called on close of change acceptance criteria dialog that
writes new criteria to the hardrive and sets new criteria as GUI's
current criteria.
Parameters
----------
dia : closed change criteria dialog
"""... | python | def on_close_criteria_box(self, dia):
"""
Function called on close of change acceptance criteria dialog that
writes new criteria to the hardrive and sets new criteria as GUI's
current criteria.
Parameters
----------
dia : closed change criteria dialog
"""... | [
"def",
"on_close_criteria_box",
"(",
"self",
",",
"dia",
")",
":",
"window_list_specimens",
"=",
"[",
"'specimen_n'",
",",
"'specimen_mad'",
",",
"'specimen_dang'",
",",
"'specimen_alpha95'",
"]",
"window_list_samples",
"=",
"[",
"'sample_n'",
",",
"'sample_n_lines'",... | Function called on close of change acceptance criteria dialog that
writes new criteria to the hardrive and sets new criteria as GUI's
current criteria.
Parameters
----------
dia : closed change criteria dialog | [
"Function",
"called",
"on",
"close",
"of",
"change",
"acceptance",
"criteria",
"dialog",
"that",
"writes",
"new",
"criteria",
"to",
"the",
"hardrive",
"and",
"sets",
"new",
"criteria",
"as",
"GUI",
"s",
"current",
"criteria",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L5171-L5249 | train | Function called when a close of change acceptance criteria dialog is shown. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.show_crit_window_err_messege | def show_crit_window_err_messege(self, crit):
"""
error message if a valid naumber is not entered to criteria dialog
boxes
"""
dlg = wx.MessageDialog(
self, caption="Error:", message="not a vaild value for statistic %s\n ignoring value" % crit, style=wx.OK)
re... | python | def show_crit_window_err_messege(self, crit):
"""
error message if a valid naumber is not entered to criteria dialog
boxes
"""
dlg = wx.MessageDialog(
self, caption="Error:", message="not a vaild value for statistic %s\n ignoring value" % crit, style=wx.OK)
re... | [
"def",
"show_crit_window_err_messege",
"(",
"self",
",",
"crit",
")",
":",
"dlg",
"=",
"wx",
".",
"MessageDialog",
"(",
"self",
",",
"caption",
"=",
"\"Error:\"",
",",
"message",
"=",
"\"not a vaild value for statistic %s\\n ignoring value\"",
"%",
"crit",
",",
"s... | error message if a valid naumber is not entered to criteria dialog
boxes | [
"error",
"message",
"if",
"a",
"valid",
"naumber",
"is",
"not",
"entered",
"to",
"criteria",
"dialog",
"boxes"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L5251-L5260 | train | show a dialog to show a message if a valid naumber is not entered to criteria dialog
box | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.On_close_MagIC_dialog | def On_close_MagIC_dialog(self, dia):
"""
Function called after save high level pmag table dialog. It
calculates VGPs, high level means, and saves them the hard drive.
Parameters
----------
dia : save higher level pmag tables
"""
def add_missing_ages(df)... | python | def On_close_MagIC_dialog(self, dia):
"""
Function called after save high level pmag table dialog. It
calculates VGPs, high level means, and saves them the hard drive.
Parameters
----------
dia : save higher level pmag tables
"""
def add_missing_ages(df)... | [
"def",
"On_close_MagIC_dialog",
"(",
"self",
",",
"dia",
")",
":",
"def",
"add_missing_ages",
"(",
"df",
")",
":",
"\"\"\"\n Take a dataframe and add min/max age, age, age_sigma, age_units.\n Use values gained from dialog, but don't overwrite values already\n ... | Function called after save high level pmag table dialog. It
calculates VGPs, high level means, and saves them the hard drive.
Parameters
----------
dia : save higher level pmag tables | [
"Function",
"called",
"after",
"save",
"high",
"level",
"pmag",
"table",
"dialog",
".",
"It",
"calculates",
"VGPs",
"high",
"level",
"means",
"and",
"saves",
"them",
"the",
"hard",
"drive",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L5262-L6042 | train | Function called when the user closes the MagIC dialog. It calculates VGPs and saves them the hard drive. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.update_selection | def update_selection(self):
"""
Convenience function update display (figures, text boxes and
statistics windows) with a new selection of specimen
"""
self.clear_boxes()
# commented out to allow propogation of higher level viewing state
self.clear_high_level_pars(... | python | def update_selection(self):
"""
Convenience function update display (figures, text boxes and
statistics windows) with a new selection of specimen
"""
self.clear_boxes()
# commented out to allow propogation of higher level viewing state
self.clear_high_level_pars(... | [
"def",
"update_selection",
"(",
"self",
")",
":",
"self",
".",
"clear_boxes",
"(",
")",
"# commented out to allow propogation of higher level viewing state",
"self",
".",
"clear_high_level_pars",
"(",
")",
"if",
"self",
".",
"UPPER_LEVEL_SHOW",
"!=",
"\"specimens\"",
":... | Convenience function update display (figures, text boxes and
statistics windows) with a new selection of specimen | [
"Convenience",
"function",
"update",
"display",
"(",
"figures",
"text",
"boxes",
"and",
"statistics",
"windows",
")",
"with",
"a",
"new",
"selection",
"of",
"specimen"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L6067-L6153 | train | Update the selection of the current specimen and its high level boxes and statistics windows. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.update_warning_box | def update_warning_box(self):
"""
updates the warning box with whatever the warning_text variable
contains for this specimen
"""
self.warning_box.Clear()
if self.warning_text == "":
self.warning_box.AppendText("No Problems")
else:
self.warn... | python | def update_warning_box(self):
"""
updates the warning box with whatever the warning_text variable
contains for this specimen
"""
self.warning_box.Clear()
if self.warning_text == "":
self.warning_box.AppendText("No Problems")
else:
self.warn... | [
"def",
"update_warning_box",
"(",
"self",
")",
":",
"self",
".",
"warning_box",
".",
"Clear",
"(",
")",
"if",
"self",
".",
"warning_text",
"==",
"\"\"",
":",
"self",
".",
"warning_box",
".",
"AppendText",
"(",
"\"No Problems\"",
")",
"else",
":",
"self",
... | updates the warning box with whatever the warning_text variable
contains for this specimen | [
"updates",
"the",
"warning",
"box",
"with",
"whatever",
"the",
"warning_text",
"variable",
"contains",
"for",
"this",
"specimen"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L6155-L6164 | train | Updates the warning box with the current warning_text variable. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.update_GUI_with_new_interpretation | def update_GUI_with_new_interpretation(self):
"""
update statistics boxes and figures with a new interpretatiom when
selecting new temperature bound
"""
self.update_fit_bounds_and_statistics()
self.draw_interpretations()
self.calculate_high_levels_data()
... | python | def update_GUI_with_new_interpretation(self):
"""
update statistics boxes and figures with a new interpretatiom when
selecting new temperature bound
"""
self.update_fit_bounds_and_statistics()
self.draw_interpretations()
self.calculate_high_levels_data()
... | [
"def",
"update_GUI_with_new_interpretation",
"(",
"self",
")",
":",
"self",
".",
"update_fit_bounds_and_statistics",
"(",
")",
"self",
".",
"draw_interpretations",
"(",
")",
"self",
".",
"calculate_high_levels_data",
"(",
")",
"self",
".",
"plot_high_levels_data",
"("... | update statistics boxes and figures with a new interpretatiom when
selecting new temperature bound | [
"update",
"statistics",
"boxes",
"and",
"figures",
"with",
"a",
"new",
"interpretatiom",
"when",
"selecting",
"new",
"temperature",
"bound"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L6166-L6175 | train | update statistics boxes and figures with a new interpretatiom when selecting new temperature bound | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.update_high_level_stats | def update_high_level_stats(self):
"""
updates high level statistics in bottom left of GUI.
"""
self.clear_high_level_pars()
dirtype = str(self.coordinates_box.GetValue())
if dirtype == 'specimen':
dirtype = 'DA-DIR'
elif dirtype == 'geographic':
... | python | def update_high_level_stats(self):
"""
updates high level statistics in bottom left of GUI.
"""
self.clear_high_level_pars()
dirtype = str(self.coordinates_box.GetValue())
if dirtype == 'specimen':
dirtype = 'DA-DIR'
elif dirtype == 'geographic':
... | [
"def",
"update_high_level_stats",
"(",
"self",
")",
":",
"self",
".",
"clear_high_level_pars",
"(",
")",
"dirtype",
"=",
"str",
"(",
"self",
".",
"coordinates_box",
".",
"GetValue",
"(",
")",
")",
"if",
"dirtype",
"==",
"'specimen'",
":",
"dirtype",
"=",
"... | updates high level statistics in bottom left of GUI. | [
"updates",
"high",
"level",
"statistics",
"in",
"bottom",
"left",
"of",
"GUI",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L6251-L6302 | train | Updates the high level statistics in bottom left of GUI. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.update_bounds_boxes | def update_bounds_boxes(self):
"""
updates bounds boxes with bounds of current specimen and fit
"""
if self.s not in list(self.Data.keys()):
self.select_specimen(list(self.Data.keys())[0])
self.T_list = self.Data[self.s]['zijdblock_steps']
if self.current_fit:... | python | def update_bounds_boxes(self):
"""
updates bounds boxes with bounds of current specimen and fit
"""
if self.s not in list(self.Data.keys()):
self.select_specimen(list(self.Data.keys())[0])
self.T_list = self.Data[self.s]['zijdblock_steps']
if self.current_fit:... | [
"def",
"update_bounds_boxes",
"(",
"self",
")",
":",
"if",
"self",
".",
"s",
"not",
"in",
"list",
"(",
"self",
".",
"Data",
".",
"keys",
"(",
")",
")",
":",
"self",
".",
"select_specimen",
"(",
"list",
"(",
"self",
".",
"Data",
".",
"keys",
"(",
... | updates bounds boxes with bounds of current specimen and fit | [
"updates",
"bounds",
"boxes",
"with",
"bounds",
"of",
"current",
"specimen",
"and",
"fit"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L6304-L6318 | train | Updates bounds boxes with current specimen and fit. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.update_PCA_box | def update_PCA_box(self):
"""
updates PCA box with current fit's PCA type
"""
if self.s in list(self.pmag_results_data['specimens'].keys()):
if self.current_fit:
tmin = self.current_fit.tmin
tmax = self.current_fit.tmax
calcula... | python | def update_PCA_box(self):
"""
updates PCA box with current fit's PCA type
"""
if self.s in list(self.pmag_results_data['specimens'].keys()):
if self.current_fit:
tmin = self.current_fit.tmin
tmax = self.current_fit.tmax
calcula... | [
"def",
"update_PCA_box",
"(",
"self",
")",
":",
"if",
"self",
".",
"s",
"in",
"list",
"(",
"self",
".",
"pmag_results_data",
"[",
"'specimens'",
"]",
".",
"keys",
"(",
")",
")",
":",
"if",
"self",
".",
"current_fit",
":",
"tmin",
"=",
"self",
".",
... | updates PCA box with current fit's PCA type | [
"updates",
"PCA",
"box",
"with",
"current",
"fit",
"s",
"PCA",
"type"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L6320-L6348 | train | updates PCA box with current fit s PCA type | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.update_fit_boxes | def update_fit_boxes(self, new_fit=False):
"""
alters fit_box and mean_fit_box lists to match with changes in
specimen or new/removed interpretations
Parameters
----------
new_fit : boolean representing if there is a new fit
Alters
------
fit_box... | python | def update_fit_boxes(self, new_fit=False):
"""
alters fit_box and mean_fit_box lists to match with changes in
specimen or new/removed interpretations
Parameters
----------
new_fit : boolean representing if there is a new fit
Alters
------
fit_box... | [
"def",
"update_fit_boxes",
"(",
"self",
",",
"new_fit",
"=",
"False",
")",
":",
"# update the fit box",
"self",
".",
"update_fit_box",
"(",
"new_fit",
")",
"# select new fit",
"self",
".",
"on_select_fit",
"(",
"None",
")",
"# update the high level fits box",
"self"... | alters fit_box and mean_fit_box lists to match with changes in
specimen or new/removed interpretations
Parameters
----------
new_fit : boolean representing if there is a new fit
Alters
------
fit_box selection, tmin_box selection, tmax_box selection,
mea... | [
"alters",
"fit_box",
"and",
"mean_fit_box",
"lists",
"to",
"match",
"with",
"changes",
"in",
"specimen",
"or",
"new",
"/",
"removed",
"interpretations"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L6350-L6369 | train | Updates the fit box and mean fit box lists to match with changes in the specimen or new or removed interpretations in
. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.update_fit_box | def update_fit_box(self, new_fit=False):
"""
alters fit_box lists to match with changes in specimen or new/
removed interpretations
Parameters
----------
new_fit : boolean representing if there is a new fit
Alters
------
fit_box selection and cho... | python | def update_fit_box(self, new_fit=False):
"""
alters fit_box lists to match with changes in specimen or new/
removed interpretations
Parameters
----------
new_fit : boolean representing if there is a new fit
Alters
------
fit_box selection and cho... | [
"def",
"update_fit_box",
"(",
"self",
",",
"new_fit",
"=",
"False",
")",
":",
"# get new fit data",
"if",
"self",
".",
"s",
"in",
"list",
"(",
"self",
".",
"pmag_results_data",
"[",
"'specimens'",
"]",
".",
"keys",
"(",
")",
")",
":",
"self",
".",
"fit... | alters fit_box lists to match with changes in specimen or new/
removed interpretations
Parameters
----------
new_fit : boolean representing if there is a new fit
Alters
------
fit_box selection and choices, current_fit | [
"alters",
"fit_box",
"lists",
"to",
"match",
"with",
"changes",
"in",
"specimen",
"or",
"new",
"/",
"removed",
"interpretations"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L6371-L6409 | train | Update the fit_box with the new values from specimen or new | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.update_mean_fit_box | def update_mean_fit_box(self):
"""
alters mean_fit_box list to match with changes in specimen or new/
removed interpretations
Alters
------
mean_fit_box selection and choices, mean_types_box string selection
"""
self.mean_fit_box.Clear()
# update ... | python | def update_mean_fit_box(self):
"""
alters mean_fit_box list to match with changes in specimen or new/
removed interpretations
Alters
------
mean_fit_box selection and choices, mean_types_box string selection
"""
self.mean_fit_box.Clear()
# update ... | [
"def",
"update_mean_fit_box",
"(",
"self",
")",
":",
"self",
".",
"mean_fit_box",
".",
"Clear",
"(",
")",
"# update high level mean fit box",
"fit_index",
"=",
"None",
"if",
"self",
".",
"mean_fit",
"in",
"self",
".",
"all_fits_list",
":",
"fit_index",
"=",
"s... | alters mean_fit_box list to match with changes in specimen or new/
removed interpretations
Alters
------
mean_fit_box selection and choices, mean_types_box string selection | [
"alters",
"mean_fit_box",
"list",
"to",
"match",
"with",
"changes",
"in",
"specimen",
"or",
"new",
"/",
"removed",
"interpretations"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L6411-L6451 | train | Updates the high level mean fit box and the menu for the current entry. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.show_high_levels_pars | def show_high_levels_pars(self, mpars):
"""
shows in the high level mean display area in the bottom left of the
GUI the data in mpars.
"""
FONT_WEIGHT = self.GUI_RESOLUTION+(self.GUI_RESOLUTION-1)*5
font2 = wx.Font(12+min(1, FONT_WEIGHT), wx.SWISS,
... | python | def show_high_levels_pars(self, mpars):
"""
shows in the high level mean display area in the bottom left of the
GUI the data in mpars.
"""
FONT_WEIGHT = self.GUI_RESOLUTION+(self.GUI_RESOLUTION-1)*5
font2 = wx.Font(12+min(1, FONT_WEIGHT), wx.SWISS,
... | [
"def",
"show_high_levels_pars",
"(",
"self",
",",
"mpars",
")",
":",
"FONT_WEIGHT",
"=",
"self",
".",
"GUI_RESOLUTION",
"+",
"(",
"self",
".",
"GUI_RESOLUTION",
"-",
"1",
")",
"*",
"5",
"font2",
"=",
"wx",
".",
"Font",
"(",
"12",
"+",
"min",
"(",
"1"... | shows in the high level mean display area in the bottom left of the
GUI the data in mpars. | [
"shows",
"in",
"the",
"high",
"level",
"mean",
"display",
"area",
"in",
"the",
"bottom",
"left",
"of",
"the",
"GUI",
"the",
"data",
"in",
"mpars",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L6466-L6538 | train | shows in the bottom left of the high level mean display area in the bottom left of the main window | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.clear_boxes | def clear_boxes(self):
"""
Clear all boxes
"""
self.tmin_box.Clear()
self.tmin_box.SetStringSelection("")
if self.current_fit:
self.tmin_box.SetItems(self.T_list)
self.tmin_box.SetSelection(-1)
self.tmax_box.Clear()
self.tmax_box.S... | python | def clear_boxes(self):
"""
Clear all boxes
"""
self.tmin_box.Clear()
self.tmin_box.SetStringSelection("")
if self.current_fit:
self.tmin_box.SetItems(self.T_list)
self.tmin_box.SetSelection(-1)
self.tmax_box.Clear()
self.tmax_box.S... | [
"def",
"clear_boxes",
"(",
"self",
")",
":",
"self",
".",
"tmin_box",
".",
"Clear",
"(",
")",
"self",
".",
"tmin_box",
".",
"SetStringSelection",
"(",
"\"\"",
")",
"if",
"self",
".",
"current_fit",
":",
"self",
".",
"tmin_box",
".",
"SetItems",
"(",
"s... | Clear all boxes | [
"Clear",
"all",
"boxes"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L6555-L6581 | train | Clear all boxes in the current directory | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.clear_high_level_pars | def clear_high_level_pars(self):
"""
clears all high level pars display boxes
"""
for val in ['mean_type', 'dec', 'inc', 'alpha95', 'K', 'R', 'n_lines', 'n_planes']:
COMMAND = """self.%s_window.SetValue("")""" % (val)
exec(COMMAND)
if self.ie_open:
... | python | def clear_high_level_pars(self):
"""
clears all high level pars display boxes
"""
for val in ['mean_type', 'dec', 'inc', 'alpha95', 'K', 'R', 'n_lines', 'n_planes']:
COMMAND = """self.%s_window.SetValue("")""" % (val)
exec(COMMAND)
if self.ie_open:
... | [
"def",
"clear_high_level_pars",
"(",
"self",
")",
":",
"for",
"val",
"in",
"[",
"'mean_type'",
",",
"'dec'",
",",
"'inc'",
",",
"'alpha95'",
",",
"'K'",
",",
"'R'",
",",
"'n_lines'",
",",
"'n_planes'",
"]",
":",
"COMMAND",
"=",
"\"\"\"self.%s_window.SetValue... | clears all high level pars display boxes | [
"clears",
"all",
"high",
"level",
"pars",
"display",
"boxes"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L6583-L6594 | train | Clears all high level pars display boxes | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.on_menu_make_MagIC_results_tables | def on_menu_make_MagIC_results_tables(self, event):
"""
Creates or Updates Specimens or Pmag Specimens MagIC table,
overwrites .redo file for safety, and starts User dialog to
generate other MagIC tables for later contribution to the MagIC
database. The following describes th... | python | def on_menu_make_MagIC_results_tables(self, event):
"""
Creates or Updates Specimens or Pmag Specimens MagIC table,
overwrites .redo file for safety, and starts User dialog to
generate other MagIC tables for later contribution to the MagIC
database. The following describes th... | [
"def",
"on_menu_make_MagIC_results_tables",
"(",
"self",
",",
"event",
")",
":",
"# ---------------------------------------",
"# save pmag_*.txt.tmp without directional data",
"# ---------------------------------------",
"self",
".",
"on_menu_save_interpretation",
"(",
"None",
")",
... | Creates or Updates Specimens or Pmag Specimens MagIC table,
overwrites .redo file for safety, and starts User dialog to
generate other MagIC tables for later contribution to the MagIC
database. The following describes the steps used in the 2.5 data
format to do this:
1. rea... | [
"Creates",
"or",
"Updates",
"Specimens",
"or",
"Pmag",
"Specimens",
"MagIC",
"table",
"overwrites",
".",
"redo",
"file",
"for",
"safety",
"and",
"starts",
"User",
"dialog",
"to",
"generate",
"other",
"MagIC",
"tables",
"for",
"later",
"contribution",
"to",
"th... | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L6630-L6929 | train | Creates or updates MagIC tables for later contribution to the MagIC results table. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.on_menu_import_meas_file | def on_menu_import_meas_file(self, event):
"""
Open measurement file, reset self.magic_file
and self.WD, and reset everything.
"""
# use new measurement file and corresponding WD
meas_file = self.choose_meas_file()
WD = os.path.split(meas_file)[0]
self.WD ... | python | def on_menu_import_meas_file(self, event):
"""
Open measurement file, reset self.magic_file
and self.WD, and reset everything.
"""
# use new measurement file and corresponding WD
meas_file = self.choose_meas_file()
WD = os.path.split(meas_file)[0]
self.WD ... | [
"def",
"on_menu_import_meas_file",
"(",
"self",
",",
"event",
")",
":",
"# use new measurement file and corresponding WD",
"meas_file",
"=",
"self",
".",
"choose_meas_file",
"(",
")",
"WD",
"=",
"os",
".",
"path",
".",
"split",
"(",
"meas_file",
")",
"[",
"0",
... | Open measurement file, reset self.magic_file
and self.WD, and reset everything. | [
"Open",
"measurement",
"file",
"reset",
"self",
".",
"magic_file",
"and",
"self",
".",
"WD",
"and",
"reset",
"everything",
"."
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L7018-L7029 | train | Open measurement file reset self. magic_file and self. WD reset everything. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.on_menu_criteria_file | def on_menu_criteria_file(self, event):
"""
read pmag_criteria.txt file
and open changecriteria dialog
"""
if self.data_model == 3:
default_file = "criteria.txt"
else:
default_file = "pmag_criteria.txt"
read_sucsess = False
dlg = wx... | python | def on_menu_criteria_file(self, event):
"""
read pmag_criteria.txt file
and open changecriteria dialog
"""
if self.data_model == 3:
default_file = "criteria.txt"
else:
default_file = "pmag_criteria.txt"
read_sucsess = False
dlg = wx... | [
"def",
"on_menu_criteria_file",
"(",
"self",
",",
"event",
")",
":",
"if",
"self",
".",
"data_model",
"==",
"3",
":",
"default_file",
"=",
"\"criteria.txt\"",
"else",
":",
"default_file",
"=",
"\"pmag_criteria.txt\"",
"read_sucsess",
"=",
"False",
"dlg",
"=",
... | read pmag_criteria.txt file
and open changecriteria dialog | [
"read",
"pmag_criteria",
".",
"txt",
"file",
"and",
"open",
"changecriteria",
"dialog"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L7281-L7319 | train | read pmag_criteria. txt file and open changecriteria dialog | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.right_click_zijderveld | def right_click_zijderveld(self, event):
"""
toggles between zoom and pan effects for the zijderveld on right
click
Parameters
----------
event : the wx.MouseEvent that triggered the call of this function
Alters
------
zijderveld_setting, toolbar... | python | def right_click_zijderveld(self, event):
"""
toggles between zoom and pan effects for the zijderveld on right
click
Parameters
----------
event : the wx.MouseEvent that triggered the call of this function
Alters
------
zijderveld_setting, toolbar... | [
"def",
"right_click_zijderveld",
"(",
"self",
",",
"event",
")",
":",
"if",
"event",
".",
"LeftIsDown",
"(",
")",
"or",
"event",
".",
"ButtonDClick",
"(",
")",
":",
"return",
"elif",
"self",
".",
"zijderveld_setting",
"==",
"\"Zoom\"",
":",
"self",
".",
... | toggles between zoom and pan effects for the zijderveld on right
click
Parameters
----------
event : the wx.MouseEvent that triggered the call of this function
Alters
------
zijderveld_setting, toolbar1 setting | [
"toggles",
"between",
"zoom",
"and",
"pan",
"effects",
"for",
"the",
"zijderveld",
"on",
"right",
"click"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L7511-L7537 | train | Right click the zijderveld on the right of the iTunes instance | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.on_change_zijd_mouse_cursor | def on_change_zijd_mouse_cursor(self, event):
"""
If mouse is over data point making it selectable change the shape of
the cursor
Parameters
----------
event : the wx Mouseevent for that click
"""
if not array(self.CART_rot).any():
return
... | python | def on_change_zijd_mouse_cursor(self, event):
"""
If mouse is over data point making it selectable change the shape of
the cursor
Parameters
----------
event : the wx Mouseevent for that click
"""
if not array(self.CART_rot).any():
return
... | [
"def",
"on_change_zijd_mouse_cursor",
"(",
"self",
",",
"event",
")",
":",
"if",
"not",
"array",
"(",
"self",
".",
"CART_rot",
")",
".",
"any",
"(",
")",
":",
"return",
"pos",
"=",
"event",
".",
"GetPosition",
"(",
")",
"width",
",",
"height",
"=",
"... | If mouse is over data point making it selectable change the shape of
the cursor
Parameters
----------
event : the wx Mouseevent for that click | [
"If",
"mouse",
"is",
"over",
"data",
"point",
"making",
"it",
"selectable",
"change",
"the",
"shape",
"of",
"the",
"cursor"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L7557-L7589 | train | Handles mouse cursor events for the zijd area | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.on_zijd_select | def on_zijd_select(self, event):
"""
Get mouse position on double click find the nearest interpretation
to the mouse
position then select that interpretation
Parameters
----------
event : the wx Mouseevent for that click
Alters
------
cur... | python | def on_zijd_select(self, event):
"""
Get mouse position on double click find the nearest interpretation
to the mouse
position then select that interpretation
Parameters
----------
event : the wx Mouseevent for that click
Alters
------
cur... | [
"def",
"on_zijd_select",
"(",
"self",
",",
"event",
")",
":",
"if",
"not",
"array",
"(",
"self",
".",
"CART_rot_good",
")",
".",
"any",
"(",
")",
":",
"return",
"pos",
"=",
"event",
".",
"GetPosition",
"(",
")",
"width",
",",
"height",
"=",
"self",
... | Get mouse position on double click find the nearest interpretation
to the mouse
position then select that interpretation
Parameters
----------
event : the wx Mouseevent for that click
Alters
------
current_fit | [
"Get",
"mouse",
"position",
"on",
"double",
"click",
"find",
"the",
"nearest",
"interpretation",
"to",
"the",
"mouse",
"position",
"then",
"select",
"that",
"interpretation"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L7591-L7635 | train | Select the nearest interpretation to the mouse position on double click. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
PmagPy/PmagPy | programs/demag_gui.py | Demag_GUI.on_zijd_mark | def on_zijd_mark(self, event):
"""
Get mouse position on double right click find the interpretation in
range of mouse
position then mark that interpretation bad or good
Parameters
----------
event : the wx Mouseevent for that click
Alters
------
... | python | def on_zijd_mark(self, event):
"""
Get mouse position on double right click find the interpretation in
range of mouse
position then mark that interpretation bad or good
Parameters
----------
event : the wx Mouseevent for that click
Alters
------
... | [
"def",
"on_zijd_mark",
"(",
"self",
",",
"event",
")",
":",
"if",
"not",
"array",
"(",
"self",
".",
"CART_rot",
")",
".",
"any",
"(",
")",
":",
"return",
"pos",
"=",
"event",
".",
"GetPosition",
"(",
")",
"width",
",",
"height",
"=",
"self",
".",
... | Get mouse position on double right click find the interpretation in
range of mouse
position then mark that interpretation bad or good
Parameters
----------
event : the wx Mouseevent for that click
Alters
------
current_fit | [
"Get",
"mouse",
"position",
"on",
"double",
"right",
"click",
"find",
"the",
"interpretation",
"in",
"range",
"of",
"mouse",
"position",
"then",
"mark",
"that",
"interpretation",
"bad",
"or",
"good"
] | c7984f8809bf40fe112e53dcc311a33293b62d0b | https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/demag_gui.py#L7637-L7685 | train | Mark the interpretation in the current interpretation for that mouse position and mark that interpretation bad or good | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJU... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.