In [15]:
import sys
sys.path.insert(0,'/Users/ltauxe/Programs/PmagPy/GIT/PmagPy')
from IPython.display import Image
import pandas as pd
import pmag,exceptions
import numpy as np
import ipmag

Download these from the LORE database:

1) Sample and Core tables (when available) for the Hole.

2) SRM and discrete data

Put these in:

/Volumes/DATA/Uservol/EXPEDITION_PROCEEDINGS/I_Paleomagnetism/Working_Folder/U1456A_Data/U1456A_MagIC and SRM_data respectively.

Import sample data to MagIC Format. For now, please paste this "Top depth CSF-B (m)" onto the column you want to use as common depth. Until IODP stops futzing around with column headers, I'm done tryin to accomodate.


In [3]:
!IODP_samples_magic.py -f U1456A_MagIC/samples-355-U1456-A.csv -Fsa U1456A_MagIC/U1456A_er_samples.txt


['f', 'F', 'A', 'WD', 'ID', 'Fsa', 'Fsi'] 7
-I- using default for arg: F
-
-I- using default for arg: A
-
-I- using default for arg: WD
-
-I- using default for arg: ID
-
-I- using default for arg: Fsi
-
0  read in from:  ./U1456A_MagIC/U1456A_er_samples.txt
188  records written to file  ./U1456A_MagIC/U1456A_er_samples.txt
sample information written to:  ./U1456A_MagIC/U1456A_er_samples.txt

Convert JR6 data to MagIC. Note that some data have the unfortunate habit of bleeding into each other, so you must pre-process the file to insert a space before all '-'.


In [4]:
!IODP_jr6_magic.py -f JR6_data/U1456A_fixed.jr6 -fsa U1456A_MagIC/U1456A_er_samples.txt -loc U1456A -F U1456A_MagIC/U1456A.jr6.magic


sample name not found:  4_6609681
sample name not found:  4_6609681
616  records written to file  ./U1456A_MagIC/U1456A.jr6.magic

Process SRM discrete sample data.


In [5]:
!IODP_dscr_magic.py -f SRM_data/srmdiscrete-355-U1456-A.csv -F U1456A_MagIC/srmdiscrete-355-U1456-A.csv.magic


processing:  ./SRM_data/srmdiscrete-355-U1456-A.csv
1184  records written to file  ./U1456A_MagIC/srmdiscrete-355-U1456-A.csv.magic
data stored in  ./U1456A_MagIC/srmdiscrete-355-U1456-A.csv.magic

Convert SRM data to MagIC


In [6]:
!IODP_srm_magic.py -loc U1456A -f SRM_data/srmsection-355-U1456-A.csv -Fsa U1456A_MagIC/SRM_er_samples.txt -F U1456A_MagIC/srmsection-355-U1456-A.csv.magic


processing:  ./SRM_data/srmsection-355-U1456-A.csv
2776  records written to file  ./er_specimens.txt
specimens stored in  ./er_specimens.txt
2776  records written to file  ./U1456A_MagIC/SRM_er_samples.txt
samples stored in  ./U1456A_MagIC/SRM_er_samples.txt
2776  records written to file  ./er_sites.txt
sites stored in  ./er_sites.txt
9684  records written to file  ./U1456A_MagIC/srmsection-355-U1456-A.csv.magic
data stored in  ./U1456A_MagIC/srmsection-355-U1456-A.csv.magic

Convert AMS data to MagIC


In [7]:
!kly4s_magic.py -f KLY4S_data/U1456A.kly4s -inst IODP-KLY4S -loc U1456A -spc 0 -ncn 5 -F U1456A_MagIC/KLY4S_U1456A.magic  -Fa U1456A_MagIC/rmag_anisotropy.txt -Fsa U1456A_MagIC/er_samples.txt


173  records written to file  ./U1456A_MagIC/rmag_anisotropy.txt
173  records written to file  ./U1456A_MagIC/KLY4S_U1456A.magic
172  records written to file  ./er_specimens.txt
anisotropy data saved in  ./U1456A_MagIC/rmag_anisotropy.txt
measurement data saved in  ./U1456A_MagIC/KLY4S_U1456A.magic
specimen information  saved in new  ./er_specimens.txt

Combine all the measurements into magic_measurements.txt (skipping Archive measurements for now.)


In [10]:
!combine_magic.py -F U1456A_MagIC/magic_measurements.txt  -f U1456A_MagIC/srmdiscrete-355-U1456-A.csv.magic U1456A_MagIC/U1456A.jr6.magic  U1456A_MagIC/KLY4S_U1456A.magic


['f', 'F', 'A', 'WD', 'ID', 'Fsa', 'Fsi'] 7
-I- using default for arg: A
-
-I- using default for arg: WD
-
-I- using default for arg: ID
-
-I- using default for arg: Fsa
-
-I- using default for arg: Fsi
-
File  U1456A_MagIC/srmdiscrete-355-U1456-A.csv.magic  read in with  1184  records
File  U1456A_MagIC/U1456A.jr6.magic  read in with  616  records
File  U1456A_MagIC/KLY4S_U1456A.magic  read in with  173  records
1973  records written to file  U1456A_MagIC/magic_measurements.txt
All records stored in  U1456A_MagIC/magic_measurements.txt

Combine all the sample tables into er_samples.txt


In [11]:
!combine_magic.py -F U1456A_MagIC/er_samples.txt -f U1456A_MagIC/U1456A_er_samples.txt


['f', 'F', 'A', 'WD', 'ID', 'Fsa', 'Fsi'] 7
-I- using default for arg: A
-
-I- using default for arg: WD
-
-I- using default for arg: ID
-
-I- using default for arg: Fsa
-
-I- using default for arg: Fsi
-
File  U1456A_MagIC/U1456A_er_samples.txt  read in with  188  records
188  records written to file  U1456A_MagIC/er_samples.txt
All records stored in  U1456A_MagIC/er_samples.txt

Interpret the specimen demagnetizations

Use QuickMagIC Demag GUI to interpret the data outside this notebook. Then come back here....

Plot the data versus depth


In [21]:
!Core_depthplot.py -ts gts12 0 3.5 -d 0 500 -D -fsp U1456A_MagIC/pmag_specimens.txt bo 5 -fsa U1456A_MagIC/er_samples.txt  -sav -fmt  png


0  measurements read in from  ./magic_measurements.txt
no bulk measurement data matched your request
spec file found
Plot saved as  U1456A_m:_LT-NO_core-depthplot.png

In [22]:
Image(filename='U1456A_m:_LT-NO_core-depthplot.png')


Out[22]:

In [18]:
!ANI_depthplot.py -f U1456A_MagIC/rmag_anisotropy.txt -fb U1456A_MagIC/magic_measurements.txt -fsa U1456A_MagIC/er_samples.txt -sav -fmt png


Plot saved as  U1456A_ani-depthplot.png

In [19]:
Image(filename='U1456A_ani-depthplot.png')


Out[19]: