Search in sources :

Example 1 with TwoAxisLissajousModel

use of org.eclipse.scanning.api.points.models.TwoAxisLissajousModel in project gda-core by openGDA.

the class ScanpathTest method createModelsCorrectModelForLissajous.

@Test
public void createModelsCorrectModelForLissajous() throws Exception {
    pathParams = Arrays.asList(5, 6.0, 7.0);
    IScanPathModel model = LISSAJOUS.createModel(scannables, pathParams, bboxParams, mutators);
    assertThat(model, is(instanceOf(TwoAxisLissajousModel.class)));
    TwoAxisLissajousModel lModel = (TwoAxisLissajousModel) model;
    assertThat(lModel.getScannableNames(), contains("name1", "name2"));
    assertThat(lModel.getBoundingBox().getxAxisStart(), is(1.0));
    assertThat(lModel.getBoundingBox().getyAxisStart(), is(2.0));
    assertThat(lModel.getBoundingBox().getxAxisLength(), is(3.0));
    assertThat(lModel.getBoundingBox().getyAxisLength(), is(4.0));
    assertThat(lModel.getPoints(), is(5));
    assertThat(lModel.getA(), is(6.0));
    assertThat(lModel.getB(), is(7.0));
    assertThat(lModel.getBoundingBox().getyAxisStart(), is(2.0));
    assertThat(lModel.isContinuous(), is(false));
}
Also used : TwoAxisLissajousModel(org.eclipse.scanning.api.points.models.TwoAxisLissajousModel) IScanPathModel(org.eclipse.scanning.api.points.models.IScanPathModel) Test(org.junit.Test)

Aggregations

IScanPathModel (org.eclipse.scanning.api.points.models.IScanPathModel)1 TwoAxisLissajousModel (org.eclipse.scanning.api.points.models.TwoAxisLissajousModel)1 Test (org.junit.Test)1