Skip to content

visualize Hilbert functions from precomputed RIVET data? #1

@delooper

Description

@delooper

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions