Dear James,
thanks for your email.
> It has helped my confidence in reviewing results.
Great!
> does TTK
> perform both a sub-level set filtration (to determine "birth" critical
> points, integer code 0 & 1)
TTK performs a _sub_-level set filtration to determine the persistence of its connected components, which are born at minimas (type 0) and die at join saddles (type 1).
TTK also performs a _super_-level set filtration to determine the persistence of its connected components, which are born at maximas (type 3) and die at split saddles (type 2).
As mentioned in my previous email, the global minimum and the global maximum are paired together by convention in TTK.
> - No integer type 4 or 5 have been assigned.
These codes are used by other modules (such as the critical points, Reeb graph, contour tree or Morse-Smale complex).
> - Note that my "birth" and "death" designation comes from *assuming*
> that the output of:
> - persistent_pairs = pv.read(diagram_filename)
> print(persistent_pairs["CriticalType"])
> - gives me a list of the integer assignments ordered [birth,
> death, birth, death, ... , birth, death]
In general, I'd recommend to use vtk's python API to parse ttk's outputs. Please find attached a sample data set (with the monkey saddle you experimented with) and a simple python script that parses and displays the output using vtk's python API.
The output of this script (for the output parsing part) should be as follows:
```
=======================================================================
[python] Global Min - Global Max pair =================================
[python] Pair #0
[python] VertexId(100.0) CriticalType(0.0) XYZ((0.5, -0.5, 0.0))
[python] VertexId(10100.0) CriticalType(3.0) XYZ((-0.5, 0.5, 0.0))
=======================================================================
[python] Local min pairs ==============================================
[python] Pair #0
[python] VertexId(10200.0) CriticalType(0.0) XYZ((0.5, 0.5, 0.0))
[python] VertexId(5100.0) CriticalType(1.0) XYZ((0.0, 0.0, 0.0))
[python] Pair #1
[python] VertexId(5050.0) CriticalType(0.0) XYZ((-0.5, 0.0, 0.0))
[python] VertexId(5100.0) CriticalType(1.0) XYZ((0.0, 0.0, 0.0))
=======================================================================
[python] Local max pairs ==============================================
[python] Pair #0
[python] VertexId(5100.0) CriticalType(2.0) XYZ((0.0, 0.0, 0.0))
[python] VertexId(5150.0) CriticalType(3.0) XYZ((0.5, 0.0, 0.0))
[python] Pair #1
[python] VertexId(5100.0) CriticalType(2.0) XYZ((0.0, 0.0, 0.0))
[python] VertexId(0.0) CriticalType(3.0) XYZ((-0.5, -0.5, 0.0))
=======================================================================
```
I hope this helps.
Please do not hesitate to let us know if you have any questions or if you run into any issues. We will be happy to help.
Best regards,
julien
--
Dr Julien Tierny
CNRS Researcher
Sorbonne Universite
http://lip6.fr/Julien.Tierny
On Wednesday, 1 September 2021 22:06:54 CEST James Polly wrote:
> Dear Julian,
>
> Thank you very much for the prompt and very helpful response to my
> question.
> It has helped my confidence in reviewing results.
>
> Please pardon the combination of nomenclatures in the following:
> does TTK
> perform both a sub-level set filtration (to determine "birth" critical
> points, integer code 0 & 1) and a super-level set filtration (to determine
> "death" critical points, integer code 2 & 3)?
>
> Using the TTK's persistence diagram tool on several smooth fields, both
> ideal (like the saddle previously discussed) and obtained via
> measurements/models (still differentiable on the interior) I have two
> relevant observations:
>
> - No integer type 4 or 5 have been assigned.
> - As you noted above ("top and bottom saddle labels may need to be
> switched"), the type assignment at the saddle is persistent in other
> situations. This is shown in the below image, though note that there are
> repeated critical points of both "birth" and "death" variety.
> - Note that my "birth" and "death" designation comes from *assuming*
> that the output of:
> - persistent_pairs = pv.read(diagram_filename)
> print(persistent_pairs["CriticalType"])
> - gives me a list of the integer assignments ordered [birth,