imas_muscle3.data_sink_source

Muscled data sink and/or source actor.

  • Assumes that the port names for the conduits going out and in have

    the format *ids_name*_in and *ids_name*_out, will fail otherwise.

  • Set sink_uri and/or source_uri in the settings to determine which DBEntry

    is used as data sink and/or source.

  • You can set the occurrence number per port with the optional setting

    *ids_name*_out_occ

  • For now the only available ports for the components are:

    source: O_I sink: F_INIT sink_source: F_INIT, O_F

  • Available settings are

    sink_uri: which db entry uri the data should be saved to source_uri: which db entry uri the data should be loaded from t_min: left boundary of loaded time range t_max: right boundary of loaded time range interpolation_method: which imas interpolation method to use for load, defaults to CLOSEST_INTERP dd_version: which IMAS DD version should be used {port_name}_occ: occurrence number for loading and saving of given ids

How to use in ymmsl file:

model:
    name: example_model
    components:
        macro:
            implementation: source_component
            ports:
            o_i: [core_profiles_out]
        micro:
            implementation: sink_component
            ports:
            f_init: [core_profiles_in]
    conduits:
        macro.core_profiles_out: micro.core_profiles_in
settings:
    macro.source_uri: source_uri
    micro.sink_uri: sink_uri
implementations:
    sink_component:
        executable: python
        args: -u -m pds.utils.sink_component
    source_component:
        executable: python
        args: -u -m pds.utils.source_component

Functions

fix_interpolation_method(instance)

handle_sink(instance, db_entry, port_list)

Loop through sink ids_names and receive all incoming messages

handle_source(instance, db_entry, port_list, ...)

Loop through source ids_names and send all outgoing messages

muscled_sink()

Implementation of sink component

muscled_sink_source()

Implementation of hybrid sink source component

muscled_source()

Implementation of source component

sanity_check_ports(instance)

Check whether any obvious problems are present in the instance config

time_array_from_IDS(db_entry, port_list, ...)


Last update: 2025-12-11