# Export file for plot over line: noisy curve

**URL:** https://discourse.paraview.org/t/export-file-for-plot-over-line-noisy-curve/12010
**Category:** ParaView Support
**Tags:** vtk, python
**Created:** [May 3, 2023, 8:43am UTC](https://discourse.paraview.org/t/export-file-for-plot-over-line-noisy-curve/12010 "2023-05-03T08:43:50Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Boone](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/c67d28/32.png) [@Boone](https://discourse.paraview.org/u/Boone)
#### Post date: [May 3, 2023, 8:43am UTC](https://discourse.paraview.org/t/export-file-for-plot-over-line-noisy-curve/12010/1 "2023-05-03T08:43:50Z")

</div>

Hi all,

I perform CFD with a mesh that is hybrid. Some areas are structured and others are unstructured. When I export the results on a given region of my geometry, I obtain a curve that is noisy for unstructured mesh area (see attached picture).

 ![plot](https://discourse.paraview.org/uploads/default/original/2X/7/7c7824c08d21db2bc4931ac937a9c1f3260b95be.png)  
.

Here is an extract of the code used to extract the profiles.

```auto
    reader = vtk.vtkEnSightGoldBinaryReader()
    reader.SetCaseFileName(in_casefile)
    reader.ReadAllVariablesOff()
    reader.SetTimeValue(time_value)
    
    for i, field in enumerate(fields):
        reader.SetCellArrayStatus(field[0], 1)
        reader.Update()
        print(field)
    
        fluid_domain = vtk.vtkExtractBlock()
        fluid_domain.SetInputConnection(reader.GetOutputPort())
        fluid_domain.AddIndex(1)
        fluid_domain.SetPruneOutput(True)
        fluid_domain.Update()
    
        for j, org_nor in enumerate(origins_normals):
            plane = vtk.vtkPlane()
            plane.SetOrigin(org_nor[0])
            plane.SetNormal(org_nor[1])
    
            slice1 = vtk.vtkCutter()
            slice1.SetCutFunction(plane)
            slice1.SetInputConnection(fluid_domain.GetOutputPort(0))
            slice1.GenerateTrianglesOff()
            slice1.Update()
    
            cell_centers = vtk.vtkCellCenters()
            cell_centers.SetInputConnection(slice1.GetOutputPort(0))
            cell_centers.Update()
    
            index_1 = field[1]
            index_2 = field[2]
    
            centers_data = dsa.WrapDataObject(cell_centers.GetOutputDataObject(0))
            field_centers = centers_data.PointData[field[0]].Arrays[0][:, index_1, index_2]
            
            y_centers_uniq, y_idx, y_inv, y_cnt = np.unique(
                centers_data.Points[:, 1].Arrays[0].round(decimals=16),
                return_index=True,
                return_inverse=True,
                return_counts=True)
    
            """ Averaging in Z """
            field_Zavg = np.array([algs.mean(field_centers[y_inv == idx])
                                   for idx in range(y_centers_uniq.size)])

```

How can I solve this issue?

Thanks a lot!
