omega_constraint

View page source

Set Omega Constraints in a Fit Node Database

Prototype

# at_cascade.omega_constraint
def omega_constraint(
    all_node_database ,
    fit_database ,
) :
    assert type(all_node_database) == str
    assert type(fit_database) == str

all_node_database

is a python string containing the name of the all_node_db.

Use

This routine builds the omega constraints using the omega data in the all_node_database . If a node does not have omega data, the data for the closest ancestor is used. If a node does not have an ancestor with omega data, zero is used for the omega constraint for that node.

fit_database

is a python string containing the name of a fit_database.

parent_node

We use parent_node to refer to the parent node in the dismod_at option table in the fit_database; i.e., the fit_node .

rate_table

On input, the parent and child smoothing for omega must be null. On return, they will be set to smoothings that yield the omega constraints.

smooth Table

Extra rows for the omega constraints will be added at the end of the smooth table so that existing smoothings are preserved.

smooth_grid Table

Extra rows for the omega constraints will be added at the end of the smooth_grid table so existing smoothings are preserved.

nslist Table

On input, this table must be empty. Upon return, it will contain entries that implement the omega constraints for the children of the parent_node.

nslist_pair Table

On input, this table must be empty. Upon return, it will contain entries that implement the omega constraints for the children of the parent_node.

Other Tables

None of the other tables in the database are modified.