Giter Club home page Giter Club logo

pmagpy's Introduction

PmagPy: tools for paleomagnetic data analysis

Latest Release latest release
License license

What is it

PmagPy is a comprehensive set of tools for analyzing paleomagnetic data. It facilitates interpretation of demagnetization data, Thellier-type experimental data and data from other types of rock magnetic experiments. PmagPy can be used to create a wide variety of useful plots and conduct statistical tests. It is designed to work with the MagIC database (https://earthref.org/MagIC), allowing manipulation of downloaded data sets as well as preparation of new contributions for uploading to the MagIC database. Functions within PmagPy can be imported and used in Jupyter notebooks enabling fully documented and nicely illustrated data analysis.

Citing PmagPy

Users of PmagPy should cite the open access article:

Tauxe, L., R. Shaar, L. Jonestrask, N. L. Swanson-Hysell, R. Minnett, A. A. P. Koppers, C. G. Constable, N. Jarboe, K. Gaastra, and L. Fairchild (2016), PmagPy: Software package for paleomagnetic data analysis and a bridge to the Magnetics Information Consortium (MagIC) Database, Geochem. Geophys. Geosyst., 17, https://doi.org/10.1002/2016GC006307.

Main features

PmagPy is comprised of:

  • GUI programs for getting data into MagIC database format (pmag_gui), analyzing demagnetization data (demag_gui) and analyzing paleointensity data (thellier_gui). These GUIs are available as part of the python package pmagpy-cli. Alternatively, these GUIs are availible for download as executable programs outside of this repository.
  • Command line programs for all sorts of paleomagnetic data analysis and wrangling (contained within the programs folder of the repository and pip installed as pmagpy-cli).
  • The pmagpy function modules for paleomagnetic data analysis (pmagpy.pmag) and plotting (pmagpy.pmagplotlib) as well as a function module that further enables paleomagnetic data analysis within interactive computing environments such as the Jupyter notebook (pmagpy.ipmag). The functions within these modules are at the heart of the GUI and command line programs. With pmagpy installed (described below), these modules are can be imported (e.g. from pmagpy import ipmag).
  • Example data files that are used in the examples provided in the PmagPy cookbook

Use of all these features is described in the Cookbook and the underlying science behind the data and code can be explored in the book Essentials of Paleomagnetism: Third Web Edition. Example Jupyter notebooks using PmagPy can be found in this repository

How to get it

There are several different ways to install PmagPy. Complete documentation for PmagPy installation and use is available in the PmagPy cookbook.

You can try a preview of PmagPy here:

Binder

Please be patient, the preview will take a few minutes to launch.

Stand alone applications

If you do not need the full PmagPy functionality, and you only want to use Pmag GUI, MagIC GUI, Thellier GUI, and Demag GUI, there a standalone download for which Python does not need to be installed. Once downloaded, the GUIs should run when you double click on their icon, but they will take time to start up (anywhere from 5 to 30 seconds) please be patient.

OSX Standalone download

You’ll find the latest stable release here: Mac PmagPy Executable Application

Windows Standalone download

You’ll find the latest stable release here: Windows PmagPy Executable Application

Linux Standalone download

This binary has only been tested on a Ubuntu 14.04 (Trusty) distribution and might experience problems on other distributions. You’ll find the latest stable release here: Linux PmagPy Executable Application

Full PmagPy install

To get the full use of PmagPy functionality, you will first have to have a Python installation with some standard scientific modules. You can follow instructions to do so here. Once you have Python installed:

  • Find and open your command line (for help finding your command prompt, see the documentation)
  • Update pip: type on the command line: pip install --upgrade pip
  • Install or update pmagpy: use the command: pip install --upgrade pmagpy
  • Install or update pmagpy-cli, use the command: pip install --upgrade pmagpy-cli
  • To uninstall, use the commands: pip uninstall pmagpy and pip uninstall pmagpy-cli
  • If you run into trouble, use pip to uninstall both pmagpy and pmagpy-cli, then try again to install first pmagpy and then pmagpy-cli

If you want access to the master branch rather than the latest release, see the developer install instructions.

Background and support

The code base for the PmagPy project has been built up over many years by Lisa Tauxe (Distinguished Professor of Geophysics at the Scripps Institution of Oceanography) supported by grants from the National Science Foundation. Substantial contributions to the project have been made by Nick Swanson-Hysell (Assistant Professor at UC Berkeley), Ron Shaar (Senior Lecturer at the Hebrew University of Jerusalem), Lori Jonestrask and Kevin Gaastra as well as others.

Contributing

If you want to get involved with the project - whether that means reporting a bug, requesting a feature, or adding significant code - please check out the project's Contribution guidelines.

More information

This code and the PmagPy cookbook (http://earthref.org/PmagPy/cookbook) are companions to the the book Essentials of Paleomagnetism: Third Web Edition (http://earthref.org/MagIC/books/Tauxe/Essentials/) written by Lisa Tauxe with contributions from Subir K. Banerjee, Robert F. Butler and Rob van der Voo. The printed version of the book came out in January, 2010 from University of California Press (http://www.ucpress.edu/book.php?isbn=9780520260313).

Licensing

This code can be freely used, modified, and shared. It is licensed under a 3-clause BSD license. See license.txt for details.

pmagpy's People

Contributors

apivarunas avatar botaoxiongyong avatar caoimhinmg avatar cmaurel37 avatar duserzym avatar facusapienza21 avatar greadown avatar hematite-berkeley avatar hfa2105 avatar lfairchild avatar ltauxe avatar moonshoes87 avatar njarboe avatar rminnett avatar ronshaar avatar schwehr avatar swanson-hysell avatar tcarrasc avatar yamamon75 avatar yuempark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pmagpy's Issues

AttributeError

Hello,
I have just install PmagPy. I would like to launch QuickMagIC.py from the PmagPy Prompt but I get this message:

C:\Users\user\Documents>QuickMagIC.py
Traceback (most recent call last):
File "C:\Users\user\Documents\PmagPy\QuickMagIC.py", line 14, in
import pmag_basic_dialogs
File "C:\Users\user\Documents\PmagPy\pmag_basic_dialogs.py", line 13, in
import pmag_widgets as pw
File "C:\Users\user\Documents\PmagPy\pmag_widgets.py", line 10, in
import controlled_vocabularies as vocabulary
File "C:\Users\user\Documents\PmagPy\controlled_vocabularies.py", line 129, in

all_codes, code_types = get_meth_codes()
File "C:\Users\user\Documents\PmagPy\controlled_vocabularies.py", line 21, in
get_meth_codes
raw_codes = pd.io.json.read_json('http://api.earthref.org/MAGIC/method_codes
.json')
AttributeError: 'module' object has no attribute 'json'

I do not know how to fix this attribute error. Is anyone could help me?

pmag2.py

Lori,

Are you planning to do more with the pmag2.py file? It seems a bit confusing to have a file with that name given that so much functionality of the overall package resides in the main pmag.py file. Although I am sure there is a good reason you did it this way.

combo box issue in demag_gui.py

Both @CourtneySprain and I are having this issue with the demag_gui:

(python2) fixed-mcc-393-1:~ Laurentia$ demag_gui.py 
/Users/Laurentia/anaconda/envs/python2/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
2016-09-14 11:35:54.176 python[5412:1033584] This application is trying to draw a very large combo box, 29 points tall.  Vertically resizable combo boxes are not supported, but it happens that 10.4 and previous drew something that looked kind of sort of okay.  The art in 10.5 does not break up in a way that supports that drawing.  This application should be revised to stop using large combo boxes.  This warning will appear once per app launch.

The top menu boxes are odd with weird white space around the pull down menus and associated values:

screen shot 2016-09-14 at 11 36 26 am

Add VGP view to demag_gui

Would be nice to have an option to view data as VGPs that comes up as a window when selected in the Tools menu of demag_gui

demag_gui doesn't allow directory navigation when launched independently

The GUI showing the current directory flashes up, but then disappears and the GUI proceeds as if you have selected your current directory.

Laurentia$ demag_gui.py
/Users/Laurentia/anaconda/envs/python2/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
icon_path /Users/Laurentia/PmagPy/images/PmagPy.ico
-I- done sorting meas data
------------------------------ no magic_measurements.txt found---------------------------------------

delete ipmagplotlib?

Now that the backend issue is resolved by @moonshoes87 (I think?), should ipmagplotlib be deleted from the repository so that we are solely using pmagplotlib?

error being thrown for get_temp_indices in demag_gui.py

This error was thrown when switching between coordinate systems and is being thrown in other use cases as well.

Traceback (most recent call last):
  File "/Users/Laurentia/PmagPy/demag_gui.py", line 1548, in onSelect_coordinates
    fit.put(specimen,self.COORDINATE_SYSTEM,self.get_PCA_parameters(specimen,fit.tmin,fit.tmax,self.COORDINATE_SYSTEM,fit.PCA_type))
  File "/Users/Laurentia/PmagPy/demag_gui.py", line 1942, in get_PCA_parameters
    beg_pca,end_pca = self.get_temp_indices(None, tmin, tmax, specimen)
  File "/Users/Laurentia/PmagPy/demag_gui.py", line 4730, in get_temp_indices
    if tmin in self.Data[specimen]['zijdblock_steps']:
KeyError: 'PI47-3'

Demag GUI tests require interaction to run

The new Demag GUI tests seem to require interaction to run. When I run them, I get stuck with screens like this:
screen shot 2016-03-08 at 3 14 11 pm

and then I have to click through for the testing to continue. This won't work for automated testing (Travis CI), and it isn't ideal for running through all PmagPy tests in a batch.

Is this the behavior that other people get, as well? Or is it a local problem?

new pip release

We haven't really established a system for determining when to make a new pip release. So, this issue has two parts: 1. does anyone have a reason I shouldn't go ahead and make a new release now? 2. How should we time/coordinate new releases in general?

Regarding item two, it seems obvious that we should make sure all tests are passing, but maybe we should have other safeguards as well?

No module named demag_interpretation_editor error in demag_gui

Recent changes to demag_gui are resulting in this fatal error:

Traceback (most recent call last):
  File "/Users/Laurentia/PmagPy/programs/pmag_gui.py", line 332, in on_run_demag_gui
    import demag_gui
  File "/Users/Laurentia/PmagPy/programs/demag_gui.py", line 73, in <module>
    from dialogs.demag_interpretation_editor import InterpretationEditorFrame
ImportError: No module named demag_interpretation_editor

marking good/bad measurements in Demag_GUI

The good/bad measurement highlighting behavior still seems a little unintuitive.

First of all, it doesn’t seem like I can simply right click on a measurement — I actually have to select it with a left click and then right click. Additionally, I was confused when I accidentally double-clicked on a measurement (trying to mark it as good/bad) and the whole fit was recalculated. Last thing, measurements outside of the fit cannot be marked — is this the desired behavior?

A possible UI solution: maybe we could introduce a 6th column in the measurements list with a checkbox the denotes a ‘bad’ measurement (or ‘good’). This might be a slightly irritating to implement with wxPython, but I think it would make a lot of sense from a user perspective.

Problem with pmag.dokent() and aniso_magic.py ellipse parameters

When running aniso_magic.py with a bootstrap I was getting weird error ellipses that were rotated 90º from the data distribution they were meant to be representing.

Datafile:
WT1_anisotropy.txt
Command:
aniso_magic.py -f WT1_anisotropy.txt -par -crd g
Result:
aniso_test_data
aniso_test1
I eventually worked out that somehow the zeta angle was being given the eta angles D,I parameters and vice-versa, which I traced back to pmag.dokent():
dokent_code_highlighted
In the first two chunks of highlighted code below there appears to be a mismatch with the third chunk: sigma1at [i][1] in an array is associated with eta and sigma2 at [i][0] with zeta, yet at 3221-3222 the zeta directions are calculated from [i][1] and eta from [i][0]. If you instead have:
3305 sigma1=sigma1+xg[i][0]**2
3306 sigma2=sigma2+xg[i][1]**2
Then you get the right result.
aniso_test2
Also: in aniso_magic.py lines 322-325, which print the bootstrap output, the zeta parameters are printed in the eta columns and vice versa.

lsq fits not refreshing when new fit made in demag_gui

Here is an example of the equal area plot. There is only one current fit, but a bunch of fits that I was making for the specimen while playing around with different possibilities (and just making a bunch of bad fits to make this point) are being shown:

screen shot 2016-09-20 at 4 16 11 pm

find_EI.py not returning correct values for example data

Running the test data
find_EI.py -f find_EI_example.dat
returns

Io Inc  I_lower, I_upper, Elon, E_lower, E_upper 
38.9  =>     58.8 _     0.0 ^    67.0:  1.4679 _ 0.0000 ^ 1.7189

when it should return something like this

Io Inc  I_lower, I_upper, Elon, E_lower, E_upper
38.9  =>     58.8 _    48.4 ^    67.0:  1.4679 _ 1.2912 ^ 1.7337

For some reason, both E_lower and I_lower are zero. I get the expected results with pmag-3.3.2, but not the current version.

error in demag gui tests

I'm getting some errors when I run the demag gui tests.
These three tests produce the same error: test_read_write_redo, test_read_write_pmag_tables, test_ie_buttons.
AttributeError: 'Demag_GUI' object has no attribute 'get_ie_open'

I had a merge conflict with the test_demag_gui.py, but I thought I fixed that... Could one of you have a look at this, @Swanson-Hysell or @Caoimhinmg?

Missing demag_gui help file

The help PDF for Demag GUI appears to be missing. Either the "Help --> Usage & Tips" option should be taken out of the menu, or we should put demag_gui_doc.pdf back in.

I noticed this because I'm trying to make sure all image files etc. are available in the pmagpy-cli edition of the GUIs.

check updates still throwing errors

I am still running into errors when trying to import pmag.py due to code in check_updates.py. Here is the current error:

/Users/polarwander/PmagPy/check_updates.py in main()
     15     global pmagpy_path,local_path
     16     local_version=get_version()
---> 17     last_path   = os.path.join(pmagpy_path, 'version_last_checked.txt')
     18     # Get the version of the local PmagPy installation
     19     # from the version.txt file in the current directory.

NameError: global name 'pmagpy_path' is not defined

I think the issue is that while I have pmagpy in the path it isn't a global variable in an IPython session. And I think one of the real advantages to the notebook is that it isn't a requirement to have anything added to the path as long as one can import: pmag.py, pmagplotlib.py and IPmag.py

This problem goes away if all the code below def main(): in check_updates.py is pulled out and figures still send up being tagged with pmagpy-2.236. One solution could be to simplify the versioning system by putting this code into pmag.py instead of needing to import check_updates.py but perhaps this would have unintended consequences:

version = 'pmagpy-2.236'

def get_version():
        return version

Compatibility with Anaconda

As we start contemplating the switch to Python 3, maybe we can revisit the two issues with Anaconda. It is unclear when Canopy will support Python 3, so I'd like to have other options.

To recap:

Problem 1:
I’m also getting some segmentation faults with the GUIs. This seems to happen consistently with Pmag GUI step 3 (adding er_* information).

/anaconda/bin/pythonw: line 3: 2366 Segmentation fault: 11 //anaconda/python.app/Contents/MacOS/python "$@"

Problem 2:
nebula$ python pmag_gui.py
-I- Starting Pmag GUI - please be patient
This program needs access to the screen.
Please run with a Framework build of python, and only when you are
logged in on the main display of your Mac.

@Swanson-Hysell or @Caoimhinmg, if one of you could check and see if problem 1 is still occurring (I no longer have Anaconda installed), that would be awesome! Regarding problem 2, I can't remember if the framework build issue affected the pip install. With Anaconda, have you been able to do the pip install and run the command line programs?

number of terms in igrf

pmag.py:4779 for k in range(1,66):

number of terms in IGRF varies.
Instead of using a fixed value of 66, should calculate from (n+1)(n+2)/2 or n(n+3)/2 + 1

Demag GUI test failing

One of the Demag GUI tests is failing:

When I run:

python -m unittest pmagpy_tests.test_demag_gui.TestMainFrame

I see this error:

ERROR: test_read_write_redo (pmagpy_tests.test_demag_gui.TestMainFrame)

Traceback (most recent call last):
File "pmagpy_tests/test_demag_gui.py", line 233, in test_read_write_redo
self.assertFalse(self.frame.interpretation_editor_open)
AttributeError: 'Demag_GUI' object has no attribute 'interpretation_editor_open'

requirement of 'pmagpy-cli' distribution throwing error in pmag_gui

It seems that there is now a requirement within the PmagPy/programs/init.py file for the 'pmagpy-cli' distribution to be installed. This error gets thrown when trying to convert files via cit_magic.py through pmag_gui. We would like to be able to run straight from the master without doing a pip installation (given that the pip installed version is not working with Anaconda) and simply having the path set.

Traceback (most recent call last):
  File "/Users/Laurentia/PmagPy/dialogs/pmag_basic_dialogs.py", line 1018, in on_okButton
    import programs.cit_magic as cit_magic
  File "/Users/Laurentia/PmagPy/programs/__init__.py", line 21, in <module>
    print pkg_resources.get_distribution('pmagpy-cli')
  File "/Users/Laurentia/anaconda/envs/python2/lib/python2.7/site-packages/setuptools-20.1.1-py2.7.egg/pkg_resources/__init__.py", line 540, in get_distribution

  File "/Users/Laurentia/anaconda/envs/python2/lib/python2.7/site-packages/setuptools-20.1.1-py2.7.egg/pkg_resources/__init__.py", line 420, in get_provider

  File "/Users/Laurentia/anaconda/envs/python2/lib/python2.7/site-packages/setuptools-20.1.1-py2.7.egg/pkg_resources/__init__.py", line 941, in require

  File "/Users/Laurentia/anaconda/envs/python2/lib/python2.7/site-packages/setuptools-20.1.1-py2.7.egg/pkg_resources/__init__.py", line 828, in resolve

pkg_resources.DistributionNotFound: The 'pmagpy-cli' distribution was not found and is required by the application

Remove install scripts from repo

Given that all of our documentation has people pip install, it is confusing to have the install scripts in the repo. As evidenced in this issue: #80

install_Mac_OSX
install_Windows.vbs

Should we go ahead and delete these from the repo @ltauxe @moonshoes87?

Interpretation editor not launching within demag_gui

Seems to be an issue with the recent changes related to font_type. See Traceback below:

Traceback (most recent call last):
  File "/Users/Laurentia/PmagPy/demag_gui.py", line 3969, in on_menu_edit_interpretations
    self.interpretation_editor = EditFitFrame(self)
  File "/Users/Laurentia/PmagPy/demag_gui.py", line 5039, in __init__
    self.init_UI()
  File "/Users/Laurentia/PmagPy/demag_gui.py", line 5049, in init_UI
    font1 = wx.Font(10, wx.SWISS, wx.NORMAL, wx.NORMAL, False, self.font_type)
AttributeError: 'EditFitFrame' object has no attribute 'font_type'

marking good/bad measurements in Demag_GUI

The good/bad measurement highlighting behavior still seems a little unintuitive.

First of all, it doesn’t seem like I can simply right click on a measurement — I actually have to select it with a left click and then right click. Additionally, I was confused when I accidentally double-clicked on a measurement (trying to mark it as good/bad) and the whole fit was recalculated. Last thing, measurements outside of the fit cannot be marked — is this the desired behavior?

A possible UI solution: maybe we could introduce a 6th column in the measurements list with a checkbox the denotes a ‘bad’ measurement (or ‘good’). This might be a slightly irritating to implement with wxPython, but I think it would make a lot of sense from a user perspective.

Thoughts on this? @Swanson-Hysell, @Caoimhinmg , @ronshaar

modify directory structure to make more approachable

One thing that I think would be good to strategize about would be how the directory structure of the repository could be updated to make things more approachable. It would be nice if when people landed on the Github page that the README wasn't below such a long list of files. One solution could be to put the command line programs into a subfolder and the function modules into a subfolder just leaving the GUI programs in the main folder. Have you you thought about some ways to do this @moonshoes87 ?

Here is a good piece with a simple discussion of repository architecture: http://www.kennethreitz.org/essays/repository-structure-and-python

floats and integers within MagicDataFrame are all in there as strings

I am just starting to use the MagicDataFrame object in some code and am bumping into the problem that the values that should be floats and integers within the DataFrame are all in there as strings.

I can change them myself by doing something like:

Halls1974_sites['dir_dec'] = pd.to_numeric(Halls1974_sites['dir_dec'])

but given that most of the columns are always floats or always integers it seems like having the correct dtype should be a feature of the MagicDataFrame object.

Thoughts, @moonshoes87?

Add Change in Color in Plots when Measurement Selected

It would be a great addition to the Pmag_GUI program if whenever a measurement was selected on the measurement list the color of it would change in the Zijderveld/Orthographic diagram and in the Equal Area/Stereonet diagram. This would allow us to know which measurement we are looking at quickly even if the labels are written on the other portion of the vector (DEC v. INC).

Attached is a GIF showing how this works in the Craig Jones PaleoMag software
craigjonespointhighlight_med

Make a button for "make new fit for all" in demag_gui interpretation editor

There is currently hidden functionality to add a fit to all specimens in the interpretation editor if now specimen is selected. It would be nice to make this functionality be more accessible and transparent to the user by having a button that says "make new fit for all specimens" in the demag_gui interpretation editor.

Error running PmagPy after running Install Script on Mac OS X

Summary:
PmagPy throws an error when I try to run the post-install test-script on Mac OS X.

How to Recreate:

  1. On Mac OS X: v10.9.5 (Maverick), download .Zip file of the PmagPy GitHub repository:
    https://github.com/PmagPy/PmagPy/

  2. Extract all files and then open and run the file: ../PmagPy-master/install_Mac_OSX.app

  3. Choose to have the files installed onto the Mac HD. (The option to install under the the current user was grayed out. The installer said this option was not allowed).

  4. Run the installer. Installs all PmagPy files under: /Users/{my username}/PmagPy/

  5. At finish, the installer runs the test script:
    ":~ {my username}$ eqarea.py -h" in Terminal

This command fails with the following error:
Traceback (most recent call last):
File "/Users/lab/PmagPy/programs/eqarea.py", line 8, in
import pmagpy.pmagplotlib as pmagplotlib
ImportError: No module named pmagpy.pmagplotlib

I checked the install directory and found the relevant file:
/Users/{my username}/PmagPy/pmagpy/pmagplotlib.py

  1. I tried rerunning the command prompt as super user:
    ":~ {my username}$ sudo eqarea.py -h"

and got the same error.

Thank you,
Isaac

demag_gui referencing local variable before assignment

On some data sets, demag_gui is referencing NRM before NRM is assigned:

Traceback (most recent call last):
  File "/Users/Laurentia/PmagPy/programs/pmag_gui.py", line 334, in on_run_demag_gui
    demag_gui.main(self.WD, standalone_app=False, parent=self)
  File "/Users/Laurentia/PmagPy/programs/demag_gui.py", line 6513, in main
    frame = Demag_GUI(WD, parent, write_to_log_file=write_to_log_file)
  File "/Users/Laurentia/PmagPy/programs/demag_gui.py", line 194, in __init__
    self.Data,self.Data_hierarchy=self.get_data() # Get data from magic_measurements and rmag_anistropy if exist.
  File "/Users/Laurentia/PmagPy/programs/demag_gui.py", line 3117, in get_data
    DIR=[dec,inc,intensity/NRM]
UnboundLocalError: local variable 'NRM' referenced before assignment

@moonshoes87's sleuthing suggests this wasn't an issue at the time point of this commit:

This is the oldest commit that works for me (from September 26):

6430242, added documentation and cleaned up code….

cit_magic3 fails with Canopy Python

The "builtins" module isn't part of the Canopy package, although future is installed. (not sure if this is relevant.... builtins issue)

Because of this, cit_magic3 fails with an import error. Also, pdb is referenced in the code but never imported. I fixed these issues locally so that I can run cit_magic3, but I didn't want to muck around with it without understanding why it was set up that way!

Incorporating Parametric Bootstrap into Common Mean, Reversal & Fold Test

It would be nice if we could have an option in the bootstrapped common mean (and reversal and fold test) to use the parametric bootstrap instead of naive bootstrap in case we have data sets with N<20.

I see that there is an option in bootams.py to call "-par"

Ideally this would be incorporated within the pmagpy functions and then into the ipmag functions for jupyter notebooks "common_mean_bootstrap", "bootstrap_fold_test" and "reversal_test_bootstrap"

add license to repository

It makes sense to add an open source license to the repository.

I was reading this piece: http://www.astrobetter.com/blog/2014/03/10/the-whys-and-hows-of-licensing-scientific-code/ which laid out this advice:

(1) Always license your code. Unlicensed code is closed code, so any open license is better than none (but see #2).
(2) Always use a GPL-compatible license. GPL-compatible licenses ensure broad compatibility for your code, and include GPL, new BSD, MIT, and others (but see #3).
(3) Always use a permissive, BSD-style license. A permissive license such as new BSD or MIT is preferable to a copyleft license such as GPL or LGPL.

Github put a helpful site together in terms of describing available licenses:
http://choosealicense.com

This one is a simple one that could work:
http://choosealicense.com/licenses/bsd-2-clause/

Demag GUI selection of temperature bounds

When I open Demag GUI, I can initially only select bounds by clicking on the steps in the lower left corner. After I've clicked on a step, the drop-down Bounds in the upper left appear and I can edit using those. It seems like the Bounds drop-down should work from the start, or we should remove that way of interacting with the parameters.

I can dig into this, but it will probably be easier for one of you who have been working on Demag GUI more...

Add site_edit capabilities to demag_gui

site_edit functionality can be added. What that program does is plot expected directions from two common errors - wrong mark on the sample and wrong way for the arrow. By doing so, samples can be excluded if there directions are consistent with such an error.

standardize program names

Going through the manuscript, I realized that, at present, Make_magic.py and QuickMagIC.py have similar names but with different syntax in terms of capitalization and the underscore. It seems like these should be standardized.

Also, is QuickMagIC still the right name for that program? As an executable, this program now accomplishes a lot in terms of data import, data wrangling, PCA fits through demag_gui, and paleointensity data reduction through thellier_gui. I'm not sure what a better name would be. Perhaps if MagIC.py is going to be retired, QuickMagIC could be renamed MagIC.py?

sys.prefix vs. other WD options for tests

Some tests were set up to use sys.prefix as the working directory because that is where the pip installation puts all the data files. That was so that someone with the pip installation who has not downloaded from Github could run tests and make sure everything was working correctly on their machine, and also so that I could test the pip installation directly. Using cwd + 'data_files' is going to break that functionality. Here's an explanation about how that works with pip: stack overflow

However, using sys.prefix doesn't work correctly if you haven't installed using pip (or copied the data_files folder to sys.prefix + pmagpy_data_files). Perhaps we can discuss how and where we want the tests to be able to run? I like having the ability to directly test the pip installation, so maybe we could figure out how to get it to work both ways?

Also, quite a few tests are now failing for me. 'pmagpy_data_files' was not changed to 'data_files' everywhere, so a bunch of tests can't find test data. Let's decide how we want to do things and get this fixed.

@Caoimhinmg, @Swanson-Hysell ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.