SourceXtractorPlusPlus  0.15
Please provide a description of the project.
Modeling Configuration

Example 1

A modeling operation is requested by using the "modeling" keyword. Each use of the modeling keyword correspond to a single minimization.

Free parameters are specified by the user and can be used as parameters for the model components.

Model components are used with some of the images (as specified by the apply-to keyword). Model components that apply to the same images are added together to form the whole model.

measurements-group:
image-files:
path: foo/bar/sim01/sim01_(*)_*.fits
keyword-wildcard: "BAND"
subgroup:
selection: "BAND == 'g'"
name: "g"
subgroup:
selection: "BAND == 'r'"
name: "r"
measurement:
multi-aperture-photometry:
size: 5
modeling:
parameters:
- alpha
- delta
- fluxG
- fluxR
model-components:
- exponential:
parameters: [alpha, delta, fluxG]
apply-to: "g"
- exponential:
parameters: [alpha, delta, fluxR]
apply-to: "r"

Example 2

Example 2: A different modeling for every day (using in hierarchy syntax)

If we use "modeling" in the multigroup, a different modeling operation will be triggered for each group created.

The "apply-to" keyword is used specify groups relatively to where the current modeling is happening in the hierarchy.

measurements-group:
image-files:
path: foo/bar/img_(*)_(*)_*.fits
keyword-wildcard: ["BAND", "DAY"]
multigroup:
group-by: "DAY"
subgroup:
selection: "BAND == 'g'"
name: "g"
subgroup:
selection: "BAND == 'r'"
name: "r"
modeling:
parameters:
- alpha
- delta
- fluxG
- fluxR
model-components:
- exponential:
parameters: [alpha, delta, fluxG]
apply-to: "g" # relative to the current position in hierarchy
- exponential:
parameters: [alpha, delta, fluxR]
apply-to: "r"

Example 3

A different modeling for every day (using outside hierarchy syntax)

An alternative syntax is to keep the modeling at the top level but use the "target" keyword to specify a path to the where the modeling should be applied.

measurements-group:
image-files:
path: foo/bar/img_(*)_(*)_*.fits
keyword-wildcard: ["BAND", "DAY"]
multigroup:
group-by: "DAY"
subgroup:
selection: "BAND == 'g'"
name: "g"
subgroup:
selection: "BAND == 'r'"
name: "r"
modeling:
target: "*" # all groups at the top level
parameters:
- alpha
- delta
- fluxG
- fluxR
model-components:
- exponential:
parameters: [alpha, delta, fluxG]
apply-to: "g" # relative to the group being processed
- exponential:
parameters: [alpha, delta, fluxR]
apply-to: "r"

Example 4

1 modeling at the top-level, define the groups directly inside modeling.

Another idea could be to not specify groups in advance but just to specify a condition in "apply-to". This is more compact in cases where the groups are not needed for anything else.

measurements-group:
image-files:
path: foo/bar/sim01/sim01_(*)_*.fits
keyword-wildcard: "BAND"
modeling:
parameters:
- alpha
- delta
- fluxG
- fluxR
model-components:
- exponential:
parameters: [alpha, delta, fluxG]
apply-to: "BAND == 'g'"
- exponential:
parameters: [alpha, delta, fluxR]
apply-to: "BAND == 'r'"

Example 5

Linear motion and time dependent parameters.

A possible example of a more complex modeling using dependent parameters. In this example we get the time when an image was taken from the FITS headers.

measurements-group:
image-files:
path: foo/bar/sim01/sim01_*.fits
modeling:
parameters:
- x0
- y0
- vx
- vy
- flux
dependent-parameters:
- "x = x0 + vx * fits_header(time)"
- "y = y0 + vy * fits_header(time)"
model-components:
- exponential:
parameters: [x, y, flux]
apply-to: "*"