The Section class

A Section represents a local section, which is an instance of data stored in a sheaf. A Section is constructed with a Sheaf instance in mind, and therefore contains indices that refer into the Sheaf.cells list. A given Sheaf might have several Section instances.

class Section
sectionCells

The list of SectionCell instances corresponding to this local section. Although mathematically local sections are not multi-valued, it is possible that duplicates are present as there are no checks for this.

support()

List the Sheaf.cells indices in the support of this Section

extend(sheaf, cell, value=None, tol=1e-5)

Extend this Section to another cell whose index is cell in the Sheaf.cells list of the sheaf and returns True if this can be done consistently according to the tolerance tol. You can optionally specify a value from the stalk over that cell; in this case the method can be used to test if this is a consistent choice or not.

class SectionCell

A single value from the stalk over a given cell, consisting of the

value

itself, which ought to be of the appropriate type (can be passed to the functions SheafCell.metric and/or SheafCoface.restriction). One also needs to specify

support

which records the Sheaf.cells index of the cell whose stalk from which this value was taken.

Data fusion with Section and Sheaf instances

Given some data in a Section for a Sheaf you can measure the overall consistency radius with

Sheaf.consistencyRadius(assignment, tol=1e-5)

where assignment is the Section to be tested. The optional tol specifies the tolerance for consistency, to be used in conjunction with each SheafCell.metric in the Sheaf.

Similarly, if you want the nearest global section to your data, you can call

Sheaf.fuseAssignment(assignment, tol=1e-5)

which returns a new Section instance that is the global section nearest to your assignment. In this case, the tolerance tol is passed to scipy.optimize.minimize().