create_product_map: Create a product mapping

View source: R/map_product.R

create_product_mapR Documentation

Create a product mapping

Description

Create a mapping that is formed by combining two mappings so that the output of the combined mapping is the product of the outputs of the individual mappings. For example, a product mapping can be used to define relative normalization errors.

Usage

create_product_map()

Details

The following fields are required in the parameter list to initialize the mapping:

mapname Name of the mapping
maptype Must be "product_map"
maps A list containing the parameter specifications of the individual mappings.

Value

Returns a list of functions to operate with the mapping, see create_maptype_map.

See Also

Other mappings: create_compound_map(), create_convolution_with_xtrafo_map(), create_derivative2nd_map(), create_derivative_map(), create_linearinterpol_map(), create_linearinterpol_with_xtrafo_map(), create_linearmap_map(), create_maptype_map(), create_map(), create_nonlinear_map(), create_normerr_map()

Examples

params1 <- list(
  mapname = "mymap1",
  maptype = "linearinterpol_map",
  src_idx = 1:3,
  tar_idx = 4:6,
  src_x = c(1,5,10),
  tar_x = c(4,5,6)
)
params2 <- list(
  mapname = "mymap1",
  maptype = "linearinterpol_map",
  src_idx = 7:9,
  tar_idx = 4:6,
  src_x = c(1,5,10),
  tar_x = c(4,5,6)
)
product_params <- list(
  mapname = "myprodmap",
  maptype = "product_map",
  maps = list(params1, params2)
)
mymap <- create_product_map()
mymap$setup(product_params)
x <- c(1,2,3,0,0,0,6,7,8)
mymap$propagate(x)
mymap$jacobian(x)


gschnabel/nucdataBaynet documentation built on Feb. 3, 2023, 4:13 a.m.