WaterFutures / EPyT-Flow

A high-level interface designed for the easy generation of hydraulic and water quality scenario data.
https://epyt-flow.readthedocs.io/en/stable
MIT License
18 stars 4 forks source link

Improve how we retrieve sensor readings over the entire simulation #4

Closed Mariosmsk closed 8 months ago

Mariosmsk commented 8 months ago

res = sim.get_data()

res (like now)

res[1].sensorid() res[1].sensortype() res[1].values()

res[2].sensorid() res[2].sensortype() res[2].values()

1, 2 is the index column in the array with all the sensor data

andreArtelt commented 8 months ago

I am not completely sure about this. I agree, that returning a Numpy array might not be the most user-friendly way. However, I find the indices in your example are a bit confusing - not clear what they mean, also the user could use an invalid index here as well.

Maybe we are looking for smth. like this:

# ...

# Run simulation
res = sim.run_simulation()

# Get sensor readings
res.get_pressure_readings() # Pressure at all pressure sensors
res.get_pressure_readings(sensor_locations=["13", "16"])    # Pressure at some pressure sensors only
Mariosmsk commented 8 months ago

We agree with the sim.get_pressure_readings()! We were also thinking of that as sim.get_data_pressures(). Like the issue #3 @SteliosVr

andreArtelt commented 8 months ago

I added those functions. However, the documentation & tutorial has still to be updated.