Re: Death index

Dmitriy Morozov

m = d.homology_persistence(f)

and i is the index of a birth of a homology class, then

m.pair(i) gives you its pair, i.e., the index of the death.

On Thu, Nov 22, 2018 at 10:54 AM <K.A.Garside2@...> wrote:
Hello,

I was wondering if it is possible to obtain the index of the simplex that realises the death of a component? You can output the birth index with pt.data but can you also do this for the death index?

Many thanks!

find all the nodes which form a specific loop

yihangs@...

Hi Dmitriy!
I am a new user of Dionysus and I met a problem when using the package. from H1 homology group, I can know the birth time and the death time of a loop by using Dionysus, but I don't know how to find all the nodes from my data which form this specific loop.
for example, if I have 5 points in the two dimensional space, the coordinate of them are:
[[0,0],[4,0],[0,4],[5,4],[3,7]] it is a pentagon. when using rips complex, I can get one h1 loop, but I don't know I can get these five nodes which form this loop.
Are there any functions in Dionysus which can help me achieve that?
Thank you!

Re: find all the nodes which form a specific loop

Dmitriy Morozov

This question has come up a couple of times before on this list. Can you take a look at the two threads below? If you have questions after reading them, don't hesitate to follow up.

Dmitriy

On Mon, Dec 3, 2018 at 5:10 PM <yihangs@...> wrote:
Hi Dmitriy!
I am a new user of Dionysus and I met a problem when using the package. from H1 homology group, I can know the birth time and the death time of a loop by using Dionysus, but I don't know how to find all the nodes from my data which form this specific loop.
for example, if I have 5 points in the two dimensional space, the coordinate of them are:
[[0,0],[4,0],[0,4],[5,4],[3,7]] it is a pentagon. when using rips complex, I can get one h1 loop, but I don't know I can get these five nodes which form this loop.
Are there any functions in Dionysus which can help me achieve that?
Thank you!

Re: find all the nodes which form a specific loop

yihangs@...

Hi Dmitriy,
Sure! I will have look at these two discussions. Thanks a lot!

@Ilin

So I am trying to download and use Dionysus. I use python 2.7 on Anaconda on Windows 8.1. However when I try to pip install I get the following error messages

Failed Building wheel for dionysus.

and

Command "C:\Users\user\Anaconda3\python.exe -u -c "import setuptools, tokenize;_
_file__='c:\\users\\user\\appdata\\local\\temp\\pip-install-0qq54w\\dionysus\\se
, '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\use
rs\user\appdata\local\temp\pip-record-jli4zz\install-record.txt --single-version
-externally-managed --compile" failed with error code 1 in c:\users\user\appdata
\local\temp\pip-install-0qq54w\dionysus\

I have downloaded boost so I am not sure what the issue might be.

Thanks in advance for any help.

Dmitriy Morozov

The issue of installing Dionysus on Windows has come up before, but unfortunately it doesn't have a good solution. One person succeeded using MinGW compiler, but I don't think anyone has replicated this effort. Unfortunately, I have no experience with Windows myself.

I suggest you look through the archives of this mailing list. https://groups.io/g/dionysus/messages

On Tue, Dec 11, 2018 at 9:55 PM <ilinfizika@...> wrote:
So I am trying to download and use Dionysus. I use python 2.7 on Anaconda on Windows 8.1. However when I try to pip install I get the following error messages

Failed Building wheel for dionysus.

and

Command "C:\Users\user\Anaconda3\python.exe -u -c "import setuptools, tokenize;_
_file__='c:\\users\\user\\appdata\\local\\temp\\pip-install-0qq54w\\dionysus\\se
, '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\use
rs\user\appdata\local\temp\pip-record-jli4zz\install-record.txt --single-version
-externally-managed --compile" failed with error code 1 in c:\users\user\appdata
\local\temp\pip-install-0qq54w\dionysus\

I have downloaded boost so I am not sure what the issue might be.

Thanks in advance for any help.

@Ilin

Thank you for the response, I'll probably just end up using a virtual machine to set up a Linux environment.

Running Dionysus not on command line

le24p@...

I installed Dionysus, and I wonder can we only run the program in terminal? Or is there anyway to run program in app like Sublime, etc.?
Thank you!

Re: Running Dionysus not on command line

Dmitriy Morozov

I don't know what Sublime is, but this sounds like a question about Python. You can use Dionysus in whatever way you use Python.

On Wed, Jan 9, 2019 at 7:35 AM <le24p@...> wrote:
I installed Dionysus, and I wonder can we only run the program in terminal? Or is there anyway to run program in app like Sublime, etc.?
Thank you!

