示例#1
0
                   dx=60,
                   dy=60.7)

# load the project
proj = loadProject(intersitePath, "customconfig.ini")
proj.printInfo()
fig = proj.view()
fig.savefig(intersiteImages / "timeline.png")

# view time
from resistics.project.time import viewTime

fig = viewTime(
    proj,
    startDate="2019-05-27 14:15:00",
    endDate="2019-05-27 15:00:00",
    filter={"lpfilt": 4},
    save=False,
    show=False,
)
fig.savefig(intersiteImages / "viewTime.png")

# calculate spectra
from resistics.project.spectra import calculateSpectra

calculateSpectra(proj, sites=["site1_mt"])
calculateSpectra(proj,
                 sites=["site2_te"],
                 chans=["Ex", "Ey"],
                 polreverse={"Ey": True})
proj.refresh()
示例#2
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
示例#3
0
writer = TimeWriterInternal()
writer.setOutPath(
    Path(proj.timePath, "site1_gaps", "meas_2012-02-10_11-05-00_section1"))
writer.writeData(headers, chanHeaders, timeOriginal1, physical=True)
writer.setOutPath(
    Path(proj.timePath, "site1_gaps", "meas_2012-02-10_11-05-00_section2"))
writer.writeData(headers, chanHeaders, timeOriginal2, physical=True)

from resistics.project.time import viewTime

# now view time
fig = viewTime(
    proj,
    "2012-02-10 11:05:00",
    "2012-02-10 11:14:00",
    sites=["site1", "site1_gaps"],
    filter={"lpfilt": 16},
    chans=["Ex", "Hy"],
    show=False,
    plotoptions=plotOptions,
)
fig.savefig(preprocessImages / "viewTimeGaps.png")

from resistics.time.reader_internal import TimeReaderInternal

siteGaps = proj.getSiteData("site1_gaps")
readerSection1 = TimeReaderInternal(
    siteGaps.getMeasurementTimePath("meas_2012-02-10_11-05-00_section1"))
timeData1 = readerSection1.getPhysicalSamples(remaverage=False)
timeData1.printInfo()

readerSection2 = TimeReaderInternal(
示例#4
0
        interp=True,
        resamp={250: 128},
        outputsite="Remote",
        prepend="",
        postpend=postpend,
    )
proj.refresh()

from resistics.common.plot import plotOptionsTime, getPresentationFonts
plotOptions = plotOptionsTime(plotfonts=getPresentationFonts())

fig = viewTime(
    proj,
    sites=["M6", "Remote"],
    startDate="2016-02-17 04:05:00",
    endDate="2016-02-17 04:15:00",
    chans=["Ex", "Hy"],
    plotoptions=plotOptions,
    save=False,
    show=False,
)
fig.savefig(remoteImages / "viewTimePreprocess.png")

fig = viewTime(
    proj,
    sites=["M6", "Remote"],
    startDate="2016-02-17 04:05:00",
    endDate="2016-02-17 04:15:00",
    filter={"lpfilt": 4},
    chans=["Ex", "Hy"],
    plotoptions=plotOptions,
    save=False,
示例#5
0
proj = loadProject(preprocessPath)
proj.printInfo()

from resistics.common.plot import plotOptionsTime, getPresentationFonts
plotOptions = plotOptionsTime(plotfonts=getPresentationFonts())

# resample to 1024 Hz and save in new site
from resistics.project.time import preProcess

preProcess(proj,
           sites="site1",
           resamp={4096: 1024},
           outputsite="site1_resample",
           prepend="")
proj.refresh()
proj.printInfo()

# let's view the time series
from resistics.project.time import viewTime

fig = viewTime(
    proj,
    "2012-02-10 11:05:00",
    "2012-02-10 11:05:03",
    sites=["site1", "site1_resample"],
    chans=["Hx", "Hy", "Hz"],
    show=False,
    plotoptions=plotOptions,
)
fig.savefig(preprocessImages / "viewTimeResample.png")
示例#6
0
# resample to 1024 Hz and save in new site
from resistics.project.time import preProcess, viewTime

preProcess(proj,
           sites="site1",
           filter={"lpfilt": 32},
           outputsite="site1_lowpass",
           prepend="")
proj.refresh()
proj.printInfo()

fig = viewTime(
    proj,
    "2012-02-10 11:05:00",
    "2012-02-10 11:05:03",
    sites=["site1", "site1_lowpass"],
    chans=["Hx", "Hy", "Hz"],
    show=False,
    plotoptions=plotOptions,
)
fig.savefig(preprocessImages / "viewTimeLowpass.png")

preProcess(proj,
           sites="site1",
           filter={"hpfilt": 512},
           outputsite="site1_highpass",
           prepend="")
proj.refresh()
proj.printInfo()

fig = viewTime(
示例#7
0
from datapaths import projectPath, imagePath
from resistics.project.io import loadProject

# load the project
projData = loadProject(projectPath)

# load the viewing method
from resistics.project.time import viewTime

# view data between certain date range
fig = viewTime(projData,
               "2012-02-11 01:00:00",
               "2012-02-11 01:10:00",
               show=False,
               save=False)
fig.savefig(imagePath / "viewTime_projtime_view")

# explicitly define sites and channels to plot
fig = viewTime(
    projData,
    "2012-02-11 01:00:00",
    "2012-02-11 01:02:00",
    sites=["site1"],
    chans=["Ex", "Hy"],
    show=False,
    save=False,
)
fig.savefig(imagePath / "viewTime_projtime_view_chans")

# calibrate magnetic channels
fig = viewTime(
示例#8
0
fig = projData.view()
fig.savefig(imagePath / "projectTimeline")

# view site data
siteData = projData.getSiteData("site1")
fig = siteData.view()
fig.savefig(imagePath / "siteTimeline")

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",
    plotoptions=plotOptions,
    save=False,
)
fig.savefig(imagePath / "viewTime")

# calculate spectrum using standard options
from resistics.project.spectra import calculateSpectra

calculateSpectra(projData, calibrate=False)
projData.refresh()

from resistics.project.spectra import viewSpectraStack
from resistics.common.plot import plotOptionsSpec

plotOptions = plotOptionsSpec(plotfonts=getPaperFonts())
示例#9
0
preProcess(
    proj,
    sites="site1",
    polreverse={"Ey": True},
    outputsite="site1_polreverse",
    prepend="",
)
proj.refresh()
proj.printInfo()

fig = viewTime(
    proj,
    "2012-02-10 11:05:00",
    "2012-02-10 11:05:01",
    sites=["site1", "site1_polreverse"],
    chans=["Ex", "Ey"],
    show=False,
    plotoptions=plotOptions,
)
fig.savefig(preprocessImages / "viewTimePolarityReversal.png")

preProcess(
    proj,
    sites="site1",
    scale={
        "Ex": -2,
        "Ey": 0.5
    },
    outputsite="site1_scale",
    prepend="",