Beispiel #1
0
def test():
    data = 'test_data/MUCSPN_afdemag.jr6'

    S = Sample(name='VB')

    M = S.add_measurement(mtype='afdemag', machine='jr6', mfile=data)
    # M.plt_afdemag(norm=True)
    M.calc_all()
    print M.results
Beispiel #2
0
    def setUp(self):
        # sample data files
        self.jr6_file = '../tutorials.rst/test_data/MUCSPN_afdemag.jr6'
        self.cryomag_file = '../tutorials.rst/test_data/NLCRYO_test.af'
        self.sushibar_file = '../tutorials.rst/test_data/MUCSUSH_af_test.af'

        # creating samples
        self.jr6_sample = Sample(name='VA')
        self.sushibar_sample = Sample(name='WURM')
        self.cryomag_sample = Sample(name='DA6B')

        # adding measurements
        self.jr6_af = self.jr6_sample.add_measurement(mtype='afdemag', mfile=self.jr6_file, machine='jr6')
        self.cryomag_af = self.cryomag_sample.add_measurement(mtype='afdemag', mfile=self.cryomag_file,
                                                              machine='cryomag',
                                                              demag_type='x')
        self.sushibar_af = self.sushibar_sample.add_measurement(mtype='afdemag', mfile=self.sushibar_file,
                                                                machine='sushibar')
Beispiel #3
0
def test():
    start = time.clock()
    cryomag_file = 'test_data/NLCRY_Thellier_test.TT'

    # creating a sample
    sample = Sample(name='1a')

    C = CryoMag(dfile=cryomag_file, sample_name=sample.name)
    interm = time.clock() - start
    print interm
Beispiel #4
0
def test():
    data = 'test_data/MUCSUSH_af_test.af'
    S = Sample(name='WURM')
    M = S.add_measurement(mtype='afdemag', mfile=data, machine='SushiBar')
    # M.plt_afdemag()
    # print M.result_mdf(interpolation='smooth_spline')
    demag.AfDemag(S,
                  norm='max',
                  mdf_text=True,
                  mdf_line=True,
                  diff_fill=True,
                  plot='save',
                  smoothing=1,
                  diff=1)
def test():
    # thellier output file from cryomag
    cryomag_file = 'test_data/NLCRY_Thellier_test.TT'
    cryomag_is_file = 'test_data/NLCRY_Thellier_is_test.TT'
    # creating a sample
    sample = Sample(name='1a')
    M = sample.add_measurement(mtype='thellier',
                               mfile=cryomag_file,
                               machine='cryomag')
    M.set_initial_state(mtype='trm', mfile=cryomag_is_file, machine='cryomag')
    M.add_sval(stype='pressure', sval=0.0)
    M.series[0].add_value('max_p', 0.6)
    M.series[0].add_value('tonnage', 3)
    M.series[0].add_value('release_time', 30.0)

    # M.plt_arai(norm='is')

    print M.th
    print M.initial_state.data

    print M.th / M.initial_state.data
    print M.initial_state.data['m'][0]
    print M.th / M.initial_state.data['m'][0]
Beispiel #6
0
__author__ = 'volk'
from Structure.sample import Sample
from Readin.cryo_mag import CryoMag
import matplotlib.pyplot as plt

# specify data file
cryomag_file = '../test_data/NLCRY_Thellier_test.TT'

# create new Sample
sample = Sample(name='1a')

# Readin of sample data, all other samples will not get processed
CM = CryoMag(cryomag_file, sample)

# raw data of positions can be accessed like
CM.pos2
# raw data of baselines can also be accessed with
CM.baseline

# raw float data can be accessed like this
CM.float_data()
# also for the different positions
CM.float_data(mode='pos1')

# raw sting data like this
CM.str_data()

#calculating the error weighted mean of data
CM.weighted_mean()

# quick plotting of data
Beispiel #7
0
__author__ = 'volk'
from Structure.sample import Sample
import matplotlib.pyplot as plt
import numpy as np

dfile = 'test_data/MICROSENSE_HYS-test.VHD'

sample = Sample(name='microsense_test')

M = sample.add_measurement(mtype='hys', mfile=dfile, machine='microsense')

M.plt_hys()