Re: Running Dionysus not on command line

le24p@...

Sublime is a text editor for code, and I can run the Python program here instead of running the Python program in the terminal. However, when I run it here (in sublime), and try to import Dionysus, I get the error:

No Dionysus module is found

However, I didn't have this problem when running the same python program on terminal. Is there anyway I could fix this or any other specific text editor for code that I should use?

Re: Running Dionysus not on command line

Dmitriy Morozov

This sounds like a question about Sublime, or Python more broadly, not about dionysus. So I'm not sure how I can help. The only thing I suggest to double-check is that you are writing "import dionysus", not "import Dionysus". The name is case-sensitive.

On Fri, Jan 11, 2019 at 2:22 PM <le24p@...> wrote:
Sublime is a text editor for code, and I can run the Python program here instead of running the Python program in the terminal. However, when I run it here (in sublime), and try to import Dionysus, I get the error:

No Dionysus module is found

However, I didn't have this problem when running the same python program on terminal. Is there anyway I could fix this or any other specific text editor for code that I should use?

Persistence Diagram of an image

Hajar Bouazzaoui

I am trying to get the persistence diagram of an image by building lower star filtrations on the Freudenthal triangulation of a grayscale image (which is basically a numpy array) using the following code

import PIL
im = np.asarray(PIL.Image.open('im1.jpg'))
image1_grey = np.asarray(PIL.Image.fromarray(im).convert('L'))
f_lower_star = d.fill_freudenthal(image1_grey)
(At this stage I'm getting Unknown array dtype
p = d.homology_persistence(f_lower_star)
dgms = d.init_diagrams(p, f_lower_star)
d.plot.plot_diagram(dgms[0])

I'm not even sure I'm following the right approach to get the persistence diagram

Re: Persistence Diagram of an image

Dmitriy Morozov

Can you try the following?

image1_grey = np.asarray(PIL.Image.fromarray(im).convert('L'), dtype='f4')

(Note the extra dtype argument.)

On Fri, Jan 25, 2019 at 6:06 AM Hajar Bouazzaoui <contact.bouazzaoui@...> wrote:
I am trying to get the persistence diagram of an image by building lower star filtrations on the Freudenthal triangulation of a grayscale image (which is basically a numpy array) using the following code

import PIL
im = np.asarray(PIL.Image.open('im1.jpg'))
image1_grey = np.asarray(PIL.Image.fromarray(im).convert('L'))
f_lower_star = d.fill_freudenthal(image1_grey)
(At this stage I'm getting Unknown array dtype
p = d.homology_persistence(f_lower_star)
dgms = d.init_diagrams(p, f_lower_star)
d.plot.plot_diagram(dgms[0])

I'm not even sure I'm following the right approach to get the persistence diagram

Re: Persistence Diagram of an image

Hajar Bouazzaoui

Thank you so much! it worked!

Dionysus 2 functions

le24p@...

Are the functions such as Pairwisedistances, Rips, etc. from Dionysus 1 available in Dionysus 2, or should I also implement Dionysus 1?
Thank you!

Re: Dionysus 2 functions

Kowshik Thopalli

Hi,
Rips is certainly there in Dionysus v2
check this tutorial below. You can also see that the tutorial uses scipy pairwise distance matrix which is good enough.

On Tue, Jan 29, 2019 at 4:09 PM <le24p@...> wrote:
Are the functions such as Pairwisedistances, Rips, etc. from Dionysus 1 available in Dionysus 2, or should I also implement Dionysus 1?
Thank you!

Re: Dionysus 2 functions

le24p@...

Do you know if function such as PairwiseDistances, ExplicitDistances, points_file, etc. such as the ones in this example can still be used in Dionysus 2?
http://mrzv.org/software/dionysus/examples/rips.html

filtration from a direction

indragt@...

Hi, is it possible in dionysus to get filtration of a rips complex from any given direction?

Re: filtration from a direction

Dmitriy Morozov

I don't understand the question.

On Thu, Feb 7, 2019 at 6:03 AM <indragt@...> wrote:
Hi, is it possible in dionysus to get filtration of a rips complex from any given direction?

Re: filtration from a direction

indragt@...

Hi Dmitriy, sorry that I was not clear. I have a 3D pointcloud and a rips complex on that. I want to pick a point outside the cloud and a direction towards the cloud and make a filtration of the complex  such that each subcomplex in that filtration is the collection of simplices that are below a particular distance from that chosen point. Is it clear ?