repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
PmagPy/PmagPy
pmagpy/pmag.py
initialize_acceptance_criteria
def initialize_acceptance_criteria(**kwargs): ''' initialize acceptance criteria with NULL values for thellier_gui and demag_gui acceptance criteria format is doctionaries: acceptance_criteria={} acceptance_criteria[crit]={} acceptance_criteria[crit]['category']= accept...
python
def initialize_acceptance_criteria(**kwargs): ''' initialize acceptance criteria with NULL values for thellier_gui and demag_gui acceptance criteria format is doctionaries: acceptance_criteria={} acceptance_criteria[crit]={} acceptance_criteria[crit]['category']= accept...
[ "def", "initialize_acceptance_criteria", "(", "*", "*", "kwargs", ")", ":", "acceptance_criteria", "=", "{", "}", "# --------------------------------", "# 'DE-SPEC'", "# --------------------------------", "# low cutoff value", "category", "=", "'DE-SPEC'", "for", "crit", "i...
initialize acceptance criteria with NULL values for thellier_gui and demag_gui acceptance criteria format is doctionaries: acceptance_criteria={} acceptance_criteria[crit]={} acceptance_criteria[crit]['category']= acceptance_criteria[crit]['criterion_name']= accepta...
[ "initialize", "acceptance", "criteria", "with", "NULL", "values", "for", "thellier_gui", "and", "demag_gui" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L9708-L10183
PmagPy/PmagPy
pmagpy/pmag.py
read_criteria_from_file
def read_criteria_from_file(path, acceptance_criteria, **kwargs): ''' Read accceptance criteria from magic criteria file # old format: multiple lines. pmag_criteria_code defines the type of criteria to deal with old format this function reads all the lines and ignore empty cells. i.e., the pro...
python
def read_criteria_from_file(path, acceptance_criteria, **kwargs): ''' Read accceptance criteria from magic criteria file # old format: multiple lines. pmag_criteria_code defines the type of criteria to deal with old format this function reads all the lines and ignore empty cells. i.e., the pro...
[ "def", "read_criteria_from_file", "(", "path", ",", "acceptance_criteria", ",", "*", "*", "kwargs", ")", ":", "warnings", "=", "[", "]", "acceptance_criteria_list", "=", "list", "(", "acceptance_criteria", ".", "keys", "(", ")", ")", "if", "'data_model'", "in"...
Read accceptance criteria from magic criteria file # old format: multiple lines. pmag_criteria_code defines the type of criteria to deal with old format this function reads all the lines and ignore empty cells. i.e., the program assumes that in each column there is only one value (in one of the lines)...
[ "Read", "accceptance", "criteria", "from", "magic", "criteria", "file", "#", "old", "format", ":", "multiple", "lines", ".", "pmag_criteria_code", "defines", "the", "type", "of", "criteria" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10186-L10299
PmagPy/PmagPy
pmagpy/pmag.py
add_flag
def add_flag(var, flag): """ for use when calling command-line scripts from withing a program. if a variable is present, add its proper command_line flag. return a string. """ if var: var = flag + " " + str(var) else: var = "" return var
python
def add_flag(var, flag): """ for use when calling command-line scripts from withing a program. if a variable is present, add its proper command_line flag. return a string. """ if var: var = flag + " " + str(var) else: var = "" return var
[ "def", "add_flag", "(", "var", ",", "flag", ")", ":", "if", "var", ":", "var", "=", "flag", "+", "\" \"", "+", "str", "(", "var", ")", "else", ":", "var", "=", "\"\"", "return", "var" ]
for use when calling command-line scripts from withing a program. if a variable is present, add its proper command_line flag. return a string.
[ "for", "use", "when", "calling", "command", "-", "line", "scripts", "from", "withing", "a", "program", ".", "if", "a", "variable", "is", "present", "add", "its", "proper", "command_line", "flag", ".", "return", "a", "string", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10407-L10417
PmagPy/PmagPy
pmagpy/pmag.py
get_named_arg
def get_named_arg(name, default_val=None, reqd=False): """ Extract the value after a command-line flag such as '-f' and return it. If the command-line flag is missing, return default_val. If reqd == True and the command-line flag is missing, throw an error. Parameters ---------- name : str ...
python
def get_named_arg(name, default_val=None, reqd=False): """ Extract the value after a command-line flag such as '-f' and return it. If the command-line flag is missing, return default_val. If reqd == True and the command-line flag is missing, throw an error. Parameters ---------- name : str ...
[ "def", "get_named_arg", "(", "name", ",", "default_val", "=", "None", ",", "reqd", "=", "False", ")", ":", "if", "name", "in", "sys", ".", "argv", ":", "# if the command line flag is found in sys.argv", "ind", "=", "sys", ".", "argv", ".", "index", "(", "n...
Extract the value after a command-line flag such as '-f' and return it. If the command-line flag is missing, return default_val. If reqd == True and the command-line flag is missing, throw an error. Parameters ---------- name : str command line flag, e.g. "-f" default_val value ...
[ "Extract", "the", "value", "after", "a", "command", "-", "line", "flag", "such", "as", "-", "f", "and", "return", "it", ".", "If", "the", "command", "-", "line", "flag", "is", "missing", "return", "default_val", ".", "If", "reqd", "==", "True", "and", ...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10420-L10447
PmagPy/PmagPy
pmagpy/pmag.py
merge_recs_headers
def merge_recs_headers(recs): ''' take a list of recs [rec1,rec2,rec3....], each rec is a dictionary. make sure that all recs have the same headers. ''' headers = [] for rec in recs: keys = list(rec.keys()) for key in keys: if key not in headers: heade...
python
def merge_recs_headers(recs): ''' take a list of recs [rec1,rec2,rec3....], each rec is a dictionary. make sure that all recs have the same headers. ''' headers = [] for rec in recs: keys = list(rec.keys()) for key in keys: if key not in headers: heade...
[ "def", "merge_recs_headers", "(", "recs", ")", ":", "headers", "=", "[", "]", "for", "rec", "in", "recs", ":", "keys", "=", "list", "(", "rec", ".", "keys", "(", ")", ")", "for", "key", "in", "keys", ":", "if", "key", "not", "in", "headers", ":",...
take a list of recs [rec1,rec2,rec3....], each rec is a dictionary. make sure that all recs have the same headers.
[ "take", "a", "list", "of", "recs", "[", "rec1", "rec2", "rec3", "....", "]", "each", "rec", "is", "a", "dictionary", ".", "make", "sure", "that", "all", "recs", "have", "the", "same", "headers", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10459-L10474
PmagPy/PmagPy
pmagpy/pmag.py
resolve_file_name
def resolve_file_name(fname, dir_path='.'): """ Parse file name information and output full path. Allows input as: fname == /path/to/file.txt or fname == file.txt, dir_path == /path/to Either way, returns /path/to/file.txt. Used in conversion scripts. Parameters ---------- f...
python
def resolve_file_name(fname, dir_path='.'): """ Parse file name information and output full path. Allows input as: fname == /path/to/file.txt or fname == file.txt, dir_path == /path/to Either way, returns /path/to/file.txt. Used in conversion scripts. Parameters ---------- f...
[ "def", "resolve_file_name", "(", "fname", ",", "dir_path", "=", "'.'", ")", ":", "if", "not", "fname", ":", "return", "''", "file_dir_path", ",", "file_name", "=", "os", ".", "path", ".", "split", "(", "fname", ")", "if", "(", "not", "file_dir_path", "...
Parse file name information and output full path. Allows input as: fname == /path/to/file.txt or fname == file.txt, dir_path == /path/to Either way, returns /path/to/file.txt. Used in conversion scripts. Parameters ---------- fname : str short filename or full path to file ...
[ "Parse", "file", "name", "information", "and", "output", "full", "path", ".", "Allows", "input", "as", ":", "fname", "==", "/", "path", "/", "to", "/", "file", ".", "txt", "or", "fname", "==", "file", ".", "txt", "dir_path", "==", "/", "path", "/", ...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10477-L10506
PmagPy/PmagPy
pmagpy/pmag.py
adjust_to_360
def adjust_to_360(val, key): """ Take in a value and a key. If the key is of the type: declination/longitude/azimuth/direction, adjust it to be within the range 0-360 as required by the MagIC data model """ CheckDec = ['_dec', '_lon', '_azimuth', 'dip_direction'] adjust = False for dec_...
python
def adjust_to_360(val, key): """ Take in a value and a key. If the key is of the type: declination/longitude/azimuth/direction, adjust it to be within the range 0-360 as required by the MagIC data model """ CheckDec = ['_dec', '_lon', '_azimuth', 'dip_direction'] adjust = False for dec_...
[ "def", "adjust_to_360", "(", "val", ",", "key", ")", ":", "CheckDec", "=", "[", "'_dec'", ",", "'_lon'", ",", "'_azimuth'", ",", "'dip_direction'", "]", "adjust", "=", "False", "for", "dec_key", "in", "CheckDec", ":", "if", "dec_key", "in", "key", ":", ...
Take in a value and a key. If the key is of the type: declination/longitude/azimuth/direction, adjust it to be within the range 0-360 as required by the MagIC data model
[ "Take", "in", "a", "value", "and", "a", "key", ".", "If", "the", "key", "is", "of", "the", "type", ":", "declination", "/", "longitude", "/", "azimuth", "/", "direction", "adjust", "it", "to", "be", "within", "the", "range", "0", "-", "360", "as", ...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10539-L10559
PmagPy/PmagPy
pmagpy/pmag.py
adjust_all_to_360
def adjust_all_to_360(dictionary): """ Take a dictionary and check each key/value pair. If this key is of type: declination/longitude/azimuth/direction, adjust it to be within 0-360 as required by the MagIC data model """ for key in dictionary: dictionary[key] = adjust_to_360(dictionary[...
python
def adjust_all_to_360(dictionary): """ Take a dictionary and check each key/value pair. If this key is of type: declination/longitude/azimuth/direction, adjust it to be within 0-360 as required by the MagIC data model """ for key in dictionary: dictionary[key] = adjust_to_360(dictionary[...
[ "def", "adjust_all_to_360", "(", "dictionary", ")", ":", "for", "key", "in", "dictionary", ":", "dictionary", "[", "key", "]", "=", "adjust_to_360", "(", "dictionary", "[", "key", "]", ",", "key", ")", "return", "dictionary" ]
Take a dictionary and check each key/value pair. If this key is of type: declination/longitude/azimuth/direction, adjust it to be within 0-360 as required by the MagIC data model
[ "Take", "a", "dictionary", "and", "check", "each", "key", "/", "value", "pair", ".", "If", "this", "key", "is", "of", "type", ":", "declination", "/", "longitude", "/", "azimuth", "/", "direction", "adjust", "it", "to", "be", "within", "0", "-", "360",...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10562-L10570
PmagPy/PmagPy
pmagpy/pmag.py
do_mag_map
def do_mag_map(date, lon_0=0, alt=0, file="", mod="cals10k",resolution='low'): """ returns lists of declination, inclination and intensities for lat/lon grid for desired model and date. Parameters: _________________ date = Required date in decimal years (Common Era, negative for Before Common E...
python
def do_mag_map(date, lon_0=0, alt=0, file="", mod="cals10k",resolution='low'): """ returns lists of declination, inclination and intensities for lat/lon grid for desired model and date. Parameters: _________________ date = Required date in decimal years (Common Era, negative for Before Common E...
[ "def", "do_mag_map", "(", "date", ",", "lon_0", "=", "0", ",", "alt", "=", "0", ",", "file", "=", "\"\"", ",", "mod", "=", "\"cals10k\"", ",", "resolution", "=", "'low'", ")", ":", "if", "resolution", "==", "'low'", ":", "incr", "=", "10", "# we ca...
returns lists of declination, inclination and intensities for lat/lon grid for desired model and date. Parameters: _________________ date = Required date in decimal years (Common Era, negative for Before Common Era) Optional Parameters: ______________ mod = model to use ('arch3k','cals3k'...
[ "returns", "lists", "of", "declination", "inclination", "and", "intensities", "for", "lat", "/", "lon", "grid", "for", "desired", "model", "and", "date", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10596-L10675
PmagPy/PmagPy
pmagpy/pmag.py
doeqdi
def doeqdi(x, y, UP=False): """ Takes digitized x,y, data and returns the dec,inc, assuming an equal area projection Parameters __________________ x : array of digitized x from point on equal area projection y : array of igitized y from point on equal area projection UP : if...
python
def doeqdi(x, y, UP=False): """ Takes digitized x,y, data and returns the dec,inc, assuming an equal area projection Parameters __________________ x : array of digitized x from point on equal area projection y : array of igitized y from point on equal area projection UP : if...
[ "def", "doeqdi", "(", "x", ",", "y", ",", "UP", "=", "False", ")", ":", "xp", ",", "yp", "=", "y", ",", "x", "# need to switch into geographic convention", "r", "=", "np", ".", "sqrt", "(", "xp", "**", "2", "+", "yp", "**", "2", ")", "z", "=", ...
Takes digitized x,y, data and returns the dec,inc, assuming an equal area projection Parameters __________________ x : array of digitized x from point on equal area projection y : array of igitized y from point on equal area projection UP : if True, is an upper hemisphere projection...
[ "Takes", "digitized", "x", "y", "data", "and", "returns", "the", "dec", "inc", "assuming", "an", "equal", "area", "projection", "Parameters", "__________________", "x", ":", "array", "of", "digitized", "x", "from", "point", "on", "equal", "area", "projection",...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10678-L10699
PmagPy/PmagPy
pmagpy/pmag.py
separate_directions
def separate_directions(di_block): """ Separates set of directions into two modes based on principal direction Parameters _______________ di_block : block of nested dec,inc pairs Return mode_1_block,mode_2_block : two lists of nested dec,inc pairs """ ppars = doprinc(di_block) ...
python
def separate_directions(di_block): """ Separates set of directions into two modes based on principal direction Parameters _______________ di_block : block of nested dec,inc pairs Return mode_1_block,mode_2_block : two lists of nested dec,inc pairs """ ppars = doprinc(di_block) ...
[ "def", "separate_directions", "(", "di_block", ")", ":", "ppars", "=", "doprinc", "(", "di_block", ")", "di_df", "=", "pd", ".", "DataFrame", "(", "di_block", ")", "# turn into a data frame for easy filtering", "di_df", ".", "columns", "=", "[", "'dec'", ",", ...
Separates set of directions into two modes based on principal direction Parameters _______________ di_block : block of nested dec,inc pairs Return mode_1_block,mode_2_block : two lists of nested dec,inc pairs
[ "Separates", "set", "of", "directions", "into", "two", "modes", "based", "on", "principal", "direction" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10702-L10724
PmagPy/PmagPy
pmagpy/pmag.py
dovandamme
def dovandamme(vgp_df): """ determine the S_b value for VGPs using the Vandamme (1994) method for determining cutoff value for "outliers". Parameters ___________ vgp_df : pandas DataFrame with required column "vgp_lat" This should be in the desired coordinate system and assumes one ...
python
def dovandamme(vgp_df): """ determine the S_b value for VGPs using the Vandamme (1994) method for determining cutoff value for "outliers". Parameters ___________ vgp_df : pandas DataFrame with required column "vgp_lat" This should be in the desired coordinate system and assumes one ...
[ "def", "dovandamme", "(", "vgp_df", ")", ":", "vgp_df", "[", "'delta'", "]", "=", "90.", "-", "vgp_df", "[", "'vgp_lat'", "]", ".", "values", "ASD", "=", "np", ".", "sqrt", "(", "np", ".", "sum", "(", "vgp_df", ".", "delta", "**", "2", ")", "/", ...
determine the S_b value for VGPs using the Vandamme (1994) method for determining cutoff value for "outliers". Parameters ___________ vgp_df : pandas DataFrame with required column "vgp_lat" This should be in the desired coordinate system and assumes one polarity Returns _________ ...
[ "determine", "the", "S_b", "value", "for", "VGPs", "using", "the", "Vandamme", "(", "1994", ")", "method", "for", "determining", "cutoff", "value", "for", "outliers", ".", "Parameters", "___________", "vgp_df", ":", "pandas", "DataFrame", "with", "required", "...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10727-L10752
PmagPy/PmagPy
pmagpy/pmag.py
scalc_vgp_df
def scalc_vgp_df(vgp_df, anti=0, rev=0, cutoff=180., kappa=0, n=0, spin=0, v=0, boot=0, mm97=0, nb=1000): """ Calculates Sf for a dataframe with VGP Lat., and optional Fisher's k, site latitude and N information can be used to correct for within site scatter (McElhinny & McFadden, 1997) Parameters ____...
python
def scalc_vgp_df(vgp_df, anti=0, rev=0, cutoff=180., kappa=0, n=0, spin=0, v=0, boot=0, mm97=0, nb=1000): """ Calculates Sf for a dataframe with VGP Lat., and optional Fisher's k, site latitude and N information can be used to correct for within site scatter (McElhinny & McFadden, 1997) Parameters ____...
[ "def", "scalc_vgp_df", "(", "vgp_df", ",", "anti", "=", "0", ",", "rev", "=", "0", ",", "cutoff", "=", "180.", ",", "kappa", "=", "0", ",", "n", "=", "0", ",", "spin", "=", "0", ",", "v", "=", "0", ",", "boot", "=", "0", ",", "mm97", "=", ...
Calculates Sf for a dataframe with VGP Lat., and optional Fisher's k, site latitude and N information can be used to correct for within site scatter (McElhinny & McFadden, 1997) Parameters _________ df : Pandas Dataframe with columns REQUIRED: vgp_lat : VGP latitude ONLY REQUIRED f...
[ "Calculates", "Sf", "for", "a", "dataframe", "with", "VGP", "Lat", ".", "and", "optional", "Fisher", "s", "k", "site", "latitude", "and", "N", "information", "can", "be", "used", "to", "correct", "for", "within", "site", "scatter", "(", "McElhinny", "&", ...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10755-L10819
PmagPy/PmagPy
pmagpy/pmag.py
watsons_f
def watsons_f(DI1, DI2): """ calculates Watson's F statistic (equation 11.16 in Essentials text book). Parameters _________ DI1 : nested array of [Dec,Inc] pairs DI2 : nested array of [Dec,Inc] pairs Returns _______ F : Watson's F Fcrit : critical value from F table """ ...
python
def watsons_f(DI1, DI2): """ calculates Watson's F statistic (equation 11.16 in Essentials text book). Parameters _________ DI1 : nested array of [Dec,Inc] pairs DI2 : nested array of [Dec,Inc] pairs Returns _______ F : Watson's F Fcrit : critical value from F table """ ...
[ "def", "watsons_f", "(", "DI1", ",", "DI2", ")", ":", "# first calculate R for the combined data set, then R1 and R2 for each individually.", "# create a new array from two smaller ones", "DI", "=", "np", ".", "concatenate", "(", "(", "DI1", ",", "DI2", ")", ",", "axis", ...
calculates Watson's F statistic (equation 11.16 in Essentials text book). Parameters _________ DI1 : nested array of [Dec,Inc] pairs DI2 : nested array of [Dec,Inc] pairs Returns _______ F : Watson's F Fcrit : critical value from F table
[ "calculates", "Watson", "s", "F", "statistic", "(", "equation", "11", ".", "16", "in", "Essentials", "text", "book", ")", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10822-L10848
PmagPy/PmagPy
pmagpy/pmag.py
apwp
def apwp(data, print_results=False): """ calculates expected pole positions and directions for given plate, location and age Parameters _________ data : [plate,lat,lon,age] plate : [NA, SA, AF, IN, EU, AU, ANT, GL] NA : North America SA : South America...
python
def apwp(data, print_results=False): """ calculates expected pole positions and directions for given plate, location and age Parameters _________ data : [plate,lat,lon,age] plate : [NA, SA, AF, IN, EU, AU, ANT, GL] NA : North America SA : South America...
[ "def", "apwp", "(", "data", ",", "print_results", "=", "False", ")", ":", "pole_lat", ",", "pole_lon", "=", "bc02", "(", "data", ")", "# get the pole for these parameters", "# get the declination and inclination for that pole", "ExpDec", ",", "ExpInc", "=", "vgp_di", ...
calculates expected pole positions and directions for given plate, location and age Parameters _________ data : [plate,lat,lon,age] plate : [NA, SA, AF, IN, EU, AU, ANT, GL] NA : North America SA : South America AF : Africa IN :...
[ "calculates", "expected", "pole", "positions", "and", "directions", "for", "given", "plate", "location", "and", "age", "Parameters", "_________", "data", ":", "[", "plate", "lat", "lon", "age", "]", "plate", ":", "[", "NA", "SA", "AF", "IN", "EU", "AU", ...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10851-L10885
PmagPy/PmagPy
pmagpy/pmag.py
chart_maker
def chart_maker(Int, Top, start=100, outfile='chart.txt'): """ Makes a chart for performing IZZI experiments. Print out the file and tape it to the oven. This chart will help keep track of the different steps. Z : performed in zero field - enter the temperature XXX.0 in the sio formatted me...
python
def chart_maker(Int, Top, start=100, outfile='chart.txt'): """ Makes a chart for performing IZZI experiments. Print out the file and tape it to the oven. This chart will help keep track of the different steps. Z : performed in zero field - enter the temperature XXX.0 in the sio formatted me...
[ "def", "chart_maker", "(", "Int", ",", "Top", ",", "start", "=", "100", ",", "outfile", "=", "'chart.txt'", ")", ":", "low", ",", "k", ",", "iz", "=", "start", ",", "0", ",", "0", "Tzero", "=", "[", "]", "f", "=", "open", "(", "'chart.txt'", ",...
Makes a chart for performing IZZI experiments. Print out the file and tape it to the oven. This chart will help keep track of the different steps. Z : performed in zero field - enter the temperature XXX.0 in the sio formatted measurement file created by the LabView program I : performed in the ...
[ "Makes", "a", "chart", "for", "performing", "IZZI", "experiments", ".", "Print", "out", "the", "file", "and", "tape", "it", "to", "the", "oven", ".", "This", "chart", "will", "help", "keep", "track", "of", "the", "different", "steps", ".", "Z", ":", "p...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10888-L10971
PmagPy/PmagPy
pmagpy/pmag.py
import_basemap
def import_basemap(): """ Try to import Basemap and print out a useful help message if Basemap is either not installed or is missing required environment variables. Returns --------- has_basemap : bool Basemap : Basemap package if possible else None """ Basemap = None has_b...
python
def import_basemap(): """ Try to import Basemap and print out a useful help message if Basemap is either not installed or is missing required environment variables. Returns --------- has_basemap : bool Basemap : Basemap package if possible else None """ Basemap = None has_b...
[ "def", "import_basemap", "(", ")", ":", "Basemap", "=", "None", "has_basemap", "=", "True", "has_cartopy", "=", "import_cartopy", "(", ")", "[", "0", "]", "try", ":", "from", "mpl_toolkits", ".", "basemap", "import", "Basemap", "WARNINGS", "[", "'has_basemap...
Try to import Basemap and print out a useful help message if Basemap is either not installed or is missing required environment variables. Returns --------- has_basemap : bool Basemap : Basemap package if possible else None
[ "Try", "to", "import", "Basemap", "and", "print", "out", "a", "useful", "help", "message", "if", "Basemap", "is", "either", "not", "installed", "or", "is", "missing", "required", "environment", "variables", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L10974-L11026
PmagPy/PmagPy
pmagpy/pmag.py
import_cartopy
def import_cartopy(): """ Try to import cartopy and print out a help message if it is not installed Returns --------- has_cartopy : bool cartopy : cartopy package if available else None """ cartopy = None has_cartopy = True try: import cartopy WARNINGS['has_c...
python
def import_cartopy(): """ Try to import cartopy and print out a help message if it is not installed Returns --------- has_cartopy : bool cartopy : cartopy package if available else None """ cartopy = None has_cartopy = True try: import cartopy WARNINGS['has_c...
[ "def", "import_cartopy", "(", ")", ":", "cartopy", "=", "None", "has_cartopy", "=", "True", "try", ":", "import", "cartopy", "WARNINGS", "[", "'has_cartopy'", "]", "=", "True", "except", "ImportError", ":", "has_cartopy", "=", "False", "if", "not", "WARNINGS...
Try to import cartopy and print out a help message if it is not installed Returns --------- has_cartopy : bool cartopy : cartopy package if available else None
[ "Try", "to", "import", "cartopy", "and", "print", "out", "a", "help", "message", "if", "it", "is", "not", "installed" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L11029-L11051
PmagPy/PmagPy
pmagpy/pmag.py
age_to_BP
def age_to_BP(age, age_unit): """ Convert an age value into the equivalent in time Before Present(BP) where Present is 1950 Returns --------- ageBP : number """ ageBP = -1e9 if age_unit == "Years AD (+/-)" or age_unit == "Years Cal AD (+/-)": if age < 0: age = age+1 ...
python
def age_to_BP(age, age_unit): """ Convert an age value into the equivalent in time Before Present(BP) where Present is 1950 Returns --------- ageBP : number """ ageBP = -1e9 if age_unit == "Years AD (+/-)" or age_unit == "Years Cal AD (+/-)": if age < 0: age = age+1 ...
[ "def", "age_to_BP", "(", "age", ",", "age_unit", ")", ":", "ageBP", "=", "-", "1e9", "if", "age_unit", "==", "\"Years AD (+/-)\"", "or", "age_unit", "==", "\"Years Cal AD (+/-)\"", ":", "if", "age", "<", "0", ":", "age", "=", "age", "+", "1", "# to corre...
Convert an age value into the equivalent in time Before Present(BP) where Present is 1950 Returns --------- ageBP : number
[ "Convert", "an", "age", "value", "into", "the", "equivalent", "in", "time", "Before", "Present", "(", "BP", ")", "where", "Present", "is", "1950" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L11054-L11078
PmagPy/PmagPy
pmagpy/pmag.py
vocab_convert
def vocab_convert(vocab, standard, key=''): """ Converts MagIC database terms (method codes, geologic_types, etc) to other standards. May not be comprehensive for each standard. Terms added to standards as people need them and may not be up-to-date. 'key' can be used to distinguish vocab terms that...
python
def vocab_convert(vocab, standard, key=''): """ Converts MagIC database terms (method codes, geologic_types, etc) to other standards. May not be comprehensive for each standard. Terms added to standards as people need them and may not be up-to-date. 'key' can be used to distinguish vocab terms that...
[ "def", "vocab_convert", "(", "vocab", ",", "standard", ",", "key", "=", "''", ")", ":", "places_to_geomagia", "=", "{", "'Egypt'", ":", "\"1\"", ",", "'Japan'", ":", "\"2\"", ",", "'France'", ":", "\"3\"", ",", "'Ukraine'", ":", "\"5\"", ",", "'India'", ...
Converts MagIC database terms (method codes, geologic_types, etc) to other standards. May not be comprehensive for each standard. Terms added to standards as people need them and may not be up-to-date. 'key' can be used to distinguish vocab terms that exist in two different lists. Returns: value o...
[ "Converts", "MagIC", "database", "terms", "(", "method", "codes", "geologic_types", "etc", ")", "to", "other", "standards", ".", "May", "not", "be", "comprehensive", "for", "each", "standard", ".", "Terms", "added", "to", "standards", "as", "people", "need", ...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L11081-L11306
PmagPy/PmagPy
pmagpy/pmag.py
fix_directories
def fix_directories(input_dir_path, output_dir_path): """ Take arguments input/output directories and fixes them. If no input_directory, default to output_dir_path for both. Then return realpath for both values. Parameters ---------- input_dir_path : str output_dir_path : str Retur...
python
def fix_directories(input_dir_path, output_dir_path): """ Take arguments input/output directories and fixes them. If no input_directory, default to output_dir_path for both. Then return realpath for both values. Parameters ---------- input_dir_path : str output_dir_path : str Retur...
[ "def", "fix_directories", "(", "input_dir_path", ",", "output_dir_path", ")", ":", "if", "not", "input_dir_path", ":", "input_dir_path", "=", "output_dir_path", "input_dir_path", "=", "os", ".", "path", ".", "realpath", "(", "input_dir_path", ")", "output_dir_path",...
Take arguments input/output directories and fixes them. If no input_directory, default to output_dir_path for both. Then return realpath for both values. Parameters ---------- input_dir_path : str output_dir_path : str Returns --------- input_dir_path, output_dir_path
[ "Take", "arguments", "input", "/", "output", "directories", "and", "fixes", "them", ".", "If", "no", "input_directory", "default", "to", "output_dir_path", "for", "both", ".", "Then", "return", "realpath", "for", "both", "values", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/pmag.py#L11309-L11328
PmagPy/PmagPy
programs/conversion_scripts/magic_geomagia.py
main
def main(): """ NAME magic_geomagia.py DESCRIPTION Takes a MagIC file and outputs data for easier input into Max Brown's GEOMAGIA database SYNTAX magic_geomagia.py [command line options] OPTIONS -h: prints the help message and quits. -f FILE: the MagIC data fil...
python
def main(): """ NAME magic_geomagia.py DESCRIPTION Takes a MagIC file and outputs data for easier input into Max Brown's GEOMAGIA database SYNTAX magic_geomagia.py [command line options] OPTIONS -h: prints the help message and quits. -f FILE: the MagIC data fil...
[ "def", "main", "(", ")", ":", "if", "'-h'", "in", "sys", ".", "argv", ":", "# check if help is needed", "print", "(", "main", ".", "__doc__", ")", "sys", ".", "exit", "(", ")", "# graceful quit", "if", "'-f'", "in", "sys", ".", "argv", ":", "ind", "=...
NAME magic_geomagia.py DESCRIPTION Takes a MagIC file and outputs data for easier input into Max Brown's GEOMAGIA database SYNTAX magic_geomagia.py [command line options] OPTIONS -h: prints the help message and quits. -f FILE: the MagIC data file name that will be conv...
[ "NAME", "magic_geomagia", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/conversion_scripts/magic_geomagia.py#L12-L307
PmagPy/PmagPy
programs/conversion_scripts/magic_geomagia.py
method_codes_to_geomagia
def method_codes_to_geomagia(magic_method_codes,geomagia_table): """ Looks at the MagIC method code list and returns the correct GEOMAGIA code number depending on the method code list and the GEOMAGIA table specified. Returns O, GEOMAGIA's "Not specified" value, if no match. When mutiple codes are mat...
python
def method_codes_to_geomagia(magic_method_codes,geomagia_table): """ Looks at the MagIC method code list and returns the correct GEOMAGIA code number depending on the method code list and the GEOMAGIA table specified. Returns O, GEOMAGIA's "Not specified" value, if no match. When mutiple codes are mat...
[ "def", "method_codes_to_geomagia", "(", "magic_method_codes", ",", "geomagia_table", ")", ":", "codes", "=", "magic_method_codes", "geomagia", "=", "geomagia_table", ".", "lower", "(", ")", "geomagia_code", "=", "'0'", "if", "geomagia", "==", "'alteration_monit_corr'"...
Looks at the MagIC method code list and returns the correct GEOMAGIA code number depending on the method code list and the GEOMAGIA table specified. Returns O, GEOMAGIA's "Not specified" value, if no match. When mutiple codes are matched they are separated with -
[ "Looks", "at", "the", "MagIC", "method", "code", "list", "and", "returns", "the", "correct", "GEOMAGIA", "code", "number", "depending", "on", "the", "method", "code", "list", "and", "the", "GEOMAGIA", "table", "specified", ".", "Returns", "O", "GEOMAGIA", "s...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/conversion_scripts/magic_geomagia.py#L310-L410
PmagPy/PmagPy
programs/microwave_magic.py
main
def main(): """ NAME microwave_magic.py DESCRIPTION plots microwave paleointensity data, allowing interactive setting of bounds. Saves and reads interpretations from a pmag_specimen formatted table, default: microwave_specimens.txt SYNTAX microwave_magic.py [com...
python
def main(): """ NAME microwave_magic.py DESCRIPTION plots microwave paleointensity data, allowing interactive setting of bounds. Saves and reads interpretations from a pmag_specimen formatted table, default: microwave_specimens.txt SYNTAX microwave_magic.py [com...
[ "def", "main", "(", ")", ":", "#", "# initializations", "#", "meas_file", ",", "critout", ",", "inspec", "=", "\"magic_measurements.txt\"", ",", "\"\"", ",", "\"microwave_specimens.txt\"", "inlt", "=", "0", "version_num", "=", "pmag", ".", "get_version", "(", ...
NAME microwave_magic.py DESCRIPTION plots microwave paleointensity data, allowing interactive setting of bounds. Saves and reads interpretations from a pmag_specimen formatted table, default: microwave_specimens.txt SYNTAX microwave_magic.py [command line options] ...
[ "NAME", "microwave_magic", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/microwave_magic.py#L13-L513
PmagPy/PmagPy
programs/deprecated/odp_spn_magic.py
main
def main(): """ NAME odp_spn_magic.py DESCRIPTION converts ODP's Molspin's .spn format files to magic_measurements format files SYNTAX odp_spn_magic.py [command line options] OPTIONS -h: prints the help message and quits. -f FILE: specify .spn format input ...
python
def main(): """ NAME odp_spn_magic.py DESCRIPTION converts ODP's Molspin's .spn format files to magic_measurements format files SYNTAX odp_spn_magic.py [command line options] OPTIONS -h: prints the help message and quits. -f FILE: specify .spn format input ...
[ "def", "main", "(", ")", ":", "# initialize some stuff", "noave", "=", "0", "methcode", ",", "inst", "=", "\"\"", ",", "\"\"", "phi", ",", "theta", ",", "peakfield", ",", "labfield", "=", "0", ",", "0", ",", "0", ",", "0", "dec", "=", "[", "315", ...
NAME odp_spn_magic.py DESCRIPTION converts ODP's Molspin's .spn format files to magic_measurements format files SYNTAX odp_spn_magic.py [command line options] OPTIONS -h: prints the help message and quits. -f FILE: specify .spn format input file, required -...
[ "NAME", "odp_spn_magic", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/deprecated/odp_spn_magic.py#L6-L158
PmagPy/PmagPy
programs/conversion_scripts/template_magic.py
convert
def convert(**kwargs): """ EXAMPLE DOCSTRING for function (you would usually put the discription here) Parameters ----------- user : colon delimited list of analysts (default : "") magfile : input magnetometer file (required) Returns ----------- type - Tuple : (True or False indica...
python
def convert(**kwargs): """ EXAMPLE DOCSTRING for function (you would usually put the discription here) Parameters ----------- user : colon delimited list of analysts (default : "") magfile : input magnetometer file (required) Returns ----------- type - Tuple : (True or False indica...
[ "def", "convert", "(", "*", "*", "kwargs", ")", ":", "#get parameters from kwargs.get(parameter_name, default_value)", "user", "=", "kwargs", ".", "get", "(", "'user'", ",", "''", ")", "magfile", "=", "kwargs", ".", "get", "(", "'magfile'", ")", "#do any extra f...
EXAMPLE DOCSTRING for function (you would usually put the discription here) Parameters ----------- user : colon delimited list of analysts (default : "") magfile : input magnetometer file (required) Returns ----------- type - Tuple : (True or False indicating if conversion was sucessful, m...
[ "EXAMPLE", "DOCSTRING", "for", "function", "(", "you", "would", "usually", "put", "the", "discription", "here", ")" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/conversion_scripts/template_magic.py#L25-L105
PmagPy/PmagPy
programs/b_vdm.py
main
def main(): """ NAME b_vdm.py DESCRIPTION converts B (in microT) and (magnetic) latitude to V(A)DM INPUT (COMMAND LINE ENTRY) B (microtesla), latitude (positive north) OUTPUT V[A]DM SYNTAX b_vdm.py [command line options] [< filename] ...
python
def main(): """ NAME b_vdm.py DESCRIPTION converts B (in microT) and (magnetic) latitude to V(A)DM INPUT (COMMAND LINE ENTRY) B (microtesla), latitude (positive north) OUTPUT V[A]DM SYNTAX b_vdm.py [command line options] [< filename] ...
[ "def", "main", "(", ")", ":", "inp", ",", "out", "=", "\"\"", ",", "\"\"", "if", "'-h'", "in", "sys", ".", "argv", ":", "print", "(", "main", ".", "__doc__", ")", "sys", ".", "exit", "(", ")", "if", "'-f'", "in", "sys", ".", "argv", ":", "ind...
NAME b_vdm.py DESCRIPTION converts B (in microT) and (magnetic) latitude to V(A)DM INPUT (COMMAND LINE ENTRY) B (microtesla), latitude (positive north) OUTPUT V[A]DM SYNTAX b_vdm.py [command line options] [< filename] OPTIONS ...
[ "NAME", "b_vdm", ".", "py", "DESCRIPTION", "converts", "B", "(", "in", "microT", ")", "and", "(", "magnetic", ")", "latitude", "to", "V", "(", "A", ")", "DM", "INPUT", "(", "COMMAND", "LINE", "ENTRY", ")", "B", "(", "microtesla", ")", "latitude", "("...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/b_vdm.py#L16-L72
PmagPy/PmagPy
setup.py
do_walk
def do_walk(data_path): """ Walk through data_files and list all in dict format """ data_files = {} def cond(File, prefix): """ Return True for useful files Return False for non-useful files """ file_path = path.join(prefix, 'data_files', File) return ...
python
def do_walk(data_path): """ Walk through data_files and list all in dict format """ data_files = {} def cond(File, prefix): """ Return True for useful files Return False for non-useful files """ file_path = path.join(prefix, 'data_files', File) return ...
[ "def", "do_walk", "(", "data_path", ")", ":", "data_files", "=", "{", "}", "def", "cond", "(", "File", ",", "prefix", ")", ":", "\"\"\"\n Return True for useful files\n Return False for non-useful files\n \"\"\"", "file_path", "=", "path", ".", "joi...
Walk through data_files and list all in dict format
[ "Walk", "through", "data_files", "and", "list", "all", "in", "dict", "format" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/setup.py#L46-L71
PmagPy/PmagPy
programs/conversion_scripts2/bgc_magic2.py
main
def main(command_line=True, **kwargs): """ NAME bgc_magic.py DESCRIPTION converts Berkeley Geochronology Center (BGC) format files to magic_measurements format files SYNTAX bgc_magic.py [command line options] OPTIONS -h: prints the help message and quits. -...
python
def main(command_line=True, **kwargs): """ NAME bgc_magic.py DESCRIPTION converts Berkeley Geochronology Center (BGC) format files to magic_measurements format files SYNTAX bgc_magic.py [command line options] OPTIONS -h: prints the help message and quits. -...
[ "def", "main", "(", "command_line", "=", "True", ",", "*", "*", "kwargs", ")", ":", "# initialize some stuff", "noave", "=", "0", "volume", "=", "0.025", "**", "3", "#default volume is a 2.5cm cube", "#inst=\"\"", "#samp_con,Z='1',\"\"", "#missing=1", "#demag=\"N\""...
NAME bgc_magic.py DESCRIPTION converts Berkeley Geochronology Center (BGC) format files to magic_measurements format files SYNTAX bgc_magic.py [command line options] OPTIONS -h: prints the help message and quits. -f FILE: specify input file, or -F FILE: sp...
[ "NAME", "bgc_magic", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/conversion_scripts2/bgc_magic2.py#L13-L226
PmagPy/PmagPy
programs/deprecated/change_case_magic.py
main
def main(): """ NAME change_case_magic.py DESCRIPTION picks out key and converts to upper or lower case SYNTAX change_case_magic.py [command line options] OPTIONS -h prints help message and quits -f FILE: specify input magic format file -F FILE: s...
python
def main(): """ NAME change_case_magic.py DESCRIPTION picks out key and converts to upper or lower case SYNTAX change_case_magic.py [command line options] OPTIONS -h prints help message and quits -f FILE: specify input magic format file -F FILE: s...
[ "def", "main", "(", ")", ":", "dir_path", "=", "\"./\"", "change", "=", "'l'", "if", "'-WD'", "in", "sys", ".", "argv", ":", "ind", "=", "sys", ".", "argv", ".", "index", "(", "'-WD'", ")", "dir_path", "=", "sys", ".", "argv", "[", "ind", "+", ...
NAME change_case_magic.py DESCRIPTION picks out key and converts to upper or lower case SYNTAX change_case_magic.py [command line options] OPTIONS -h prints help message and quits -f FILE: specify input magic format file -F FILE: specify output magic form...
[ "NAME", "change_case_magic", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/deprecated/change_case_magic.py#L6-L63
PmagPy/PmagPy
pmagpy/frp.py
get_pole
def get_pole(continent,age): """ returns rotation poles and angles for specified continents and ages assumes fixed Africa. Parameters __________ continent : aus : Australia eur : Eurasia mad : Madacascar [nwaf,congo] : NW Africa [choose one...
python
def get_pole(continent,age): """ returns rotation poles and angles for specified continents and ages assumes fixed Africa. Parameters __________ continent : aus : Australia eur : Eurasia mad : Madacascar [nwaf,congo] : NW Africa [choose one...
[ "def", "get_pole", "(", "continent", ",", "age", ")", ":", "age", "=", "int", "(", "age", ")", "if", "continent", "==", "'congo'", ":", "continent", "=", "'nwaf'", "if", "continent", "==", "'kala'", ":", "continent", "=", "'neaf'", "if", "continent", "...
returns rotation poles and angles for specified continents and ages assumes fixed Africa. Parameters __________ continent : aus : Australia eur : Eurasia mad : Madacascar [nwaf,congo] : NW Africa [choose one] col : Colombia ...
[ "returns", "rotation", "poles", "and", "angles", "for", "specified", "continents", "and", "ages", "assumes", "fixed", "Africa", ".", "Parameters", "__________", "continent", ":", "aus", ":", "Australia", "eur", ":", "Eurasia", "mad", ":", "Madacascar", "[", "n...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/frp.py#L1-L91
PmagPy/PmagPy
programs/plot_magmap.py
main
def main(): """ NAME plot_magmap.py DESCRIPTION makes a color contour map of desired field model SYNTAX plot_magmap.py [command line options] OPTIONS -h prints help and quits -f FILE specify field model file with format: l m g h -fmt [pdf,eps,svg,...
python
def main(): """ NAME plot_magmap.py DESCRIPTION makes a color contour map of desired field model SYNTAX plot_magmap.py [command line options] OPTIONS -h prints help and quits -f FILE specify field model file with format: l m g h -fmt [pdf,eps,svg,...
[ "def", "main", "(", ")", ":", "cmap", "=", "'RdYlBu'", "date", "=", "2016.", "if", "not", "ccrs", ":", "print", "(", "\"-W- You must intstall the cartopy module to run plot_magmap.py\"", ")", "sys", ".", "exit", "(", ")", "dir_path", "=", "'.'", "lincr", "=", ...
NAME plot_magmap.py DESCRIPTION makes a color contour map of desired field model SYNTAX plot_magmap.py [command line options] OPTIONS -h prints help and quits -f FILE specify field model file with format: l m g h -fmt [pdf,eps,svg,png] specify format for...
[ "NAME", "plot_magmap", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/plot_magmap.py#L24-L153
PmagPy/PmagPy
programs/download_magic.py
main
def main(): """ NAME download_magic.py DESCRIPTION unpacks a magic formatted smartbook .txt file from the MagIC database into the tab delimited MagIC format txt files for use with the MagIC-Py programs. SYNTAX download_magic.py command line options] INPUT ta...
python
def main(): """ NAME download_magic.py DESCRIPTION unpacks a magic formatted smartbook .txt file from the MagIC database into the tab delimited MagIC format txt files for use with the MagIC-Py programs. SYNTAX download_magic.py command line options] INPUT ta...
[ "def", "main", "(", ")", ":", "if", "'-h'", "in", "sys", ".", "argv", ":", "print", "(", "main", ".", "__doc__", ")", "sys", ".", "exit", "(", ")", "if", "'-WD'", "in", "sys", ".", "argv", ":", "ind", "=", "sys", ".", "argv", ".", "index", "(...
NAME download_magic.py DESCRIPTION unpacks a magic formatted smartbook .txt file from the MagIC database into the tab delimited MagIC format txt files for use with the MagIC-Py programs. SYNTAX download_magic.py command line options] INPUT takes either the upload.tx...
[ "NAME", "download_magic", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/download_magic.py#L8-L61
PmagPy/PmagPy
programs/quick_hyst.py
main
def main(): """ NAME quick_hyst.py DESCRIPTION makes plots of hysteresis data SYNTAX quick_hyst.py [command line options] OPTIONS -h prints help message and quits -f: specify input file, default is measurements.txt -spc SPEC: specify specimen name t...
python
def main(): """ NAME quick_hyst.py DESCRIPTION makes plots of hysteresis data SYNTAX quick_hyst.py [command line options] OPTIONS -h prints help message and quits -f: specify input file, default is measurements.txt -spc SPEC: specify specimen name t...
[ "def", "main", "(", ")", ":", "args", "=", "sys", ".", "argv", "if", "\"-h\"", "in", "args", ":", "print", "(", "main", ".", "__doc__", ")", "sys", ".", "exit", "(", ")", "pltspec", "=", "\"\"", "verbose", "=", "pmagplotlib", ".", "verbose", "dir_p...
NAME quick_hyst.py DESCRIPTION makes plots of hysteresis data SYNTAX quick_hyst.py [command line options] OPTIONS -h prints help message and quits -f: specify input file, default is measurements.txt -spc SPEC: specify specimen name to plot and quit ...
[ "NAME", "quick_hyst", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/quick_hyst.py#L15-L55
PmagPy/PmagPy
programs/curie.py
smooth
def smooth(x,window_len,window='bartlett'): """smooth the data using a sliding window with requested size. This method is based on the convolution of a scaled window with the signal. The signal is prepared by padding the beginning and the end of the signal with average of the first (last) ten values of...
python
def smooth(x,window_len,window='bartlett'): """smooth the data using a sliding window with requested size. This method is based on the convolution of a scaled window with the signal. The signal is prepared by padding the beginning and the end of the signal with average of the first (last) ten values of...
[ "def", "smooth", "(", "x", ",", "window_len", ",", "window", "=", "'bartlett'", ")", ":", "if", "x", ".", "ndim", "!=", "1", ":", "raise", "ValueError", "(", "\"smooth only accepts 1 dimension arrays.\"", ")", "if", "x", ".", "size", "<", "window_len", ":"...
smooth the data using a sliding window with requested size. This method is based on the convolution of a scaled window with the signal. The signal is prepared by padding the beginning and the end of the signal with average of the first (last) ten values of the signal, to evoid jumps at the beggining/en...
[ "smooth", "the", "data", "using", "a", "sliding", "window", "with", "requested", "size", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/curie.py#L20-L69
PmagPy/PmagPy
programs/curie.py
deriv1
def deriv1(x,y,i,n): """ alternative way to smooth the derivative of a noisy signal using least square fit. x=array of x axis y=array of y axis n=smoothing factor i= position in this method the slope in position i is calculated by least square fit of n points before and after positi...
python
def deriv1(x,y,i,n): """ alternative way to smooth the derivative of a noisy signal using least square fit. x=array of x axis y=array of y axis n=smoothing factor i= position in this method the slope in position i is calculated by least square fit of n points before and after positi...
[ "def", "deriv1", "(", "x", ",", "y", ",", "i", ",", "n", ")", ":", "m_", ",", "x_", ",", "y_", ",", "xy_", ",", "x_2", "=", "0.", ",", "0.", ",", "0.", ",", "0.", ",", "0.", "for", "ix", "in", "range", "(", "i", ",", "i", "+", "n", ",...
alternative way to smooth the derivative of a noisy signal using least square fit. x=array of x axis y=array of y axis n=smoothing factor i= position in this method the slope in position i is calculated by least square fit of n points before and after position.
[ "alternative", "way", "to", "smooth", "the", "derivative", "of", "a", "noisy", "signal", "using", "least", "square", "fit", ".", "x", "=", "array", "of", "x", "axis", "y", "=", "array", "of", "y", "axis", "n", "=", "smoothing", "factor", "i", "=", "p...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/curie.py#L73-L92
PmagPy/PmagPy
programs/curie.py
main
def main(): """ NAME curie.py DESCTIPTION plots and interprets curie temperature data. the 1st derivative is calculated from smoothed M-T curve (convolution with trianfular window with width= <-w> degrees) the 2nd derivative is calculated from smoothed 1st deriva...
python
def main(): """ NAME curie.py DESCTIPTION plots and interprets curie temperature data. the 1st derivative is calculated from smoothed M-T curve (convolution with trianfular window with width= <-w> degrees) the 2nd derivative is calculated from smoothed 1st deriva...
[ "def", "main", "(", ")", ":", "plot", ",", "fmt", "=", "0", ",", "'svg'", "if", "'-h'", "in", "sys", ".", "argv", ":", "print", "(", "main", ".", "__doc__", ")", "sys", ".", "exit", "(", ")", "if", "'-f'", "in", "sys", ".", "argv", ":", "ind"...
NAME curie.py DESCTIPTION plots and interprets curie temperature data. the 1st derivative is calculated from smoothed M-T curve (convolution with trianfular window with width= <-w> degrees) the 2nd derivative is calculated from smoothed 1st derivative curve (...
[ "NAME", "curie", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/curie.py#L95-L284
PmagPy/PmagPy
programs/conversion_scripts2/jr6_jr6_magic2.py
main
def main(command_line=True, **kwargs): """ NAME jr6_jr6_magic.py DESCRIPTION converts JR6 .jr6 format files to magic_measurements format files SYNTAX jr6_jr6_magic.py [command line options] OPTIONS -h: prints the help message and quits. -f FILE: specify i...
python
def main(command_line=True, **kwargs): """ NAME jr6_jr6_magic.py DESCRIPTION converts JR6 .jr6 format files to magic_measurements format files SYNTAX jr6_jr6_magic.py [command line options] OPTIONS -h: prints the help message and quits. -f FILE: specify i...
[ "def", "main", "(", "command_line", "=", "True", ",", "*", "*", "kwargs", ")", ":", "# initialize some stuff", "noave", "=", "0", "#volume=2.5**3 #default volume is a 2.5cm cube", "volume", "=", "2.5", "*", "1e-6", "#default volume is a 2.5 cm cube, translated to meters c...
NAME jr6_jr6_magic.py DESCRIPTION converts JR6 .jr6 format files to magic_measurements format files SYNTAX jr6_jr6_magic.py [command line options] OPTIONS -h: prints the help message and quits. -f FILE: specify input file, or -F FILE: specify output file,...
[ "NAME", "jr6_jr6_magic", ".", "py", "DESCRIPTION", "converts", "JR6", ".", "jr6", "format", "files", "to", "magic_measurements", "format", "files" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/conversion_scripts2/jr6_jr6_magic2.py#L10-L287
PmagPy/PmagPy
programs/deprecated/extract_methods.py
main
def main(): """ NAME extract_methods.py DESCRIPTION reads in a magic table and creates a file with method codes SYNTAX extract_methods.py [command line options] OPTIONS -h: prints the help message and quits. -f FILE: specify magic format input file, defaul...
python
def main(): """ NAME extract_methods.py DESCRIPTION reads in a magic table and creates a file with method codes SYNTAX extract_methods.py [command line options] OPTIONS -h: prints the help message and quits. -f FILE: specify magic format input file, defaul...
[ "def", "main", "(", ")", ":", "citation", "=", "'This study'", "args", "=", "sys", ".", "argv", "outfile", "=", "'magic_methods.txt'", "infile", "=", "'magic_measurements.txt'", "#", "# get command line arguments", "#", "dir_path", "=", "'.'", "if", "'-WD'", "in...
NAME extract_methods.py DESCRIPTION reads in a magic table and creates a file with method codes SYNTAX extract_methods.py [command line options] OPTIONS -h: prints the help message and quits. -f FILE: specify magic format input file, default is magic_measurements....
[ "NAME", "extract_methods", ".", "py", "DESCRIPTION", "reads", "in", "a", "magic", "table", "and", "creates", "a", "file", "with", "method", "codes" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/deprecated/extract_methods.py#L6-L55
PmagPy/PmagPy
programs/gofish.py
main
def main(): """ NAME gofish.py DESCRIPTION calculates fisher parameters from dec inc data INPUT FORMAT takes dec/inc as first two columns in space delimited file SYNTAX gofish.py [options] [< filename] OPTIONS -h prints help message and quits -i f...
python
def main(): """ NAME gofish.py DESCRIPTION calculates fisher parameters from dec inc data INPUT FORMAT takes dec/inc as first two columns in space delimited file SYNTAX gofish.py [options] [< filename] OPTIONS -h prints help message and quits -i f...
[ "def", "main", "(", ")", ":", "if", "'-h'", "in", "sys", ".", "argv", ":", "# check if help is needed", "print", "(", "main", ".", "__doc__", ")", "sys", ".", "exit", "(", ")", "# graceful quit", "if", "'-i'", "in", "sys", ".", "argv", ":", "# ask for ...
NAME gofish.py DESCRIPTION calculates fisher parameters from dec inc data INPUT FORMAT takes dec/inc as first two columns in space delimited file SYNTAX gofish.py [options] [< filename] OPTIONS -h prints help message and quits -i for interactive filename ...
[ "NAME", "gofish", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/gofish.py#L7-L65
PmagPy/PmagPy
programs/trmaq_magic.py
main
def main(): """ NAME trmaq_magic.py DESCTIPTION does non-linear trm acquisisiton correction SYNTAX trmaq_magic.py [-h][-i][command line options] OPTIONS -h prints help message and quits -i allows interactive setting of file names -f MFILE, sets magi...
python
def main(): """ NAME trmaq_magic.py DESCTIPTION does non-linear trm acquisisiton correction SYNTAX trmaq_magic.py [-h][-i][command line options] OPTIONS -h prints help message and quits -i allows interactive setting of file names -f MFILE, sets magi...
[ "def", "main", "(", ")", ":", "meas_file", "=", "'trmaq_measurements.txt'", "tspec", "=", "\"thellier_specimens.txt\"", "output", "=", "'NLT_specimens.txt'", "data_model_num", "=", "int", "(", "float", "(", "pmag", ".", "get_named_arg", "(", "\"-DM\"", ",", "3", ...
NAME trmaq_magic.py DESCTIPTION does non-linear trm acquisisiton correction SYNTAX trmaq_magic.py [-h][-i][command line options] OPTIONS -h prints help message and quits -i allows interactive setting of file names -f MFILE, sets magic_measurements input fil...
[ "NAME", "trmaq_magic", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/trmaq_magic.py#L8-L187
PmagPy/PmagPy
programs/conversion_scripts/huji_sample_magic.py
main
def main(): """ NAME huji_sample_magic.py DESCRIPTION takes tab delimited Hebrew University sample file and converts to MagIC formatted tables SYNTAX huji_sample_magic.py [command line options] OPTIONS -f FILE: specify input file -Fsa FILE: specify sample o...
python
def main(): """ NAME huji_sample_magic.py DESCRIPTION takes tab delimited Hebrew University sample file and converts to MagIC formatted tables SYNTAX huji_sample_magic.py [command line options] OPTIONS -f FILE: specify input file -Fsa FILE: specify sample o...
[ "def", "main", "(", ")", ":", "args", "=", "sys", ".", "argv", "if", "\"-h\"", "in", "args", ":", "print", "(", "main", ".", "__doc__", ")", "sys", ".", "exit", "(", ")", "#", "# initialize variables", "Z", "=", "1", "# get arguments from the command lin...
NAME huji_sample_magic.py DESCRIPTION takes tab delimited Hebrew University sample file and converts to MagIC formatted tables SYNTAX huji_sample_magic.py [command line options] OPTIONS -f FILE: specify input file -Fsa FILE: specify sample output file, default is: ...
[ "NAME", "huji_sample_magic", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/conversion_scripts/huji_sample_magic.py#L7-L93
PmagPy/PmagPy
programs/vector_mean.py
main
def main(): """ NAME vector_mean.py DESCRIPTION calculates vector mean of vector data INPUT FORMAT takes dec, inc, int from an input file SYNTAX vector_mean.py [command line options] [< filename] OPTIONS -h prints help message and quits -f FILE, s...
python
def main(): """ NAME vector_mean.py DESCRIPTION calculates vector mean of vector data INPUT FORMAT takes dec, inc, int from an input file SYNTAX vector_mean.py [command line options] [< filename] OPTIONS -h prints help message and quits -f FILE, s...
[ "def", "main", "(", ")", ":", "if", "'-h'", "in", "sys", ".", "argv", ":", "# check if help is needed", "print", "(", "main", ".", "__doc__", ")", "sys", ".", "exit", "(", ")", "# graceful quit", "if", "'-f'", "in", "sys", ".", "argv", ":", "dat", "=...
NAME vector_mean.py DESCRIPTION calculates vector mean of vector data INPUT FORMAT takes dec, inc, int from an input file SYNTAX vector_mean.py [command line options] [< filename] OPTIONS -h prints help message and quits -f FILE, specify input file ...
[ "NAME", "vector_mean", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/vector_mean.py#L7-L52
PmagPy/PmagPy
programs/scalc.py
main
def main(): """ NAME scalc.py DESCRIPTION calculates Sb from VGP Long,VGP Lat,Directional kappa,Site latitude data SYNTAX scalc -h [command line options] [< standard input] INPUT takes space delimited files with PLong, PLat,[kappa, N_site, slat] OPTIONS -h p...
python
def main(): """ NAME scalc.py DESCRIPTION calculates Sb from VGP Long,VGP Lat,Directional kappa,Site latitude data SYNTAX scalc -h [command line options] [< standard input] INPUT takes space delimited files with PLong, PLat,[kappa, N_site, slat] OPTIONS -h p...
[ "def", "main", "(", ")", ":", "kappa", ",", "cutoff", "=", "0", ",", "180", "rev", ",", "anti", ",", "boot", "=", "0", ",", "0", ",", "0", "spin", ",", "n", ",", "v", ",", "mm97", "=", "0", ",", "0", ",", "0", ",", "0", "if", "'-h'", "i...
NAME scalc.py DESCRIPTION calculates Sb from VGP Long,VGP Lat,Directional kappa,Site latitude data SYNTAX scalc -h [command line options] [< standard input] INPUT takes space delimited files with PLong, PLat,[kappa, N_site, slat] OPTIONS -h prints help message and q...
[ "NAME", "scalc", ".", "py", "DESCRIPTION", "calculates", "Sb", "from", "VGP", "Long", "VGP", "Lat", "Directional", "kappa", "Site", "latitude", "data", "SYNTAX", "scalc", "-", "h", "[", "command", "line", "options", "]", "[", "<", "standard", "input", "]",...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/scalc.py#L11-L76
PmagPy/PmagPy
programs/irmaq_magic.py
main
def main(): """ NAME irmaq_magic.py DESCRIPTION plots IRM acquisition curves from measurements file SYNTAX irmaq_magic [command line options] INPUT takes magic formatted magic_measurements.txt files OPTIONS -h prints help message and quits -f FIL...
python
def main(): """ NAME irmaq_magic.py DESCRIPTION plots IRM acquisition curves from measurements file SYNTAX irmaq_magic [command line options] INPUT takes magic formatted magic_measurements.txt files OPTIONS -h prints help message and quits -f FIL...
[ "def", "main", "(", ")", ":", "FIG", "=", "{", "}", "# plot dictionary", "FIG", "[", "'exp'", "]", "=", "1", "# exp is figure 1", "dir_path", "=", "'./'", "plot", ",", "fmt", "=", "0", ",", "'svg'", "units", "=", "'T'", ",", "XLP", "=", "[", "]", ...
NAME irmaq_magic.py DESCRIPTION plots IRM acquisition curves from measurements file SYNTAX irmaq_magic [command line options] INPUT takes magic formatted magic_measurements.txt files OPTIONS -h prints help message and quits -f FILE: specify input file, d...
[ "NAME", "irmaq_magic", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/irmaq_magic.py#L13-L188
PmagPy/PmagPy
pmagpy/func.py
all_but_axis
def all_but_axis(i, axis, num_axes): """ Return a slice covering all combinations with coordinate i along axis. (Effectively the hyperplane perpendicular to axis at i.) """ the_slice = () for j in range(num_axes): if j == axis: the_slice = the_slice + (i,) else: ...
python
def all_but_axis(i, axis, num_axes): """ Return a slice covering all combinations with coordinate i along axis. (Effectively the hyperplane perpendicular to axis at i.) """ the_slice = () for j in range(num_axes): if j == axis: the_slice = the_slice + (i,) else: ...
[ "def", "all_but_axis", "(", "i", ",", "axis", ",", "num_axes", ")", ":", "the_slice", "=", "(", ")", "for", "j", "in", "range", "(", "num_axes", ")", ":", "if", "j", "==", "axis", ":", "the_slice", "=", "the_slice", "+", "(", "i", ",", ")", "else...
Return a slice covering all combinations with coordinate i along axis. (Effectively the hyperplane perpendicular to axis at i.)
[ "Return", "a", "slice", "covering", "all", "combinations", "with", "coordinate", "i", "along", "axis", ".", "(", "Effectively", "the", "hyperplane", "perpendicular", "to", "axis", "at", "i", ".", ")" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/func.py#L188-L199
PmagPy/PmagPy
pmagpy/func.py
array_map
def array_map(f, ar): "Apply an ordinary function to all values in an array." flat_ar = ravel(ar) out = zeros(len(flat_ar), flat_ar.typecode()) for i in range(len(flat_ar)): out[i] = f(flat_ar[i]) out.shape = ar.shape return out
python
def array_map(f, ar): "Apply an ordinary function to all values in an array." flat_ar = ravel(ar) out = zeros(len(flat_ar), flat_ar.typecode()) for i in range(len(flat_ar)): out[i] = f(flat_ar[i]) out.shape = ar.shape return out
[ "def", "array_map", "(", "f", ",", "ar", ")", ":", "flat_ar", "=", "ravel", "(", "ar", ")", "out", "=", "zeros", "(", "len", "(", "flat_ar", ")", ",", "flat_ar", ".", "typecode", "(", ")", ")", "for", "i", "in", "range", "(", "len", "(", "flat_...
Apply an ordinary function to all values in an array.
[ "Apply", "an", "ordinary", "function", "to", "all", "values", "in", "an", "array", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/func.py#L294-L301
PmagPy/PmagPy
dialogs/demag_dialogs.py
VGP_Dialog.on_plot_select
def on_plot_select(self,event): """ Select data point if cursor is in range of a data point @param: event -> the wx Mouseevent for that click """ if not self.xdata or not self.ydata: return pos=event.GetPosition() width, height = self.canvas.get_width_height() ...
python
def on_plot_select(self,event): """ Select data point if cursor is in range of a data point @param: event -> the wx Mouseevent for that click """ if not self.xdata or not self.ydata: return pos=event.GetPosition() width, height = self.canvas.get_width_height() ...
[ "def", "on_plot_select", "(", "self", ",", "event", ")", ":", "if", "not", "self", ".", "xdata", "or", "not", "self", ".", "ydata", ":", "return", "pos", "=", "event", ".", "GetPosition", "(", ")", "width", ",", "height", "=", "self", ".", "canvas", ...
Select data point if cursor is in range of a data point @param: event -> the wx Mouseevent for that click
[ "Select", "data", "point", "if", "cursor", "is", "in", "range", "of", "a", "data", "point" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_dialogs.py#L155-L180
PmagPy/PmagPy
dialogs/demag_dialogs.py
VGP_Dialog.on_change_plot_cursor
def on_change_plot_cursor(self,event): """ If mouse is over data point making it selectable change the shape of the cursor @param: event -> the wx Mouseevent for that click """ if not self.xdata or not self.ydata: return pos=event.GetPosition() width, height = sel...
python
def on_change_plot_cursor(self,event): """ If mouse is over data point making it selectable change the shape of the cursor @param: event -> the wx Mouseevent for that click """ if not self.xdata or not self.ydata: return pos=event.GetPosition() width, height = sel...
[ "def", "on_change_plot_cursor", "(", "self", ",", "event", ")", ":", "if", "not", "self", ".", "xdata", "or", "not", "self", ".", "ydata", ":", "return", "pos", "=", "event", ".", "GetPosition", "(", ")", "width", ",", "height", "=", "self", ".", "ca...
If mouse is over data point making it selectable change the shape of the cursor @param: event -> the wx Mouseevent for that click
[ "If", "mouse", "is", "over", "data", "point", "making", "it", "selectable", "change", "the", "shape", "of", "the", "cursor" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_dialogs.py#L182-L208
PmagPy/PmagPy
dialogs/demag_dialogs.py
user_input.get_values
def get_values(self): """ Applies parsing functions to each input as specified in init before returning a tuple with first entry being a boolean which specifies if the user entered all values and a second entry which is a dictionary of input names to parsed values. """ return_dict = {} ...
python
def get_values(self): """ Applies parsing functions to each input as specified in init before returning a tuple with first entry being a boolean which specifies if the user entered all values and a second entry which is a dictionary of input names to parsed values. """ return_dict = {} ...
[ "def", "get_values", "(", "self", ")", ":", "return_dict", "=", "{", "}", "for", "i", ",", "ctrl", "in", "enumerate", "(", "self", ".", "list_ctrls", ")", ":", "if", "hasattr", "(", "self", ".", "parse_funcs", ",", "'__getitem__'", ")", "and", "len", ...
Applies parsing functions to each input as specified in init before returning a tuple with first entry being a boolean which specifies if the user entered all values and a second entry which is a dictionary of input names to parsed values.
[ "Applies", "parsing", "functions", "to", "each", "input", "as", "specified", "in", "init", "before", "returning", "a", "tuple", "with", "first", "entry", "being", "a", "boolean", "which", "specifies", "if", "the", "user", "entered", "all", "values", "and", "...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/dialogs/demag_dialogs.py#L545-L556
PmagPy/PmagPy
programs/upload_magic.py
main
def main(): """ NAME upload_magic.py DESCRIPTION This program will prepare your MagIC text files for uploading to the MagIC database it will check for all the MagIC text files and skip the missing ones SYNTAX upload_magic.py INPUT MagIC txt files OPTI...
python
def main(): """ NAME upload_magic.py DESCRIPTION This program will prepare your MagIC text files for uploading to the MagIC database it will check for all the MagIC text files and skip the missing ones SYNTAX upload_magic.py INPUT MagIC txt files OPTI...
[ "def", "main", "(", ")", ":", "if", "'-h'", "in", "sys", ".", "argv", ":", "print", "(", "main", ".", "__doc__", ")", "sys", ".", "exit", "(", ")", "else", ":", "data_model_num", "=", "pmag", ".", "get_named_arg", "(", "\"-DM\"", ",", "3", ")", "...
NAME upload_magic.py DESCRIPTION This program will prepare your MagIC text files for uploading to the MagIC database it will check for all the MagIC text files and skip the missing ones SYNTAX upload_magic.py INPUT MagIC txt files OPTIONS -h prints he...
[ "NAME", "upload_magic", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/upload_magic.py#L7-L42
PmagPy/PmagPy
programs/forc_diagram.py
d2_func
def d2_func(x, y, z): ''' #================================================= /poly fit for every SF grid data #================================================= ''' X, Y = np.meshgrid(x, y, copy=False) X = X.flatten() Y = Y.flatten() A = np.array([np.ones(len(X)), X, X**2, Y, Y**2, X...
python
def d2_func(x, y, z): ''' #================================================= /poly fit for every SF grid data #================================================= ''' X, Y = np.meshgrid(x, y, copy=False) X = X.flatten() Y = Y.flatten() A = np.array([np.ones(len(X)), X, X**2, Y, Y**2, X...
[ "def", "d2_func", "(", "x", ",", "y", ",", "z", ")", ":", "X", ",", "Y", "=", "np", ".", "meshgrid", "(", "x", ",", "y", ",", "copy", "=", "False", ")", "X", "=", "X", ".", "flatten", "(", ")", "Y", "=", "Y", ".", "flatten", "(", ")", "...
#================================================= /poly fit for every SF grid data #=================================================
[ "#", "=================================================", "/", "poly", "fit", "for", "every", "SF", "grid", "data", "#", "=================================================" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/forc_diagram.py#L271-L285
PmagPy/PmagPy
programs/forc_diagram.py
grid_list
def grid_list(data): ''' #================================================= /process the grid data /convert to list data for poly fitting #================================================= ''' a = [] b = [] M = [] for i in data: a.append(i[0]) # np.array([i[1] for i in d...
python
def grid_list(data): ''' #================================================= /process the grid data /convert to list data for poly fitting #================================================= ''' a = [] b = [] M = [] for i in data: a.append(i[0]) # np.array([i[1] for i in d...
[ "def", "grid_list", "(", "data", ")", ":", "a", "=", "[", "]", "b", "=", "[", "]", "M", "=", "[", "]", "for", "i", "in", "data", ":", "a", ".", "append", "(", "i", "[", "0", "]", ")", "# np.array([i[1] for i in data], dtype=np.float64)", "b", ".", ...
#================================================= /process the grid data /convert to list data for poly fitting #=================================================
[ "#", "=================================================", "/", "process", "the", "grid", "data", "/", "convert", "to", "list", "data", "for", "poly", "fitting", "#", "=================================================" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/forc_diagram.py#L288-L307
PmagPy/PmagPy
programs/forc_diagram.py
Forc.fit
def fit(self, SF, x_range, y_range, matrix_z): ''' #================================================= /the main fitting process /xx,yy,zz = Hb,Ha,p /p is the FORC distribution /m0,n0 is the index of values on Ha = Hb /then loop m0 and n0 /based on smooth f...
python
def fit(self, SF, x_range, y_range, matrix_z): ''' #================================================= /the main fitting process /xx,yy,zz = Hb,Ha,p /p is the FORC distribution /m0,n0 is the index of values on Ha = Hb /then loop m0 and n0 /based on smooth f...
[ "def", "fit", "(", "self", ",", "SF", ",", "x_range", ",", "y_range", ",", "matrix_z", ")", ":", "xx", ",", "yy", ",", "zz", "=", "[", "]", ",", "[", "]", ",", "[", "]", "m0", ",", "n0", "=", "[", "]", ",", "[", "]", "for", "m", ",", "n...
#================================================= /the main fitting process /xx,yy,zz = Hb,Ha,p /p is the FORC distribution /m0,n0 is the index of values on Ha = Hb /then loop m0 and n0 /based on smooth factor(SF) /select data grid from the matrix_z for curve fit...
[ "#", "=================================================", "/", "the", "main", "fitting", "process", "/", "xx", "yy", "zz", "=", "Hb", "Ha", "p", "/", "p", "is", "the", "FORC", "distribution", "/", "m0", "n0", "is", "the", "index", "of", "values", "on", "Ha...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/forc_diagram.py#L46-L145
PmagPy/PmagPy
programs/forc_diagram.py
dataLoad.rawData
def rawData(self, fileAdres=None): # skip skiprows skiprows = None skip_from = [b'Field', b'Moment'] with open(fileAdres, 'rb') as fr: #f = fr.read() for i, line in enumerate(fr, 1): # print(line.split()) if skip_from == line.split(...
python
def rawData(self, fileAdres=None): # skip skiprows skiprows = None skip_from = [b'Field', b'Moment'] with open(fileAdres, 'rb') as fr: #f = fr.read() for i, line in enumerate(fr, 1): # print(line.split()) if skip_from == line.split(...
[ "def", "rawData", "(", "self", ",", "fileAdres", "=", "None", ")", ":", "# skip skiprows", "skiprows", "=", "None", "skip_from", "=", "[", "b'Field'", ",", "b'Moment'", "]", "with", "open", "(", "fileAdres", ",", "'rb'", ")", "as", "fr", ":", "#f = fr.re...
#================================================= /datainterval_H/_M /slice the measured data into pieces /for every measured FORC #=================================================
[ "#", "=================================================", "/", "datainterval_H", "/", "_M", "/", "slice", "the", "measured", "data", "into", "pieces", "/", "for", "every", "measured", "FORC", "#", "=================================================" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/forc_diagram.py#L187-L268
PmagPy/PmagPy
pmagpy/validate_upload2.py
get_data_model
def get_data_model(): """ try to grab the up to date data model document from the EarthRef site. if that fails, try to get the data model document from the PmagPy directory on the user's computer. if that fails, return False. data_model is a set of nested dictionaries that looks like this: {'mag...
python
def get_data_model(): """ try to grab the up to date data model document from the EarthRef site. if that fails, try to get the data model document from the PmagPy directory on the user's computer. if that fails, return False. data_model is a set of nested dictionaries that looks like this: {'mag...
[ "def", "get_data_model", "(", ")", ":", "#print(\"-I- getting data model, please be patient!!!!\")", "url", "=", "'http://earthref.org/services/MagIC-data-model.txt'", "offline", "=", "True", "# always get cached data model, as 2.5 is now static", "#try:", "# data = urllib2.urlopen(ur...
try to grab the up to date data model document from the EarthRef site. if that fails, try to get the data model document from the PmagPy directory on the user's computer. if that fails, return False. data_model is a set of nested dictionaries that looks like this: {'magic_contributions': {'group...
[ "try", "to", "grab", "the", "up", "to", "date", "data", "model", "document", "from", "the", "EarthRef", "site", ".", "if", "that", "fails", "try", "to", "get", "the", "data", "model", "document", "from", "the", "PmagPy", "directory", "on", "the", "user",...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/validate_upload2.py#L27-L75
PmagPy/PmagPy
pmagpy/validate_upload2.py
read_upload
def read_upload(up_file, data_model=None): """ take a file that should be ready for upload using the data model, check that all required columns are full, and that all numeric data is in fact numeric. print out warnings for any validation problems return True if there were no problems, otherwise...
python
def read_upload(up_file, data_model=None): """ take a file that should be ready for upload using the data model, check that all required columns are full, and that all numeric data is in fact numeric. print out warnings for any validation problems return True if there were no problems, otherwise...
[ "def", "read_upload", "(", "up_file", ",", "data_model", "=", "None", ")", ":", "print", "(", "\"-I- Running validation for your upload file\"", ")", "## Read file", "f", "=", "open", "(", "up_file", ")", "lines", "=", "f", ".", "readlines", "(", ")", "f", "...
take a file that should be ready for upload using the data model, check that all required columns are full, and that all numeric data is in fact numeric. print out warnings for any validation problems return True if there were no problems, otherwise return False
[ "take", "a", "file", "that", "should", "be", "ready", "for", "upload", "using", "the", "data", "model", "check", "that", "all", "required", "columns", "are", "full", "and", "that", "all", "numeric", "data", "is", "in", "fact", "numeric", ".", "print", "o...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/validate_upload2.py#L78-L247
PmagPy/PmagPy
pmagpy/validate_upload2.py
split_lines
def split_lines(lines): """ split a MagIC upload format file into lists. the lists are split by the '>>>' lines between file_types. """ container = [] new_list = [] for line in lines: if '>>>' in line: container.append(new_list) new_list = [] else: ...
python
def split_lines(lines): """ split a MagIC upload format file into lists. the lists are split by the '>>>' lines between file_types. """ container = [] new_list = [] for line in lines: if '>>>' in line: container.append(new_list) new_list = [] else: ...
[ "def", "split_lines", "(", "lines", ")", ":", "container", "=", "[", "]", "new_list", "=", "[", "]", "for", "line", "in", "lines", ":", "if", "'>>>'", "in", "line", ":", "container", ".", "append", "(", "new_list", ")", "new_list", "=", "[", "]", "...
split a MagIC upload format file into lists. the lists are split by the '>>>' lines between file_types.
[ "split", "a", "MagIC", "upload", "format", "file", "into", "lists", ".", "the", "lists", "are", "split", "by", "the", ">>>", "lines", "between", "file_types", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/validate_upload2.py#L250-L264
PmagPy/PmagPy
pmagpy/validate_upload2.py
get_dicts
def get_dicts(data): """ data must be a list of lists, from a tab delimited file. in each list: the first list item will be the type of data. the second list item will be a tab delimited list of headers. the remaining items will be a tab delimited list following the list of headers. """ ...
python
def get_dicts(data): """ data must be a list of lists, from a tab delimited file. in each list: the first list item will be the type of data. the second list item will be a tab delimited list of headers. the remaining items will be a tab delimited list following the list of headers. """ ...
[ "def", "get_dicts", "(", "data", ")", ":", "data_dictionaries", "=", "[", "]", "for", "chunk", "in", "data", "[", ":", "-", "1", "]", ":", "if", "not", "chunk", ":", "continue", "data1", "=", "data", "[", "0", "]", "file_type", "=", "chunk", "[", ...
data must be a list of lists, from a tab delimited file. in each list: the first list item will be the type of data. the second list item will be a tab delimited list of headers. the remaining items will be a tab delimited list following the list of headers.
[ "data", "must", "be", "a", "list", "of", "lists", "from", "a", "tab", "delimited", "file", ".", "in", "each", "list", ":", "the", "first", "list", "item", "will", "be", "the", "type", "of", "data", ".", "the", "second", "list", "item", "will", "be", ...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/validate_upload2.py#L267-L298
PmagPy/PmagPy
programs/lsq_redo.py
main
def main(): """ NAME lsq_redo.py DESCRIPTION converts a tab delimited LSQ format to PmagPy redo file and edits the magic_measurements table to mark "bad" measurements. SYNTAX lsq_redo.py [-h] [command line options] OPTIONS -h: prints help message and quits ...
python
def main(): """ NAME lsq_redo.py DESCRIPTION converts a tab delimited LSQ format to PmagPy redo file and edits the magic_measurements table to mark "bad" measurements. SYNTAX lsq_redo.py [-h] [command line options] OPTIONS -h: prints help message and quits ...
[ "def", "main", "(", ")", ":", "letters", "=", "string", ".", "ascii_uppercase", "for", "l", "in", "string", ".", "ascii_lowercase", ":", "letters", "=", "letters", "+", "l", "dir_path", "=", "'.'", "if", "'-WD'", "in", "sys", ".", "argv", ":", "ind", ...
NAME lsq_redo.py DESCRIPTION converts a tab delimited LSQ format to PmagPy redo file and edits the magic_measurements table to mark "bad" measurements. SYNTAX lsq_redo.py [-h] [command line options] OPTIONS -h: prints help message and quits -f FILE: specify LSQ inp...
[ "NAME", "lsq_redo", ".", "py" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/programs/lsq_redo.py#L8-L141
PmagPy/PmagPy
pmagpy/ipmag.py
igrf
def igrf(input_list, mod='', ghfile=""): """ Determine Declination, Inclination and Intensity from the IGRF model. (http://www.ngdc.noaa.gov/IAGA/vmod/igrf.html) Parameters ---------- input_list : list with format [Date, Altitude, Latitude, Longitude] date must be in decimal year format...
python
def igrf(input_list, mod='', ghfile=""): """ Determine Declination, Inclination and Intensity from the IGRF model. (http://www.ngdc.noaa.gov/IAGA/vmod/igrf.html) Parameters ---------- input_list : list with format [Date, Altitude, Latitude, Longitude] date must be in decimal year format...
[ "def", "igrf", "(", "input_list", ",", "mod", "=", "''", ",", "ghfile", "=", "\"\"", ")", ":", "if", "ghfile", "!=", "\"\"", ":", "lmgh", "=", "np", ".", "loadtxt", "(", "ghfile", ")", "gh", "=", "[", "]", "lmgh", "=", "np", ".", "loadtxt", "("...
Determine Declination, Inclination and Intensity from the IGRF model. (http://www.ngdc.noaa.gov/IAGA/vmod/igrf.html) Parameters ---------- input_list : list with format [Date, Altitude, Latitude, Longitude] date must be in decimal year format XXXX.XXXX (Common Era) mod : desired model ...
[ "Determine", "Declination", "Inclination", "and", "Intensity", "from", "the", "IGRF", "model", ".", "(", "http", ":", "//", "www", ".", "ngdc", ".", "noaa", ".", "gov", "/", "IAGA", "/", "vmod", "/", "igrf", ".", "html", ")" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L35-L99
PmagPy/PmagPy
pmagpy/ipmag.py
dms2dd
def dms2dd(degrees, minutes, seconds): """ Convert latitude/longitude of a location that is in degrees, minutes, seconds to decimal degrees Parameters ---------- degrees : degrees of latitude/longitude minutes : minutes of latitude/longitude seconds : seconds of latitude/longitude Retu...
python
def dms2dd(degrees, minutes, seconds): """ Convert latitude/longitude of a location that is in degrees, minutes, seconds to decimal degrees Parameters ---------- degrees : degrees of latitude/longitude minutes : minutes of latitude/longitude seconds : seconds of latitude/longitude Retu...
[ "def", "dms2dd", "(", "degrees", ",", "minutes", ",", "seconds", ")", ":", "dd", "=", "float", "(", "degrees", ")", "+", "old_div", "(", "float", "(", "minutes", ")", ",", "60", ")", "+", "old_div", "(", "float", "(", "seconds", ")", ",", "(", "6...
Convert latitude/longitude of a location that is in degrees, minutes, seconds to decimal degrees Parameters ---------- degrees : degrees of latitude/longitude minutes : minutes of latitude/longitude seconds : seconds of latitude/longitude Returns ------- degrees : decimal degrees of lo...
[ "Convert", "latitude", "/", "longitude", "of", "a", "location", "that", "is", "in", "degrees", "minutes", "seconds", "to", "decimal", "degrees" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L127-L150
PmagPy/PmagPy
pmagpy/ipmag.py
fisher_mean
def fisher_mean(dec=None, inc=None, di_block=None): """ Calculates the Fisher mean and associated parameters from either a list of declination values and a separate list of inclination values or from a di_block (a nested list a nested list of [dec,inc,1.0]). Returns a dictionary with the Fisher mean...
python
def fisher_mean(dec=None, inc=None, di_block=None): """ Calculates the Fisher mean and associated parameters from either a list of declination values and a separate list of inclination values or from a di_block (a nested list a nested list of [dec,inc,1.0]). Returns a dictionary with the Fisher mean...
[ "def", "fisher_mean", "(", "dec", "=", "None", ",", "inc", "=", "None", ",", "di_block", "=", "None", ")", ":", "if", "di_block", "is", "None", ":", "di_block", "=", "make_di_block", "(", "dec", ",", "inc", ")", "return", "pmag", ".", "fisher_mean", ...
Calculates the Fisher mean and associated parameters from either a list of declination values and a separate list of inclination values or from a di_block (a nested list a nested list of [dec,inc,1.0]). Returns a dictionary with the Fisher mean and statistical parameters. Parameters ---------- ...
[ "Calculates", "the", "Fisher", "mean", "and", "associated", "parameters", "from", "either", "a", "list", "of", "declination", "values", "and", "a", "separate", "list", "of", "inclination", "values", "or", "from", "a", "di_block", "(", "a", "nested", "list", ...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L153-L194
PmagPy/PmagPy
pmagpy/ipmag.py
fisher_angular_deviation
def fisher_angular_deviation(dec=None, inc=None, di_block=None, confidence=95): ''' The angle from the true mean within which a chosen percentage of directions lie can be calculated from the Fisher distribution. This function uses the calculated Fisher concentration parameter to estimate this angle from...
python
def fisher_angular_deviation(dec=None, inc=None, di_block=None, confidence=95): ''' The angle from the true mean within which a chosen percentage of directions lie can be calculated from the Fisher distribution. This function uses the calculated Fisher concentration parameter to estimate this angle from...
[ "def", "fisher_angular_deviation", "(", "dec", "=", "None", ",", "inc", "=", "None", ",", "di_block", "=", "None", ",", "confidence", "=", "95", ")", ":", "if", "di_block", "is", "None", ":", "di_block", "=", "make_di_block", "(", "dec", ",", "inc", ")...
The angle from the true mean within which a chosen percentage of directions lie can be calculated from the Fisher distribution. This function uses the calculated Fisher concentration parameter to estimate this angle from directional data. The 63 percent confidence interval is often called the angular st...
[ "The", "angle", "from", "the", "true", "mean", "within", "which", "a", "chosen", "percentage", "of", "directions", "lie", "can", "be", "calculated", "from", "the", "Fisher", "distribution", ".", "This", "function", "uses", "the", "calculated", "Fisher", "conce...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L197-L230
PmagPy/PmagPy
pmagpy/ipmag.py
bingham_mean
def bingham_mean(dec=None, inc=None, di_block=None): """ Calculates the Bingham mean and associated statistical parameters from either a list of declination values and a separate list of inclination values or from a di_block (a nested list a nested list of [dec,inc,1.0]). Returns a dictionary with t...
python
def bingham_mean(dec=None, inc=None, di_block=None): """ Calculates the Bingham mean and associated statistical parameters from either a list of declination values and a separate list of inclination values or from a di_block (a nested list a nested list of [dec,inc,1.0]). Returns a dictionary with t...
[ "def", "bingham_mean", "(", "dec", "=", "None", ",", "inc", "=", "None", ",", "di_block", "=", "None", ")", ":", "if", "di_block", "is", "None", ":", "di_block", "=", "make_di_block", "(", "dec", ",", "inc", ")", "return", "pmag", ".", "dobingham", "...
Calculates the Bingham mean and associated statistical parameters from either a list of declination values and a separate list of inclination values or from a di_block (a nested list a nested list of [dec,inc,1.0]). Returns a dictionary with the Bingham mean and statistical parameters. Parameters -...
[ "Calculates", "the", "Bingham", "mean", "and", "associated", "statistical", "parameters", "from", "either", "a", "list", "of", "declination", "values", "and", "a", "separate", "list", "of", "inclination", "values", "or", "from", "a", "di_block", "(", "a", "nes...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L233-L280
PmagPy/PmagPy
pmagpy/ipmag.py
kent_mean
def kent_mean(dec=None, inc=None, di_block=None): """ Calculates the Kent mean and associated statistical parameters from either a list of declination values and a separate list of inclination values or from a di_block (a nested list a nested list of [dec,inc,1.0]). Returns a dictionary with the Ken...
python
def kent_mean(dec=None, inc=None, di_block=None): """ Calculates the Kent mean and associated statistical parameters from either a list of declination values and a separate list of inclination values or from a di_block (a nested list a nested list of [dec,inc,1.0]). Returns a dictionary with the Ken...
[ "def", "kent_mean", "(", "dec", "=", "None", ",", "inc", "=", "None", ",", "di_block", "=", "None", ")", ":", "if", "di_block", "is", "None", ":", "di_block", "=", "make_di_block", "(", "dec", ",", "inc", ")", "return", "pmag", ".", "dokent", "(", ...
Calculates the Kent mean and associated statistical parameters from either a list of declination values and a separate list of inclination values or from a di_block (a nested list a nested list of [dec,inc,1.0]). Returns a dictionary with the Kent mean and statistical parameters. Parameters -------...
[ "Calculates", "the", "Kent", "mean", "and", "associated", "statistical", "parameters", "from", "either", "a", "list", "of", "declination", "values", "and", "a", "separate", "list", "of", "inclination", "values", "or", "from", "a", "di_block", "(", "a", "nested...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L283-L330
PmagPy/PmagPy
pmagpy/ipmag.py
print_direction_mean
def print_direction_mean(mean_dictionary): """ Does a pretty job printing a Fisher mean and associated statistics for directional data. Parameters ---------- mean_dictionary: output dictionary of pmag.fisher_mean Examples -------- Generate a Fisher mean using ``ipmag.fisher_mean`` ...
python
def print_direction_mean(mean_dictionary): """ Does a pretty job printing a Fisher mean and associated statistics for directional data. Parameters ---------- mean_dictionary: output dictionary of pmag.fisher_mean Examples -------- Generate a Fisher mean using ``ipmag.fisher_mean`` ...
[ "def", "print_direction_mean", "(", "mean_dictionary", ")", ":", "print", "(", "'Dec: '", "+", "str", "(", "round", "(", "mean_dictionary", "[", "'dec'", "]", ",", "1", ")", ")", "+", "' Inc: '", "+", "str", "(", "round", "(", "mean_dictionary", "[", "'...
Does a pretty job printing a Fisher mean and associated statistics for directional data. Parameters ---------- mean_dictionary: output dictionary of pmag.fisher_mean Examples -------- Generate a Fisher mean using ``ipmag.fisher_mean`` and then print it nicely using ``ipmag.print_direct...
[ "Does", "a", "pretty", "job", "printing", "a", "Fisher", "mean", "and", "associated", "statistics", "for", "directional", "data", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L333-L360
PmagPy/PmagPy
pmagpy/ipmag.py
print_pole_mean
def print_pole_mean(mean_dictionary): """ Does a pretty job printing a Fisher mean and associated statistics for mean paleomagnetic poles. Parameters ---------- mean_dictionary: output dictionary of pmag.fisher_mean Examples -------- Generate a Fisher mean using ``ipmag.fisher_mean...
python
def print_pole_mean(mean_dictionary): """ Does a pretty job printing a Fisher mean and associated statistics for mean paleomagnetic poles. Parameters ---------- mean_dictionary: output dictionary of pmag.fisher_mean Examples -------- Generate a Fisher mean using ``ipmag.fisher_mean...
[ "def", "print_pole_mean", "(", "mean_dictionary", ")", ":", "print", "(", "'Plon: '", "+", "str", "(", "round", "(", "mean_dictionary", "[", "'dec'", "]", ",", "1", ")", ")", "+", "' Plat: '", "+", "str", "(", "round", "(", "mean_dictionary", "[", "'inc...
Does a pretty job printing a Fisher mean and associated statistics for mean paleomagnetic poles. Parameters ---------- mean_dictionary: output dictionary of pmag.fisher_mean Examples -------- Generate a Fisher mean using ``ipmag.fisher_mean`` and then print it nicely using ``ipmag.prin...
[ "Does", "a", "pretty", "job", "printing", "a", "Fisher", "mean", "and", "associated", "statistics", "for", "mean", "paleomagnetic", "poles", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L363-L390
PmagPy/PmagPy
pmagpy/ipmag.py
fishrot
def fishrot(k=20, n=100, dec=0, inc=90, di_block=True): """ Generates Fisher distributed unit vectors from a specified distribution using the pmag.py fshdev and dodirot functions. Parameters ---------- k : kappa precision parameter (default is 20) n : number of vectors to determine (default...
python
def fishrot(k=20, n=100, dec=0, inc=90, di_block=True): """ Generates Fisher distributed unit vectors from a specified distribution using the pmag.py fshdev and dodirot functions. Parameters ---------- k : kappa precision parameter (default is 20) n : number of vectors to determine (default...
[ "def", "fishrot", "(", "k", "=", "20", ",", "n", "=", "100", ",", "dec", "=", "0", ",", "inc", "=", "90", ",", "di_block", "=", "True", ")", ":", "directions", "=", "[", "]", "declinations", "=", "[", "]", "inclinations", "=", "[", "]", "if", ...
Generates Fisher distributed unit vectors from a specified distribution using the pmag.py fshdev and dodirot functions. Parameters ---------- k : kappa precision parameter (default is 20) n : number of vectors to determine (default is 100) dec : mean declination of distribution (default is 0) ...
[ "Generates", "Fisher", "distributed", "unit", "vectors", "from", "a", "specified", "distribution", "using", "the", "pmag", ".", "py", "fshdev", "and", "dodirot", "functions", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L393-L436
PmagPy/PmagPy
pmagpy/ipmag.py
tk03
def tk03(n=100, dec=0, lat=0, rev='no', G2=0, G3=0): """ Generates vectors drawn from the TK03.gad model of secular variation (Tauxe and Kent, 2004) at given latitude and rotated about a vertical axis by the given declination. Return a nested list of of [dec,inc,intensity]. Parameters -----...
python
def tk03(n=100, dec=0, lat=0, rev='no', G2=0, G3=0): """ Generates vectors drawn from the TK03.gad model of secular variation (Tauxe and Kent, 2004) at given latitude and rotated about a vertical axis by the given declination. Return a nested list of of [dec,inc,intensity]. Parameters -----...
[ "def", "tk03", "(", "n", "=", "100", ",", "dec", "=", "0", ",", "lat", "=", "0", ",", "rev", "=", "'no'", ",", "G2", "=", "0", ",", "G3", "=", "0", ")", ":", "tk_03_output", "=", "[", "]", "for", "k", "in", "range", "(", "n", ")", ":", ...
Generates vectors drawn from the TK03.gad model of secular variation (Tauxe and Kent, 2004) at given latitude and rotated about a vertical axis by the given declination. Return a nested list of of [dec,inc,intensity]. Parameters ---------- n : number of vectors to determine (default is 100) ...
[ "Generates", "vectors", "drawn", "from", "the", "TK03", ".", "gad", "model", "of", "secular", "variation", "(", "Tauxe", "and", "Kent", "2004", ")", "at", "given", "latitude", "and", "rotated", "about", "a", "vertical", "axis", "by", "the", "given", "decli...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L439-L481
PmagPy/PmagPy
pmagpy/ipmag.py
unsquish
def unsquish(incs, f): """ This function applies uses a flattening factor (f) to unflatten inclination data (incs) and returns 'unsquished' values. Parameters ---------- incs : list of inclination values or a single value f : unflattening factor (between 0.0 and 1.0) Returns ------...
python
def unsquish(incs, f): """ This function applies uses a flattening factor (f) to unflatten inclination data (incs) and returns 'unsquished' values. Parameters ---------- incs : list of inclination values or a single value f : unflattening factor (between 0.0 and 1.0) Returns ------...
[ "def", "unsquish", "(", "incs", ",", "f", ")", ":", "try", ":", "length", "=", "len", "(", "incs", ")", "incs_unsquished", "=", "[", "]", "for", "n", "in", "range", "(", "0", ",", "length", ")", ":", "inc_rad", "=", "np", ".", "deg2rad", "(", "...
This function applies uses a flattening factor (f) to unflatten inclination data (incs) and returns 'unsquished' values. Parameters ---------- incs : list of inclination values or a single value f : unflattening factor (between 0.0 and 1.0) Returns ---------- incs_unsquished : List of ...
[ "This", "function", "applies", "uses", "a", "flattening", "factor", "(", "f", ")", "to", "unflatten", "inclination", "data", "(", "incs", ")", "and", "returns", "unsquished", "values", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L484-L522
PmagPy/PmagPy
pmagpy/ipmag.py
squish
def squish(incs, f): """ This function applies an flattening factor (f) to inclination data (incs) and returns 'squished' values. Parameters ---------- incs : list of inclination values or a single value f : flattening factor (between 0.0 and 1.0) Returns --------- incs_squishe...
python
def squish(incs, f): """ This function applies an flattening factor (f) to inclination data (incs) and returns 'squished' values. Parameters ---------- incs : list of inclination values or a single value f : flattening factor (between 0.0 and 1.0) Returns --------- incs_squishe...
[ "def", "squish", "(", "incs", ",", "f", ")", ":", "try", ":", "length", "=", "len", "(", "incs", ")", "incs_squished", "=", "[", "]", "for", "n", "in", "range", "(", "0", ",", "length", ")", ":", "inc_rad", "=", "incs", "[", "n", "]", "*", "n...
This function applies an flattening factor (f) to inclination data (incs) and returns 'squished' values. Parameters ---------- incs : list of inclination values or a single value f : flattening factor (between 0.0 and 1.0) Returns --------- incs_squished : List of flattened directions ...
[ "This", "function", "applies", "an", "flattening", "factor", "(", "f", ")", "to", "inclination", "data", "(", "incs", ")", "and", "returns", "squished", "values", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L525-L562
PmagPy/PmagPy
pmagpy/ipmag.py
do_flip
def do_flip(dec=None, inc=None, di_block=None): """ This function returns the antipode (i.e. it flips) of directions. The function can take dec and inc as seperate lists if they are of equal length and explicitly specified or are the first two arguments. It will then return a list of flipped decs a...
python
def do_flip(dec=None, inc=None, di_block=None): """ This function returns the antipode (i.e. it flips) of directions. The function can take dec and inc as seperate lists if they are of equal length and explicitly specified or are the first two arguments. It will then return a list of flipped decs a...
[ "def", "do_flip", "(", "dec", "=", "None", ",", "inc", "=", "None", ",", "di_block", "=", "None", ")", ":", "if", "di_block", "is", "None", ":", "dec_flip", "=", "[", "]", "inc_flip", "=", "[", "]", "for", "n", "in", "range", "(", "0", ",", "le...
This function returns the antipode (i.e. it flips) of directions. The function can take dec and inc as seperate lists if they are of equal length and explicitly specified or are the first two arguments. It will then return a list of flipped decs and a list of flipped incs. If a di_block (a nested list ...
[ "This", "function", "returns", "the", "antipode", "(", "i", ".", "e", ".", "it", "flips", ")", "of", "directions", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L565-L620
PmagPy/PmagPy
pmagpy/ipmag.py
common_mean_bootstrap
def common_mean_bootstrap(Data1, Data2, NumSims=1000, save=False, save_folder='.', fmt='svg', figsize=(7, 2.3), x_tick_bins=4): """ Conduct a bootstrap test (Tauxe, 2010) for a common mean on two declination, inclination data sets. Plots are generated of the cumulative distributions of the Cartesian coo...
python
def common_mean_bootstrap(Data1, Data2, NumSims=1000, save=False, save_folder='.', fmt='svg', figsize=(7, 2.3), x_tick_bins=4): """ Conduct a bootstrap test (Tauxe, 2010) for a common mean on two declination, inclination data sets. Plots are generated of the cumulative distributions of the Cartesian coo...
[ "def", "common_mean_bootstrap", "(", "Data1", ",", "Data2", ",", "NumSims", "=", "1000", ",", "save", "=", "False", ",", "save_folder", "=", "'.'", ",", "fmt", "=", "'svg'", ",", "figsize", "=", "(", "7", ",", "2.3", ")", ",", "x_tick_bins", "=", "4"...
Conduct a bootstrap test (Tauxe, 2010) for a common mean on two declination, inclination data sets. Plots are generated of the cumulative distributions of the Cartesian coordinates of the means of the pseudo-samples (one for x, one for y and one for z). If the 95 percent confidence bounds for each compo...
[ "Conduct", "a", "bootstrap", "test", "(", "Tauxe", "2010", ")", "for", "a", "common", "mean", "on", "two", "declination", "inclination", "data", "sets", ".", "Plots", "are", "generated", "of", "the", "cumulative", "distributions", "of", "the", "Cartesian", "...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L749-L847
PmagPy/PmagPy
pmagpy/ipmag.py
common_mean_watson
def common_mean_watson(Data1, Data2, NumSims=5000, print_result=True, plot='no', save=False, save_folder='.', fmt='svg'): """ Conduct a Watson V test for a common mean on two directional data sets. This function calculates Watson's V statistic from input files through Monte Carlo simulation in order to...
python
def common_mean_watson(Data1, Data2, NumSims=5000, print_result=True, plot='no', save=False, save_folder='.', fmt='svg'): """ Conduct a Watson V test for a common mean on two directional data sets. This function calculates Watson's V statistic from input files through Monte Carlo simulation in order to...
[ "def", "common_mean_watson", "(", "Data1", ",", "Data2", ",", "NumSims", "=", "5000", ",", "print_result", "=", "True", ",", "plot", "=", "'no'", ",", "save", "=", "False", ",", "save_folder", "=", "'.'", ",", "fmt", "=", "'svg'", ")", ":", "pars_1", ...
Conduct a Watson V test for a common mean on two directional data sets. This function calculates Watson's V statistic from input files through Monte Carlo simulation in order to test whether two populations of directional data could have been drawn from a common mean. The critical angle between the two...
[ "Conduct", "a", "Watson", "V", "test", "for", "a", "common", "mean", "on", "two", "directional", "data", "sets", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L850-L1012
PmagPy/PmagPy
pmagpy/ipmag.py
fishqq
def fishqq(lon=None, lat=None, di_block=None): """ Test whether a distribution is Fisherian and make a corresponding Q-Q plot. The Q-Q plot shows the data plotted against the value expected from a Fisher distribution. The first plot is the uniform plot which is the Fisher model distribution in terms...
python
def fishqq(lon=None, lat=None, di_block=None): """ Test whether a distribution is Fisherian and make a corresponding Q-Q plot. The Q-Q plot shows the data plotted against the value expected from a Fisher distribution. The first plot is the uniform plot which is the Fisher model distribution in terms...
[ "def", "fishqq", "(", "lon", "=", "None", ",", "lat", "=", "None", ",", "di_block", "=", "None", ")", ":", "if", "di_block", "is", "None", ":", "all_dirs", "=", "make_di_block", "(", "lon", ",", "lat", ")", "else", ":", "all_dirs", "=", "di_block", ...
Test whether a distribution is Fisherian and make a corresponding Q-Q plot. The Q-Q plot shows the data plotted against the value expected from a Fisher distribution. The first plot is the uniform plot which is the Fisher model distribution in terms of longitude (declination). The second plot is the exp...
[ "Test", "whether", "a", "distribution", "is", "Fisherian", "and", "make", "a", "corresponding", "Q", "-", "Q", "plot", ".", "The", "Q", "-", "Q", "plot", "shows", "the", "data", "plotted", "against", "the", "value", "expected", "from", "a", "Fisher", "di...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L1201-L1376
PmagPy/PmagPy
pmagpy/ipmag.py
lat_from_inc
def lat_from_inc(inc, a95=None): """ Calculate paleolatitude from inclination using the dipole equation Required Parameter ---------- inc: (paleo)magnetic inclination in degrees Optional Parameter ---------- a95: 95% confidence interval from Fisher mean Returns ---------- ...
python
def lat_from_inc(inc, a95=None): """ Calculate paleolatitude from inclination using the dipole equation Required Parameter ---------- inc: (paleo)magnetic inclination in degrees Optional Parameter ---------- a95: 95% confidence interval from Fisher mean Returns ---------- ...
[ "def", "lat_from_inc", "(", "inc", ",", "a95", "=", "None", ")", ":", "rad", "=", "old_div", "(", "np", ".", "pi", ",", "180.", ")", "paleo_lat", "=", "old_div", "(", "np", ".", "arctan", "(", "0.5", "*", "np", ".", "tan", "(", "inc", "*", "rad...
Calculate paleolatitude from inclination using the dipole equation Required Parameter ---------- inc: (paleo)magnetic inclination in degrees Optional Parameter ---------- a95: 95% confidence interval from Fisher mean Returns ---------- if a95 is provided paleo_lat, paleo_lat_max, ...
[ "Calculate", "paleolatitude", "from", "inclination", "using", "the", "dipole", "equation" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L1379-L1405
PmagPy/PmagPy
pmagpy/ipmag.py
lat_from_pole
def lat_from_pole(ref_loc_lon, ref_loc_lat, pole_plon, pole_plat): """ Calculate paleolatitude for a reference location based on a paleomagnetic pole Required Parameters ---------- ref_loc_lon: longitude of reference location in degrees ref_loc_lat: latitude of reference location pole_plon:...
python
def lat_from_pole(ref_loc_lon, ref_loc_lat, pole_plon, pole_plat): """ Calculate paleolatitude for a reference location based on a paleomagnetic pole Required Parameters ---------- ref_loc_lon: longitude of reference location in degrees ref_loc_lat: latitude of reference location pole_plon:...
[ "def", "lat_from_pole", "(", "ref_loc_lon", ",", "ref_loc_lat", ",", "pole_plon", ",", "pole_plat", ")", ":", "ref_loc", "=", "(", "ref_loc_lon", ",", "ref_loc_lat", ")", "pole", "=", "(", "pole_plon", ",", "pole_plat", ")", "paleo_lat", "=", "90", "-", "p...
Calculate paleolatitude for a reference location based on a paleomagnetic pole Required Parameters ---------- ref_loc_lon: longitude of reference location in degrees ref_loc_lat: latitude of reference location pole_plon: paleopole longitude in degrees pole_plat: paleopole latitude in degrees
[ "Calculate", "paleolatitude", "for", "a", "reference", "location", "based", "on", "a", "paleomagnetic", "pole" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L1408-L1423
PmagPy/PmagPy
pmagpy/ipmag.py
inc_from_lat
def inc_from_lat(lat): """ Calculate inclination predicted from latitude using the dipole equation Parameter ---------- lat : latitude in degrees Returns ------- inc : inclination calculated using the dipole equation """ rad = old_div(np.pi, 180.) inc = old_div(np.arctan(2 ...
python
def inc_from_lat(lat): """ Calculate inclination predicted from latitude using the dipole equation Parameter ---------- lat : latitude in degrees Returns ------- inc : inclination calculated using the dipole equation """ rad = old_div(np.pi, 180.) inc = old_div(np.arctan(2 ...
[ "def", "inc_from_lat", "(", "lat", ")", ":", "rad", "=", "old_div", "(", "np", ".", "pi", ",", "180.", ")", "inc", "=", "old_div", "(", "np", ".", "arctan", "(", "2", "*", "np", ".", "tan", "(", "lat", "*", "rad", ")", ")", ",", "rad", ")", ...
Calculate inclination predicted from latitude using the dipole equation Parameter ---------- lat : latitude in degrees Returns ------- inc : inclination calculated using the dipole equation
[ "Calculate", "inclination", "predicted", "from", "latitude", "using", "the", "dipole", "equation" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L1426-L1440
PmagPy/PmagPy
pmagpy/ipmag.py
plot_net
def plot_net(fignum): """ Draws circle and tick marks for equal area projection. """ # make the perimeter plt.figure(num=fignum,) plt.clf() plt.axis("off") Dcirc = np.arange(0, 361.) Icirc = np.zeros(361, 'f') Xcirc, Ycirc = [], [] for k in range(361): XY = pmag.dimap(Dc...
python
def plot_net(fignum): """ Draws circle and tick marks for equal area projection. """ # make the perimeter plt.figure(num=fignum,) plt.clf() plt.axis("off") Dcirc = np.arange(0, 361.) Icirc = np.zeros(361, 'f') Xcirc, Ycirc = [], [] for k in range(361): XY = pmag.dimap(Dc...
[ "def", "plot_net", "(", "fignum", ")", ":", "# make the perimeter", "plt", ".", "figure", "(", "num", "=", "fignum", ",", ")", "plt", ".", "clf", "(", ")", "plt", ".", "axis", "(", "\"off\"", ")", "Dcirc", "=", "np", ".", "arange", "(", "0", ",", ...
Draws circle and tick marks for equal area projection.
[ "Draws", "circle", "and", "tick", "marks", "for", "equal", "area", "projection", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L1443-L1494
PmagPy/PmagPy
pmagpy/ipmag.py
plot_di
def plot_di(dec=None, inc=None, di_block=None, color='k', marker='o', markersize=20, legend='no', label='', title='', edge='',alpha=1): """ Plot declination, inclination data on an equal area plot. Before this function is called a plot needs to be initialized with code that looks something like: >f...
python
def plot_di(dec=None, inc=None, di_block=None, color='k', marker='o', markersize=20, legend='no', label='', title='', edge='',alpha=1): """ Plot declination, inclination data on an equal area plot. Before this function is called a plot needs to be initialized with code that looks something like: >f...
[ "def", "plot_di", "(", "dec", "=", "None", ",", "inc", "=", "None", ",", "di_block", "=", "None", ",", "color", "=", "'k'", ",", "marker", "=", "'o'", ",", "markersize", "=", "20", ",", "legend", "=", "'no'", ",", "label", "=", "''", ",", "title"...
Plot declination, inclination data on an equal area plot. Before this function is called a plot needs to be initialized with code that looks something like: >fignum = 1 >plt.figure(num=fignum,figsize=(10,10),dpi=160) >ipmag.plot_net(fignum) Required Parameters ----------- dec : declina...
[ "Plot", "declination", "inclination", "data", "on", "an", "equal", "area", "plot", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L1501-L1584
PmagPy/PmagPy
pmagpy/ipmag.py
plot_di_mean
def plot_di_mean(dec, inc, a95, color='k', marker='o', markersize=20, label='', legend='no'): """ Plot a mean direction (declination, inclination) with alpha_95 ellipse on an equal area plot. Before this function is called, a plot needs to be initialized with code that looks something like: >fi...
python
def plot_di_mean(dec, inc, a95, color='k', marker='o', markersize=20, label='', legend='no'): """ Plot a mean direction (declination, inclination) with alpha_95 ellipse on an equal area plot. Before this function is called, a plot needs to be initialized with code that looks something like: >fi...
[ "def", "plot_di_mean", "(", "dec", ",", "inc", ",", "a95", ",", "color", "=", "'k'", ",", "marker", "=", "'o'", ",", "markersize", "=", "20", ",", "label", "=", "''", ",", "legend", "=", "'no'", ")", ":", "DI_dimap", "=", "pmag", ".", "dimap", "(...
Plot a mean direction (declination, inclination) with alpha_95 ellipse on an equal area plot. Before this function is called, a plot needs to be initialized with code that looks something like: >fignum = 1 >plt.figure(num=fignum,figsize=(10,10),dpi=160) >ipmag.plot_net(fignum) Required Par...
[ "Plot", "a", "mean", "direction", "(", "declination", "inclination", ")", "with", "alpha_95", "ellipse", "on", "an", "equal", "area", "plot", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L1587-L1630
PmagPy/PmagPy
pmagpy/ipmag.py
plot_di_mean_bingham
def plot_di_mean_bingham(bingham_dictionary, fignum=1, color='k', marker='o', markersize=20, label='', legend='no'): """ see plot_di_mean_ellipse """ plot_di_mean_ellipse(bingham_dictionary, fignum=fignum, color=color, marker=marker, markersize=markersize, label=label, legend=le...
python
def plot_di_mean_bingham(bingham_dictionary, fignum=1, color='k', marker='o', markersize=20, label='', legend='no'): """ see plot_di_mean_ellipse """ plot_di_mean_ellipse(bingham_dictionary, fignum=fignum, color=color, marker=marker, markersize=markersize, label=label, legend=le...
[ "def", "plot_di_mean_bingham", "(", "bingham_dictionary", ",", "fignum", "=", "1", ",", "color", "=", "'k'", ",", "marker", "=", "'o'", ",", "markersize", "=", "20", ",", "label", "=", "''", ",", "legend", "=", "'no'", ")", ":", "plot_di_mean_ellipse", "...
see plot_di_mean_ellipse
[ "see", "plot_di_mean_ellipse" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L1633-L1638
PmagPy/PmagPy
pmagpy/ipmag.py
plot_di_mean_ellipse
def plot_di_mean_ellipse(dictionary, fignum=1, color='k', marker='o', markersize=20, label='', legend='no'): """ Plot a mean direction (declination, inclination) confidence ellipse. Parameters ----------- dictionary : a dictionary generated by the pmag.dobingham or pmag.dokent funcitons """ ...
python
def plot_di_mean_ellipse(dictionary, fignum=1, color='k', marker='o', markersize=20, label='', legend='no'): """ Plot a mean direction (declination, inclination) confidence ellipse. Parameters ----------- dictionary : a dictionary generated by the pmag.dobingham or pmag.dokent funcitons """ ...
[ "def", "plot_di_mean_ellipse", "(", "dictionary", ",", "fignum", "=", "1", ",", "color", "=", "'k'", ",", "marker", "=", "'o'", ",", "markersize", "=", "20", ",", "label", "=", "''", ",", "legend", "=", "'no'", ")", ":", "pars", "=", "[", "]", "par...
Plot a mean direction (declination, inclination) confidence ellipse. Parameters ----------- dictionary : a dictionary generated by the pmag.dobingham or pmag.dokent funcitons
[ "Plot", "a", "mean", "direction", "(", "declination", "inclination", ")", "confidence", "ellipse", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L1641-L1669
PmagPy/PmagPy
pmagpy/ipmag.py
make_orthographic_map
def make_orthographic_map(central_longitude=0, central_latitude=0, figsize=(8, 8), add_land=True, land_color='tan', add_ocean=False, ocean_color='lightblue', grid_lines=True, lat_grid=[-80., -60., -30., 0., 30., 60., 80.], ...
python
def make_orthographic_map(central_longitude=0, central_latitude=0, figsize=(8, 8), add_land=True, land_color='tan', add_ocean=False, ocean_color='lightblue', grid_lines=True, lat_grid=[-80., -60., -30., 0., 30., 60., 80.], ...
[ "def", "make_orthographic_map", "(", "central_longitude", "=", "0", ",", "central_latitude", "=", "0", ",", "figsize", "=", "(", "8", ",", "8", ")", ",", "add_land", "=", "True", ",", "land_color", "=", "'tan'", ",", "add_ocean", "=", "False", ",", "ocea...
Function creates and returns an orthographic map projection using cartopy Example ------- >>> map_axis = make_orthographic_map(central_longitude=200,central_latitude=30) Optional Parameters ----------- central_longitude : central longitude of projection (default is 0) central_latitude : ce...
[ "Function", "creates", "and", "returns", "an", "orthographic", "map", "projection", "using", "cartopy" ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L1672-L1713
PmagPy/PmagPy
pmagpy/ipmag.py
plot_pole
def plot_pole(map_axis, plon, plat, A95, label='', color='k', edgecolor='k', marker='o', markersize=20, legend='no'): """ This function plots a paleomagnetic pole and A95 error ellipse on a cartopy map axis. Before this function is called, a plot needs to be initialized with code such as that in the ma...
python
def plot_pole(map_axis, plon, plat, A95, label='', color='k', edgecolor='k', marker='o', markersize=20, legend='no'): """ This function plots a paleomagnetic pole and A95 error ellipse on a cartopy map axis. Before this function is called, a plot needs to be initialized with code such as that in the ma...
[ "def", "plot_pole", "(", "map_axis", ",", "plon", ",", "plat", ",", "A95", ",", "label", "=", "''", ",", "color", "=", "'k'", ",", "edgecolor", "=", "'k'", ",", "marker", "=", "'o'", ",", "markersize", "=", "20", ",", "legend", "=", "'no'", ")", ...
This function plots a paleomagnetic pole and A95 error ellipse on a cartopy map axis. Before this function is called, a plot needs to be initialized with code such as that in the make_orthographic_map function. Example ------- >>> plon = 200 >>> plat = 60 >>> A95 = 6 >>> map_axis = ipm...
[ "This", "function", "plots", "a", "paleomagnetic", "pole", "and", "A95", "error", "ellipse", "on", "a", "cartopy", "map", "axis", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L1800-L1839
PmagPy/PmagPy
pmagpy/ipmag.py
plot_poles
def plot_poles(map_axis, plon, plat, A95, label='', color='k', edgecolor='k', marker='o', markersize=20, legend='no'): """ This function plots paleomagnetic poles and A95 error ellipses on a cartopy map axis. Before this function is called, a plot needs to be initialized with code such as that in the m...
python
def plot_poles(map_axis, plon, plat, A95, label='', color='k', edgecolor='k', marker='o', markersize=20, legend='no'): """ This function plots paleomagnetic poles and A95 error ellipses on a cartopy map axis. Before this function is called, a plot needs to be initialized with code such as that in the m...
[ "def", "plot_poles", "(", "map_axis", ",", "plon", ",", "plat", ",", "A95", ",", "label", "=", "''", ",", "color", "=", "'k'", ",", "edgecolor", "=", "'k'", ",", "marker", "=", "'o'", ",", "markersize", "=", "20", ",", "legend", "=", "'no'", ")", ...
This function plots paleomagnetic poles and A95 error ellipses on a cartopy map axis. Before this function is called, a plot needs to be initialized with code such as that in the make_orthographic_map function. Examples ------- >>> plons = [200, 180, 210] >>> plats = [60, 40, 35] >>> A95 =...
[ "This", "function", "plots", "paleomagnetic", "poles", "and", "A95", "error", "ellipses", "on", "a", "cartopy", "map", "axis", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L1842-L1894
PmagPy/PmagPy
pmagpy/ipmag.py
plot_pole_basemap
def plot_pole_basemap(mapname, plon, plat, A95, label='', color='k', edgecolor='k', marker='o', markersize=20, legend='no'): """ This function plots a paleomagnetic pole and A95 error ellipse on whatever current map projection has been set using the basemap plotting library. Before this function is call...
python
def plot_pole_basemap(mapname, plon, plat, A95, label='', color='k', edgecolor='k', marker='o', markersize=20, legend='no'): """ This function plots a paleomagnetic pole and A95 error ellipse on whatever current map projection has been set using the basemap plotting library. Before this function is call...
[ "def", "plot_pole_basemap", "(", "mapname", ",", "plon", ",", "plat", ",", "A95", ",", "label", "=", "''", ",", "color", "=", "'k'", ",", "edgecolor", "=", "'k'", ",", "marker", "=", "'o'", ",", "markersize", "=", "20", ",", "legend", "=", "'no'", ...
This function plots a paleomagnetic pole and A95 error ellipse on whatever current map projection has been set using the basemap plotting library. Before this function is called, a plot needs to be initialized with code that looks something like: >from mpl_toolkits.basemap import Basemap >mapname = ...
[ "This", "function", "plots", "a", "paleomagnetic", "pole", "and", "A95", "error", "ellipse", "on", "whatever", "current", "map", "projection", "has", "been", "set", "using", "the", "basemap", "plotting", "library", ".", "Before", "this", "function", "is", "cal...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L1897-L1931
PmagPy/PmagPy
pmagpy/ipmag.py
plot_pole_dp_dm
def plot_pole_dp_dm(map_axis, plon, plat, slon, slat, dp, dm, pole_label='pole', site_label='site', pole_color='k', pole_edgecolor='k', pole_marker='o', site_color='r', site_edgecolor='r', site_marker='s', markersize=20, legend=True): """ This function...
python
def plot_pole_dp_dm(map_axis, plon, plat, slon, slat, dp, dm, pole_label='pole', site_label='site', pole_color='k', pole_edgecolor='k', pole_marker='o', site_color='r', site_edgecolor='r', site_marker='s', markersize=20, legend=True): """ This function...
[ "def", "plot_pole_dp_dm", "(", "map_axis", ",", "plon", ",", "plat", ",", "slon", ",", "slat", ",", "dp", ",", "dm", ",", "pole_label", "=", "'pole'", ",", "site_label", "=", "'site'", ",", "pole_color", "=", "'k'", ",", "pole_edgecolor", "=", "'k'", "...
This function plots a paleomagnetic pole and a dp/dm confidence ellipse on a cartopy map axis. Before this function is called, a plot needs to be initialized with code such as that in the make_orthographic_map function. Example ------- >>> dec = 280 >>> inc = 45 >>> a95 = 5 >>> site_la...
[ "This", "function", "plots", "a", "paleomagnetic", "pole", "and", "a", "dp", "/", "dm", "confidence", "ellipse", "on", "a", "cartopy", "map", "axis", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L1934-L2037
PmagPy/PmagPy
pmagpy/ipmag.py
plot_poles_colorbar
def plot_poles_colorbar(map_axis, plons, plats, A95s, colorvalues, vmin, vmax, colormap='viridis', edgecolor='k', marker='o', markersize='20', alpha=1.0, colorbar=True, colorbar_label='pole age (Ma)'): """ This function plots multiple paleomagnetic pole and A95 er...
python
def plot_poles_colorbar(map_axis, plons, plats, A95s, colorvalues, vmin, vmax, colormap='viridis', edgecolor='k', marker='o', markersize='20', alpha=1.0, colorbar=True, colorbar_label='pole age (Ma)'): """ This function plots multiple paleomagnetic pole and A95 er...
[ "def", "plot_poles_colorbar", "(", "map_axis", ",", "plons", ",", "plats", ",", "A95s", ",", "colorvalues", ",", "vmin", ",", "vmax", ",", "colormap", "=", "'viridis'", ",", "edgecolor", "=", "'k'", ",", "marker", "=", "'o'", ",", "markersize", "=", "'20...
This function plots multiple paleomagnetic pole and A95 error ellipse on a cartopy map axis. The poles are colored by the defined colormap. Before this function is called, a plot needs to be initialized with code such as that in the make_orthographic_map function. Example ------- >>> plons = [...
[ "This", "function", "plots", "multiple", "paleomagnetic", "pole", "and", "A95", "error", "ellipse", "on", "a", "cartopy", "map", "axis", ".", "The", "poles", "are", "colored", "by", "the", "defined", "colormap", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L2040-L2095
PmagPy/PmagPy
pmagpy/ipmag.py
plot_vgp
def plot_vgp(map_axis, vgp_lon=None, vgp_lat=None, di_block=None, label='', color='k', marker='o', edge='black', markersize=20, legend=False): """ This function plots a paleomagnetic pole position on a cartopy map axis. Before this function is called, a plot needs to be initialized with code ...
python
def plot_vgp(map_axis, vgp_lon=None, vgp_lat=None, di_block=None, label='', color='k', marker='o', edge='black', markersize=20, legend=False): """ This function plots a paleomagnetic pole position on a cartopy map axis. Before this function is called, a plot needs to be initialized with code ...
[ "def", "plot_vgp", "(", "map_axis", ",", "vgp_lon", "=", "None", ",", "vgp_lat", "=", "None", ",", "di_block", "=", "None", ",", "label", "=", "''", ",", "color", "=", "'k'", ",", "marker", "=", "'o'", ",", "edge", "=", "'black'", ",", "markersize", ...
This function plots a paleomagnetic pole position on a cartopy map axis. Before this function is called, a plot needs to be initialized with code such as that in the make_orthographic_map function. Example ------- >>> vgps = ipmag.fishrot(dec=200,inc=30) >>> vgp_lon_list,vgp_lat_list,intensiti...
[ "This", "function", "plots", "a", "paleomagnetic", "pole", "position", "on", "a", "cartopy", "map", "axis", "." ]
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L2098-L2141
PmagPy/PmagPy
pmagpy/ipmag.py
plot_vgp_basemap
def plot_vgp_basemap(mapname, vgp_lon=None, vgp_lat=None, di_block=None, label='', color='k', marker='o', markersize=20, legend='no'): """ This function plots a paleomagnetic pole on whatever current map projection has been set using the basemap plotting library. Before this function is called, a plot n...
python
def plot_vgp_basemap(mapname, vgp_lon=None, vgp_lat=None, di_block=None, label='', color='k', marker='o', markersize=20, legend='no'): """ This function plots a paleomagnetic pole on whatever current map projection has been set using the basemap plotting library. Before this function is called, a plot n...
[ "def", "plot_vgp_basemap", "(", "mapname", ",", "vgp_lon", "=", "None", ",", "vgp_lat", "=", "None", ",", "di_block", "=", "None", ",", "label", "=", "''", ",", "color", "=", "'k'", ",", "marker", "=", "'o'", ",", "markersize", "=", "20", ",", "legen...
This function plots a paleomagnetic pole on whatever current map projection has been set using the basemap plotting library. Before this function is called, a plot needs to be initialized with code that looks something like: >from mpl_toolkits.basemap import Basemap >mapname = Basemap(projection='or...
[ "This", "function", "plots", "a", "paleomagnetic", "pole", "on", "whatever", "current", "map", "projection", "has", "been", "set", "using", "the", "basemap", "plotting", "library", ".", "Before", "this", "function", "is", "called", "a", "plot", "needs", "to", ...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L2144-L2180
PmagPy/PmagPy
pmagpy/ipmag.py
vgp_calc
def vgp_calc(dataframe, tilt_correction='yes', site_lon='site_lon', site_lat='site_lat', dec_is='dec_is', inc_is='inc_is', dec_tc='dec_tc', inc_tc='inc_tc'): """ This function calculates paleomagnetic poles using directional data and site location data within a pandas.DataFrame. The function adds the column...
python
def vgp_calc(dataframe, tilt_correction='yes', site_lon='site_lon', site_lat='site_lat', dec_is='dec_is', inc_is='inc_is', dec_tc='dec_tc', inc_tc='inc_tc'): """ This function calculates paleomagnetic poles using directional data and site location data within a pandas.DataFrame. The function adds the column...
[ "def", "vgp_calc", "(", "dataframe", ",", "tilt_correction", "=", "'yes'", ",", "site_lon", "=", "'site_lon'", ",", "site_lat", "=", "'site_lat'", ",", "dec_is", "=", "'dec_is'", ",", "inc_is", "=", "'inc_is'", ",", "dec_tc", "=", "'dec_tc'", ",", "inc_tc", ...
This function calculates paleomagnetic poles using directional data and site location data within a pandas.DataFrame. The function adds the columns 'paleolatitude', 'vgp_lat', 'vgp_lon', 'vgp_lat_rev', and 'vgp_lon_rev' to the dataframe. The '_rev' columns allow for subsequent choice as to which polarit...
[ "This", "function", "calculates", "paleomagnetic", "poles", "using", "directional", "data", "and", "site", "location", "data", "within", "a", "pandas", ".", "DataFrame", ".", "The", "function", "adds", "the", "columns", "paleolatitude", "vgp_lat", "vgp_lon", "vgp_...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L2183-L2272
PmagPy/PmagPy
pmagpy/ipmag.py
sb_vgp_calc
def sb_vgp_calc(dataframe, site_correction='yes', dec_tc='dec_tc', inc_tc='inc_tc'): """ This function calculates the angular dispersion of VGPs and corrects for within site dispersion (unless site_correction = 'no') to return a value S_b. The input data needs to be within a pandas Dataframe. Param...
python
def sb_vgp_calc(dataframe, site_correction='yes', dec_tc='dec_tc', inc_tc='inc_tc'): """ This function calculates the angular dispersion of VGPs and corrects for within site dispersion (unless site_correction = 'no') to return a value S_b. The input data needs to be within a pandas Dataframe. Param...
[ "def", "sb_vgp_calc", "(", "dataframe", ",", "site_correction", "=", "'yes'", ",", "dec_tc", "=", "'dec_tc'", ",", "inc_tc", "=", "'inc_tc'", ")", ":", "# calculate the mean from the directional data", "dataframe_dirs", "=", "[", "]", "for", "n", "in", "range", ...
This function calculates the angular dispersion of VGPs and corrects for within site dispersion (unless site_correction = 'no') to return a value S_b. The input data needs to be within a pandas Dataframe. Parameters ----------- dataframe : the name of the pandas.DataFrame containing the data t...
[ "This", "function", "calculates", "the", "angular", "dispersion", "of", "VGPs", "and", "corrects", "for", "within", "site", "dispersion", "(", "unless", "site_correction", "=", "no", ")", "to", "return", "a", "value", "S_b", ".", "The", "input", "data", "nee...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L2275-L2356
PmagPy/PmagPy
pmagpy/ipmag.py
make_di_block
def make_di_block(dec, inc): """ Some pmag.py and ipmag.py functions require or will take a list of unit vectors [dec,inc,1.] as input. This function takes declination and inclination data and make it into such a nest list of lists. Parameters ----------- dec : list of declinations inc ...
python
def make_di_block(dec, inc): """ Some pmag.py and ipmag.py functions require or will take a list of unit vectors [dec,inc,1.] as input. This function takes declination and inclination data and make it into such a nest list of lists. Parameters ----------- dec : list of declinations inc ...
[ "def", "make_di_block", "(", "dec", ",", "inc", ")", ":", "di_block", "=", "[", "]", "for", "n", "in", "range", "(", "0", ",", "len", "(", "dec", ")", ")", ":", "di_block", ".", "append", "(", "[", "dec", "[", "n", "]", ",", "inc", "[", "n", ...
Some pmag.py and ipmag.py functions require or will take a list of unit vectors [dec,inc,1.] as input. This function takes declination and inclination data and make it into such a nest list of lists. Parameters ----------- dec : list of declinations inc : list of inclinations Returns -...
[ "Some", "pmag", ".", "py", "and", "ipmag", ".", "py", "functions", "require", "or", "will", "take", "a", "list", "of", "unit", "vectors", "[", "dec", "inc", "1", ".", "]", "as", "input", ".", "This", "function", "takes", "declination", "and", "inclinat...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L2359-L2384
PmagPy/PmagPy
pmagpy/ipmag.py
unpack_di_block
def unpack_di_block(di_block): """ This function unpacks a nested list of [dec,inc,mag_moment] into a list of declination values, a list of inclination values and a list of magnetic moment values. Mag_moment values are optional, while dec and inc values are required. Parameters ----------- ...
python
def unpack_di_block(di_block): """ This function unpacks a nested list of [dec,inc,mag_moment] into a list of declination values, a list of inclination values and a list of magnetic moment values. Mag_moment values are optional, while dec and inc values are required. Parameters ----------- ...
[ "def", "unpack_di_block", "(", "di_block", ")", ":", "dec_list", "=", "[", "]", "inc_list", "=", "[", "]", "moment_list", "=", "[", "]", "for", "n", "in", "range", "(", "0", ",", "len", "(", "di_block", ")", ")", ":", "dec", "=", "di_block", "[", ...
This function unpacks a nested list of [dec,inc,mag_moment] into a list of declination values, a list of inclination values and a list of magnetic moment values. Mag_moment values are optional, while dec and inc values are required. Parameters ----------- di_block : nested list of declination, ...
[ "This", "function", "unpacks", "a", "nested", "list", "of", "[", "dec", "inc", "mag_moment", "]", "into", "a", "list", "of", "declination", "values", "a", "list", "of", "inclination", "values", "and", "a", "list", "of", "magnetic", "moment", "values", ".",...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L2387-L2429
PmagPy/PmagPy
pmagpy/ipmag.py
make_diddd_array
def make_diddd_array(dec, inc, dip_direction, dip): """ Some pmag.py functions such as the bootstrap fold test require a numpy array of dec, inc, dip direction, dip [dec, inc, dd, dip] as input. This function makes such an array. Parameters ----------- dec : paleomagnetic declination in d...
python
def make_diddd_array(dec, inc, dip_direction, dip): """ Some pmag.py functions such as the bootstrap fold test require a numpy array of dec, inc, dip direction, dip [dec, inc, dd, dip] as input. This function makes such an array. Parameters ----------- dec : paleomagnetic declination in d...
[ "def", "make_diddd_array", "(", "dec", ",", "inc", ",", "dip_direction", ",", "dip", ")", ":", "diddd_block", "=", "[", "]", "for", "n", "in", "range", "(", "0", ",", "len", "(", "dec", ")", ")", ":", "diddd_block", ".", "append", "(", "[", "dec", ...
Some pmag.py functions such as the bootstrap fold test require a numpy array of dec, inc, dip direction, dip [dec, inc, dd, dip] as input. This function makes such an array. Parameters ----------- dec : paleomagnetic declination in degrees inc : paleomagnetic inclination in degrees dip_di...
[ "Some", "pmag", ".", "py", "functions", "such", "as", "the", "bootstrap", "fold", "test", "require", "a", "numpy", "array", "of", "dec", "inc", "dip", "direction", "dip", "[", "dec", "inc", "dd", "dip", "]", "as", "input", ".", "This", "function", "mak...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L2432-L2470
PmagPy/PmagPy
pmagpy/ipmag.py
equi
def equi(map_axis, centerlon, centerlat, radius, color, alpha=1.0): """ This function enables A95 error ellipses to be drawn in cartopy around paleomagnetic poles in conjunction with shoot (modified from: http://www.geophysique.be/2011/02/20/matplotlib-basemap-tutorial-09-drawing-circles/). """ ...
python
def equi(map_axis, centerlon, centerlat, radius, color, alpha=1.0): """ This function enables A95 error ellipses to be drawn in cartopy around paleomagnetic poles in conjunction with shoot (modified from: http://www.geophysique.be/2011/02/20/matplotlib-basemap-tutorial-09-drawing-circles/). """ ...
[ "def", "equi", "(", "map_axis", ",", "centerlon", ",", "centerlat", ",", "radius", ",", "color", ",", "alpha", "=", "1.0", ")", ":", "if", "not", "has_cartopy", ":", "print", "(", "'-W- cartopy must be installed to run ipmag.equi'", ")", "return", "glon1", "="...
This function enables A95 error ellipses to be drawn in cartopy around paleomagnetic poles in conjunction with shoot (modified from: http://www.geophysique.be/2011/02/20/matplotlib-basemap-tutorial-09-drawing-circles/).
[ "This", "function", "enables", "A95", "error", "ellipses", "to", "be", "drawn", "in", "cartopy", "around", "paleomagnetic", "poles", "in", "conjunction", "with", "shoot", "(", "modified", "from", ":", "http", ":", "//", "www", ".", "geophysique", ".", "be", ...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L2542-L2563
PmagPy/PmagPy
pmagpy/ipmag.py
equi_basemap
def equi_basemap(m, centerlon, centerlat, radius, color): """ This function enables A95 error ellipses to be drawn in basemap around paleomagnetic poles in conjunction with shoot (from: http://www.geophysique.be/2011/02/20/matplotlib-basemap-tutorial-09-drawing-circles/). """ glon1 = centerlon ...
python
def equi_basemap(m, centerlon, centerlat, radius, color): """ This function enables A95 error ellipses to be drawn in basemap around paleomagnetic poles in conjunction with shoot (from: http://www.geophysique.be/2011/02/20/matplotlib-basemap-tutorial-09-drawing-circles/). """ glon1 = centerlon ...
[ "def", "equi_basemap", "(", "m", ",", "centerlon", ",", "centerlat", ",", "radius", ",", "color", ")", ":", "glon1", "=", "centerlon", "glat1", "=", "centerlat", "X", "=", "[", "]", "Y", "=", "[", "]", "for", "azimuth", "in", "range", "(", "0", ","...
This function enables A95 error ellipses to be drawn in basemap around paleomagnetic poles in conjunction with shoot (from: http://www.geophysique.be/2011/02/20/matplotlib-basemap-tutorial-09-drawing-circles/).
[ "This", "function", "enables", "A95", "error", "ellipses", "to", "be", "drawn", "in", "basemap", "around", "paleomagnetic", "poles", "in", "conjunction", "with", "shoot", "(", "from", ":", "http", ":", "//", "www", ".", "geophysique", ".", "be", "/", "2011...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L2566-L2584
PmagPy/PmagPy
pmagpy/ipmag.py
ellipse
def ellipse(map_axis, centerlon, centerlat, major_axis, minor_axis, angle, n=360, filled=False, **kwargs): """ This function enables general error ellipses to be drawn on the cartopy projection of the input map axis using a center and a set of major and minor axes and a rotation angle east of north. (Ad...
python
def ellipse(map_axis, centerlon, centerlat, major_axis, minor_axis, angle, n=360, filled=False, **kwargs): """ This function enables general error ellipses to be drawn on the cartopy projection of the input map axis using a center and a set of major and minor axes and a rotation angle east of north. (Ad...
[ "def", "ellipse", "(", "map_axis", ",", "centerlon", ",", "centerlat", ",", "major_axis", ",", "minor_axis", ",", "angle", ",", "n", "=", "360", ",", "filled", "=", "False", ",", "*", "*", "kwargs", ")", ":", "if", "not", "has_cartopy", ":", "print", ...
This function enables general error ellipses to be drawn on the cartopy projection of the input map axis using a center and a set of major and minor axes and a rotation angle east of north. (Adapted from equi). Parameters ----------- map_axis : cartopy axis centerlon : longitude of the center o...
[ "This", "function", "enables", "general", "error", "ellipses", "to", "be", "drawn", "on", "the", "cartopy", "projection", "of", "the", "input", "map", "axis", "using", "a", "center", "and", "a", "set", "of", "major", "and", "minor", "axes", "and", "a", "...
train
https://github.com/PmagPy/PmagPy/blob/c7984f8809bf40fe112e53dcc311a33293b62d0b/pmagpy/ipmag.py#L2587-L2640