示例#1
0
from datapaths import projectPath, imagePath
from resistics.project.io import loadProject

#  load the project and also provide a config file
projData = loadProject(projectPath, configFile="asciiconfig.ini")
projData.printInfo()

from resistics.project.time import viewTime
from resistics.common.plot import plotOptionsTime, getPaperFonts

plotOptions = plotOptionsTime(plotfonts=getPaperFonts())
fig = viewTime(
    projData,
    "2018-01-03 00:00:00",
    "2018-01-05 00:00:00",
    polreverse={"Hy": True},
    plotoptions=plotOptions,
    save=False,
)
fig.savefig(imagePath / "viewTime_polreverse")

# calculate spectrum using the new configuration
from resistics.project.spectra import calculateSpectra

calculateSpectra(projData, calibrate=False, polreverse={"Hy": True})
projData.refresh()

# plot spectra stack
from resistics.project.spectra import viewSpectraStack
from resistics.common.plot import plotOptionsSpec, getPaperFonts
示例#2
0
from datapaths import remotePath, remoteImages
from resistics.project.io import loadProject
from resistics.project.spectra import calculateSpectra
from resistics.project.transfunc import processProject, viewImpedance
from resistics.project.statistics import calculateRemoteStatistics, viewStatistic
from resistics.project.mask import newMaskData, calculateMask
from resistics.common.plot import plotOptionsTransferFunction, getPaperFonts

plotOptions = plotOptionsTransferFunction(plotfonts=getPaperFonts())
proj = loadProject(remotePath, "remoteConfig.ini")

calculateSpectra(proj, sites=["M6", "Remote"])
proj.refresh()

# single site processing
processProject(proj, sites=["M6", "Remote"])
figs = viewImpedance(
    proj,
    sites=["M6", "Remote"],
    sampleFreqs=[128],    
    oneplot=False,
    plotoptions=plotOptions,
    save=False,
    show=False,
)
figs[0].savefig(remoteImages / "singleSiteM6_128_dec8_5.png")
figs[1].savefig(remoteImages / "singleSiteRemote_128_dec8_5.png")

# calculate the statistic we are interested in
calculateRemoteStatistics(proj, "Remote", sites=["M6"], sampleFreqs=[128])
示例#3
0
# calculate statistics for MT site
from resistics.project.statistics import calculateStatistics

calculateStatistics(proj, sites=["site1_mt"])

# intersite
from resistics.project.transfunc import (
    processProject,
    processSite,
    viewImpedance,
)
from resistics.common.plot import plotOptionsTransferFunction, getPaperFonts

plotOptions = plotOptionsTransferFunction(figsize=(24, 12),
                                          plotfonts=getPaperFonts())
plotOptions["res_ylim"] = [1, 1000000]
processSite(
    proj,
    "site2_te",
    500,
    inputsite="site1_mt",
    postpend="intersite",
)
figs = viewImpedance(
    proj,
    sites=["site2_te"],
    postpend="intersite",
    plotoptions=plotOptions,
    oneplot=False,
    save=False,
from datapaths import projectPath, imagePath
from resistics.project.io import loadProject

projData = loadProject(projectPath)

# calculate another set of spectra for the 128 Hz data with notching at 50Hz and 16.667Hz
from resistics.project.spectra import calculateSpectra

calculateSpectra(projData, sampleFreqs=[128], notch=[50], specdir="notch")
projData.refresh()

# view the spectra
from resistics.common.plot import plotOptionsSpec, getPaperFonts
from resistics.project.spectra import viewSpectra, viewSpectraSection

plotOptions = plotOptionsSpec(plotfonts=getPaperFonts())
fig = viewSpectra(
    projData,
    "site1",
    "meas_2012-02-10_11-30-00",
    specdir="notch",
    plotoptions=plotOptions,
    show=False,
    save=False,
)
fig.savefig(imagePath / "multspec_viewspec_notch_spec")

fig = viewSpectraSection(
    projData,
    "site1",
    "meas_2012-02-10_11-30-00",
示例#5
0
from datapaths import remotePath, remoteImages
from resistics.project.io import loadProject
from resistics.project.statistics import (
    calculateRemoteStatistics,
    viewStatistic,
    viewStatisticHistogram,
    viewStatisticDensityplot,
)
from resistics.project.mask import newMaskData, calculateMask
from resistics.project.transfunc import processProject, viewImpedance
from resistics.common.plot import plotOptionsStandard, getPaperFonts

plotOptions = plotOptionsStandard(plotfonts=getPaperFonts())
proj = loadProject(remotePath)

calculateRemoteStatistics(
    proj,
    "Remote",
    sites=["M6"],
    sampleFreqs=[128],
    remotestats=[
        "RR_coherence",
        "RR_coherenceEqn",
        "RR_absvalEqn",
        "RR_transferFunction",
        "RR_resPhase",
    ],
)

lims = {0: 200, 1: 120, 2: 50, 3: 30}
for declevel in range(0, 4):
示例#6
0
        ["ExHxReal", "ExHxImag"],
        ["ExHyReal", "ExHyImag"],
        ["EyHxReal", "EyHxImag"],
        ["EyHyReal", "EyHyImag"],
    ],
    xlim=[-2500, 2500],
    ylim=[-2500, 2500],
)
fig.savefig(imagePath / "masksAndStats_statistic_4096_maskcoh_tf_crossplot")

# if there are more than one data folder for the same site at the same sampling frequency
# the better way to plot statistics with masks is using the methods in projectStatistics
from resistics.project.statistics import viewStatistic, viewStatisticHistogram
from resistics.common.plot import plotOptionsStandard, getPaperFonts

plotOptions = plotOptionsStandard(plotfonts=getPaperFonts())
fig = viewStatistic(
    projData,
    "site1",
    128,
    "coherence",
    maskname="coh70_100",
    ylim=[0, 1],
    save=False,
    show=False,
    plotoptions=plotOptions,
)
fig.savefig(imagePath / "masksAndStats_projstat_128_maskcoh_coh_view")
viewStatisticHistogram(
    projData,
    "site1",