#### Description:

This function creates a new TranMap and optionally initialises its attributes.

A TranMap is a Mapping which combines the forward transformation of a supplied Mapping with the inverse transformation of another supplied Mapping, ignoring the un-used transformation in each Mapping (indeed the un-used transformation need not exist).

When the forward transformation of the TranMap is referred to, the transformation actually used is the forward transformation of the first Mapping supplied when the TranMap was constructed. Likewise, when the inverse transformation of the TranMap is referred to, the transformation actually used is the inverse transformation of the second Mapping supplied when the TranMap was constructed.

#### Synopsis

AstTranMap ∗astTranMap( AstMapping ∗map1, AstMapping ∗map2, const char ∗options, ... )

#### Parameters:

##### map1

Pointer to the first component Mapping, which defines the forward transformation.

##### map2

Pointer to the second component Mapping, which defines the inverse transformation.

##### options

Pointer to a null-terminated string containing an optional comma-separated list of attribute assignments to be used for initialising the new TranMap. The syntax used is identical to that for the astSet function and may include `"` printf`"` format specifiers identified by `"` %`"` symbols in the normal way.

##### ...

If the `"` options`"` string contains `"` %`"` format specifiers, then an optional list of additional arguments may follow it in order to supply values to be substituted for these specifiers. The rules for supplying these are identical to those for the astSet function (and for the C `"` printf`"` function).

#### Returned Value

##### astTranMap()

A pointer to the new TranMap.

#### Notes:

- The number of output coordinates generated by the two Mappings (their Nout attribute) must be equal, as must the number of input coordinates accepted by each Mapping (their Nin attribute).

- The forward transformation of the first Mapping must exist.

- The inverse transformation of the second Mapping must exist.

- Note that the component Mappings supplied are not copied by astTranMap (the new TranMap simply retains a reference to them). They may continue to be used for other purposes, but should not be deleted. If a TranMap containing a copy of its component Mappings is required, then a copy of the TranMap should be made using astCopy.

- A null Object pointer (AST__NULL) will be returned if this function is invoked with the AST error status set, or if it should fail for any reason.

#### Status Handling

The protected interface to this function includes an extra parameter at the end of the parameter list descirbed above. This parameter is a pointer to the integer inherited status variable: `"` int ∗status`"` .
Copyright (C) 2021 East Asian Observatory