Esempio n. 1
0
writer = DataWriterInternal()
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.projectTime 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(Path(proj.imagePath, "viewTimeGaps.png"))

from resistics.ioHandlers.dataReaderInternal import DataReaderInternal

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

readerSection2 = DataReaderInternal(
Esempio n. 2
0
plotOptions = plotOptionsTime(plotfonts=getPresentationFonts())

# resample to 1024 Hz and save in new site
from resistics.project.projectTime 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(Path(proj.imagePath, "viewTimeLowpass.png"))

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

fig = viewTime(
    proj,
    "2012-02-10 11:05:00",
Esempio n. 3
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(Path(proj.imagePath, "viewTimePolarityReversal.png"))

preProcess(
    proj,
    sites="site1",
    scale={"Ex": -2, "Ey": 0.5},
    outputsite="site1_scale",
    prepend="",
)
proj.refresh()
proj.printInfo()
Esempio n. 4
0
import os
from resistics.project.projectIO import loadProject

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

from resistics.project.projectTime import viewTime
from resistics.utilities.utilsPlotter import plotOptionsTime, getPaperFonts

plotOptions = plotOptionsTime(plotfonts=getPaperFonts())
viewTime(
    projData,
    "2018-01-03 00:00:00",
    "2018-01-05 00:00:00",
    polreverse={"Hy": True},
    plotoptions=plotOptions,
    save=True,
)

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

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

# plot spectra stack
from resistics.project.projectSpectra import viewSpectraStack
from resistics.utilities.utilsPlotter import plotOptionsSpec, getPaperFonts

plotOptions = plotOptionsSpec(plotfonts=getPaperFonts())
Esempio n. 5
0
import os
from resistics.project.projectIO import loadProject

# load the project
projectPath = os.path.join("tutorialProject")
projData = loadProject(projectPath)

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

# view data between certain date range
viewTime(projData, "2012-02-11 01:00:00", "2012-02-11 01:10:00", save=True)

# explicitly define sites and channels to plot
viewTime(
    projData,
    "2012-02-11 01:00:00",
    "2012-02-11 01:02:00",
    sites=["site1"],
    chans=["Ex", "Hy"],
    save=True,
)

# calibrate magnetic channels
viewTime(
    projData,
    "2012-02-11 01:00:00",
    "2012-02-11 01:02:00",
    sites=["site1"],
    chans=["Ex", "Hy"],
    calibrate=True,
Esempio n. 6
0
fig = projData.view()
fig.savefig(os.path.join(projectPath, "images", "projectTimeline"))

# view site data
siteData = projData.getSiteData("site1")
fig = siteData.view()
fig.savefig(os.path.join(projectPath, "images", "siteTimeline"))

from resistics.project.projectTime import viewTime
from resistics.utilities.utilsPlotter import plotOptionsTime, getPaperFonts

plotOptions = plotOptionsTime(plotfonts=getPaperFonts())
viewTime(
    projData,
    "2018-01-03 00:00:00",
    "2018-01-05 00:00:00",
    plotoptions=plotOptions,
    save=True,
)

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

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

from resistics.project.projectSpectra import viewSpectraStack
from resistics.utilities.utilsPlotter import plotOptionsSpec

plotOptions = plotOptionsSpec(plotfonts=getPaperFonts())
viewSpectraStack(
Esempio n. 7
0
        interp=True,
        resamp={250: 128},
        outputsite="Remote",
        prepend="",
        postpend=postpend,
    )
proj.refresh()

from resistics.utilities.utilsPlotter 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(Path(proj.imagePath, "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,
Esempio n. 8
0
from resistics.project.projectIO import loadProject

projectPath = Path("preprocessProject")
proj = loadProject(projectPath)
proj.printInfo()

from resistics.utilities.utilsPlotter import plotOptionsTime, getPresentationFonts
plotOptions = plotOptionsTime(plotfonts=getPresentationFonts())

# resample to 1024 Hz and save in new site
from resistics.project.projectTime 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.projectTime 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(Path(proj.imagePath, "viewTimeResample.png"))