Пример #1
0
                 radius=1.0),
    CircularLoop(orient="z",
                 moment=1.0,
                 x=7.89,
                 y=0.0,
                 z=0.0,
                 pitch=0.0,
                 roll=0.0,
                 yaw=0.0,
                 radius=1.0)
]

##############################################################################
# Instantiate the system for the data
system = FdemSystem(frequencies=frequencies,
                    transmitter=transmitters,
                    receiver=receivers)

##############################################################################
# Create some data with random co-ordinates
x = np.random.randn(100)
y = np.random.randn(100)
z = np.random.randn(100)

data = FdemData(x=x, y=-y, z=z, system=system)

#%%
# Reading in the Data
# +++++++++++++++++++
# Of course measured field data is stored on disk. So instead we can read data from file.
Пример #2
0
    CircularLoop(orient='z'),
    CircularLoop(orient='z')
]

receiverLoops = [
    CircularLoop(orient='z', x=7.93),
    CircularLoop(orient='z', x=7.91),
    CircularLoop('x', moment=1, x=9.03),
    CircularLoop(orient='z', x=7.91),
    CircularLoop(orient='z', x=7.91),
    CircularLoop(orient='z', x=7.89)
]

################################################################################
# Now we can instantiate the system.
fds = FdemSystem(frequencies, transmitterLoops, receiverLoops)

################################################################################
# And use the system to instantiate a datapoint
#
# Note the extra arguments that can be used to create the data point.
# data is for any observed data one might have, while std are the estimated standard
# deviations of those observed data.
#
# Define some in-phase then quadrature data for each frequency.
data = np.r_[145.3, 435.8, 260.6, 875.1, 1502.7, 1516.9, 217.9, 412.5, 178.7,
             516.5, 405.7, 255.7]

fdp = FdemDataPoint(x=0.0,
                    y=0.0,
                    z=30.0,
Пример #3
0
# Send and recieve a single datapoint from the file.
if master:
    fdp = fd._readSingleDatapoint()
    for i in range(1, size):
        fdp1 = fd._readSingleDatapoint()
        fdp1.Isend(dest=i, world=world)
else:
    fdp = FdemDataPoint().Irecv(source=0, world=world)

assert np.allclose(fdp.data, fdSave.data[rank, :], equal_nan=True), Exception("Could not use FdemData.Isend/Irecv. Rank {}".format(rank))

#Testing pre-read in system classes
sysPath = [dataPath+"FdemSystem2.stm"]
systems = []
for s in sysPath:
    systems.append(FdemSystem(systemFilename=s))

# Send and recieve a single datapoint from the file.
if master:
    fd = FdemData()
    fd._initLineByLineRead(dataPath+"Resolve2.txt", dataPath+"FdemSystem2.stm")

    fdp = fd._readSingleDatapoint()
    for i in range(1, size):
        fdp1 = fd._readSingleDatapoint()
        fdp1.Isend(dest=i, world=world, systems=systems)
else:
    fdp = FdemDataPoint().Irecv(source=0, world=world, systems=systems)

assert np.allclose(fdp.data, fdSave.data[rank, :], equal_nan=True), Exception("Could not use FdemData.Isend/Irecv, with pre-existing system class. Rank {}".format(rank))