Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

visualize Hilbert functions from precomputed RIVET data? #1

Open
delooper opened this issue Oct 9, 2018 · 3 comments
Open

visualize Hilbert functions from precomputed RIVET data? #1

delooper opened this issue Oct 9, 2018 · 3 comments

Comments

@delooper
Copy link

delooper commented Oct 9, 2018

Apologies for this simple query. I'm wondering if rivet-python has a way to take pre-computed RIVET data (i.e. the output file of rivet_console) and plot the Hilbert functions?

I see in the API demo examples where the rivet.betti_file command is used on metric space data (standard rivet_console input). This outputs a rivet.MultiBetti object, and this has a graded_rank call for the Hilbert function, that can be plotted.

What I don't see is how to recover the MultiBetti object from precomputed RIVET data.

I suppose I could recompute like in the API demo, but several of my computations took 12+ hours, and I'd like to save some time.

If I'm reading the code for betti_file correctly, it looks like I need to take the screen output from rivet_console (i.e. not the file output) and parse that with _parse_betti. Here is the primary part of betti_file:

_parse_betti(subprocess.check_output(shlex.split(cmd)).split(b'\n'))

I don't know the check_output command in subprocess well, but from what I can see it is essentially returning the screen output from the call to rivet_console.

Is there not an easy way to recover this information from the text file output of rivet_console?

@delooper
Copy link
Author

delooper commented Oct 9, 2018

Now I'm confused. I've tried running rivet_console in the manner of the betti_file procedure, but rivet_console outputs nothing to screen.

Oh, I missed one detail. rivet_console is called with the argument "--betti" in the betti_file call. And you can't give it an output file when you use the "--betti" option.

@xoltar
Copy link
Contributor

xoltar commented Oct 9, 2018 via email

@delooper
Copy link
Author

delooper commented Oct 9, 2018

Thanks. Okay, this is helpful. I'm noticing the relative speed of calling rivet_console with the --betti option now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants