----------------------------------------------------- lines 6-148 of file: at_cascade/create_all_node_db.py ----------------------------------------------------- {xrst_begin create_all_node_db} Create an All Node Database ########################### Prototype ********* {xrst_literal # BEGIN_DEF # END_DEF } all_node_database ***************** is a python string containing the name of the :ref:`all_node_db-name` that is created by this call. This argument can't be ``None``. option_all ********** This argument can't be ``None``. It is a ``dict`` with a key equal to each :ref:`option_all_table@Table Format@option_name` that appears in the option_all table. The value corresponding to the key is the :ref:`option_all_table@Table Format@option_value` in the same row of the option_all_table. Note that keys must have type ``str`` and all the values will be converted to ``str``. fit_goal_table ************** This specifies the nodes in the :ref:`fit_goal_table-name`. It must be a ``list`` of ``dict`` representation of the :ref:`fit_goal_table-name` with one key for each ``dict``. If the key is node_id (node_name) the corresponding value is the ``int`` ( ``str`` ) representation of the node. If this argument is ``None``, the fit_goal table is empty. split_reference_table ********************* This specifies the possible reference values for the splitting covariate. It must be a ``list`` of ``dict`` representation of the :ref:`split_reference_table-name`. If this argument is ``None``, the split_reference table is empty. node_split_table **************** This specifies the nodes at which the cascade will split by the value of the splitting covariate. It must be a ``list`` of ``dict`` representation of the :ref:`node_split_table-name` with one key for each ``dict``. If the key is node_id (node_name) the corresponding value is the ``int`` ( ``str`` ) representation of the node. If this argument is ``None``, the node_split table is empty. mulcov_freeze_table ******************* This specifies the jobs at which the cascade will freeze specific covariate multipliers. If this argument is ``None``, the node_split table is empty. Otherwise, it must be a ``list`` of ``dict`` representation of the :ref:`mulcov_freeze_table-name` . We use *row* below to refer to a ``dict`` that is an entry in this ``list`` . fit_node_id, fit_node_name ========================== #. If *row*\ ``["fit_node_id"]`` must be ``None`` if and only if the :ref:`split_reference_table-name` is empty. #. Otherwise if *row*\ ``["fit_node_id"]`` exists it must be an ``int`` representation of the fit_node_id for this job. #. Otherwise *row*\ ``["fit_node_name"]`` is a ``str`` representation of the corresponding node name. split_reference_id ================== The value *row*\ ``["split_reference_id"]`` is an ``int`` representation of the split_reference_id for this job or *row*\ ``["split_reference_name"]`` is a ``str`` representation of the corresponding split reference name. mulcov_id ========= The value *row*\ ``["mulcov_id"]`` is an ``int`` representation of the mulcov_id for the covariate multiplier that is frozen. omega_grid ********** is a dictionary with two keys ``age`` and ``time``. If this argument is ``None``, the :ref:`omega_grid@omega_age_grid Table` and the :ref:`omega_grid@omega_time_grid Table` are empty. age === The value *omega_grid*\ [``age``] is a list containing the age_id values for the omega_grid. These are indices in the :ref:`glossary@root_database` age table. We use the notation *n_omega_age* for the length of the age list. time ==== The value *omega_grid*\ [``time``] is a list containing the time_id values for the omega_grid. These are indices in the *root_database* time table. We use the notation *n_omega_time* for the length of the time list. omega_data ********** This is a python dictionary with a key for each node name for the :ref:`glossary@root_node` and its descendant. The value *omega_data[node_name]* is a list. For each *k*, *omega_data[node_name][k]* is a list. For *i* equal 0, ..., *n_omega_age*-1 and *j* equal 0, ..., *n_omega_time*-1, | |tab| *omega_data[node_name][k][ i * n_omega_time + j ]* is the value of *omega* at the specified node, the age corresponding to index *i* in *omega_grid*\ [``age``], and time corresponding to index *j* in *omega_grid*\ [``time``]. If split_reference table is empty, *k* is zero. Otherwise, let *n_split* be the length of the split_reference table. For *k* equal 0, ... , *n_split*-1, it specifies the value of :ref:`split_reference_table@split_reference_id` for the covariate value. default ======= The *omega_data* argument is ``None`` if and only if *omega_grid* is ``None``. If *omega_data* is ``None`` the :ref:`omega_all@omega_all Table` and :ref:`omega_all@omega_index Table` will be empty. cov_reference_table ******************* This must be ``None`` or a ``list`` of ``dict`` representation of the :ref:`cov_reference_table-name`. If it `None``, the :ref:`com_cov_reference-name` routine is used to create the cov_reference table. {xrst_end create_all_node_db}