# Exctracting time history of a spatial point in pvpython

**URL:** https://discourse.paraview.org/t/exctracting-time-history-of-a-spatial-point-in-pvpython/528
**Category:** ParaView Support
**Tags:** python
**Created:** [September 5, 2018, 10:41pm UTC](https://discourse.paraview.org/t/exctracting-time-history-of-a-spatial-point-in-pvpython/528 "2018-09-05T22:41:19Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![kilojoules](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kilojoules/32/292_2.png) [@kilojoules](https://discourse.paraview.org/u/kilojoules)
#### Post date: [September 5, 2018, 10:41pm UTC](https://discourse.paraview.org/t/exctracting-time-history-of-a-spatial-point-in-pvpython/528/1 "2018-09-05T22:41:19Z")

</div>

Hello All.

I would like to extract time series data for a single point in my domain. Right now, I have only been able to come up with a workflow that accesses one time-history value at a time. I send the desired time step to this script, extract the entire set of data to a csv, then extract the pressure from the nodeID I’m interested from the csv in a different python script. I do this whole process for every time step. Is there a more efficient way to extract the time-history of a single point?

First script that accepts a time step and dumps the entire data set

```
from paraview.simple import *
from paraview.numpy_support import vtk_to_numpy
import vtk.numpy_interface.dataset_adapter as dsa
import sys
s = ExodusIIReader(FileName='first_cfl_100/aoa_19.500000/results/S809_AoA0_SST_Fnew.e')
d = CreateWriter('./out.csv', s)
d.FieldAssociation = "Points"
d.UpdatePipeline(time=float(sys.argv[-1]))
d = CreateWriter('./out.csv', s)

```

Second script that extracts the pressure associated with the point I’m interested in

```
import pandas as pd
import numpy as np
dat = pd.read_csv('./out0.csv')
dat = dat[dat.GlobalNodeId==1531]
print(dat.pressure.values[0])
```

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [October 16, 2018, 1:27am UTC](https://discourse.paraview.org/t/exctracting-time-history-of-a-spatial-point-in-pvpython/528/2 "2018-10-16T01:27:49Z")

</div>

> [@kilojoules](#):
>
> Is there a more efficient way to extract the time-history of a single point?

Yes! You can do this quite easily using the _Find Data_ dialog in the ParaView desktop application. First, set the first popup menu to “Point(s)” from the data set you have loaded. Then, set the query to “Global Id” “is” 1531, as in your example. Next, click the button that says “Run Selection Query”. Lastly, click the button in the bottom row that says “Plot Selection Over Time”. Go to the _Pipeline Browser_ and click the **Apply** button. A graph will appear showing you the data plotted over time. With the **PlotSelectionOverTime** filter selected in the browser, go to File → Save Data and save out a .csv file. It will contain data values at the selected point over all time steps.

---

<div class="post-metadata">

### Author: ![kayarre](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kayarre/32/1994_2.png) [@kayarre](https://discourse.paraview.org/u/kayarre)
#### Post date: [November 16, 2019, 11:43pm UTC](https://discourse.paraview.org/t/exctracting-time-history-of-a-spatial-point-in-pvpython/528/3 "2019-11-16T23:43:40Z")

</div>

How would you do this if you have a long list of global id’s that don’t have order such that one could use ranges?

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [November 17, 2019, 5:11am UTC](https://discourse.paraview.org/t/exctracting-time-history-of-a-spatial-point-in-pvpython/528/4 "2019-11-17T05:11:46Z")

</div>

You can use the _Find Data_ dialog and set the query to “Global Id” “is one of” and then provide a comma-separated list of global ids.

---

<div class="post-metadata">

### Author: ![kayarre](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kayarre/32/1994_2.png) [@kayarre](https://discourse.paraview.org/u/kayarre)
#### Post date: [November 18, 2019, 1:08am UTC](https://discourse.paraview.org/t/exctracting-time-history-of-a-spatial-point-in-pvpython/528/5 "2019-11-18T01:08:02Z")

</div>

I did try that, thank you. When I did it with a large number of values it would extract the data but when I went to extract time steps from a remote connection it made paraview crash. (maybe the id’s are changing in time (although I am using global Ids, so I will have to check that)

also, I had use the selection tool and then export the list from the spreadsheet view and then transposed the csv for the global id column and saved to csv when I then copied and pasted from text editor.

I figured there would be an easier way, usually paraview is good at there being an easier way.  
Thank you

---

<div class="post-metadata">

### Author: ![kayarre](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kayarre/32/1994_2.png) [@kayarre](https://discourse.paraview.org/u/kayarre)
#### Post date: [November 18, 2019, 4:12pm UTC](https://discourse.paraview.org/t/exctracting-time-history-of-a-spatial-point-in-pvpython/528/6 "2019-11-18T16:12:23Z")

</div>

I was able to get this to work properly using the method I describe above.
