GNU Astronomy Utilities


Next: , Previous: , Up: Arithmetic operators   [Contents][Index]


6.2.2.15 Building new dataset

With the operator here, you can create a new dataset from scratch to start certain operations without any input data.

makenew

Create a new dataset that only has zero values. The number of dimensions is read as the first popped operand and the number of elements along each dimension are the next popped operand (in reverse of the popping order). The type of the new dataset is an unsigned 8-bit integer and all pixel values have a value of zero. For example, if you want to create a new 100 by 200 pixel image, you can run this command:

$ astarithmetic 100 200 2 makenew

To further extend the example, you can use any of the noise-making operators to add noise to this new dataset (see Adding noise operators), like the command below:

$ astarithmetic 100 200 2 makenew 5 mknoise-sigma