generate_6d_wigglelist

marxs.design.tolerancing.generate_6d_wigglelist(trans, rot, names=['dx', 'dy', 'dz', 'rx', 'ry', 'rz'])[source] [edit on github]

Generate a list of parameters for the wiggle functions in this module.

This modules contains several wiggle functions such as moveglobal or wiggle that expect input for 6 degrees of freedom, three translations and three rotations. Commonly, we want to study and dof at a time. This function helps with generating lists of dicts for that purpose.

Parameters:
transastropy.units.quantity.Quantity

Steps for translation. The first element should be 0.

rotastropy.units.quantity.Quantity

Steps for rotation. The first element should be 0.

Returns:
changegloballist of dicts

This list contains changes in positive and negative directions. Use this as input for e.g. moveglobal.

changeindividuallist of dicts

This list contains only one side, so use this as input for e.g. wiggle where the actual misalignment is drawn from a distribution.

Examples

In this example, we take small steps close to 0 and then increase the step size for larger distances, going up to a misalignment of 10 mm in linear translation and 2 degrees in rotation:

>>> import astropy.units as u
>>> from marxs.design.tolerancing import generate_6d_wigglelist
>>> trans = [0., .1, .2, .4, .7] * u.cm
>>> rot = [0., 2., 5., 10., 20] * u.arcmin
>>> lglob, lind = generate_6d_wigglelist(trans, rot)