Array Operations

You can operate on an AstroImage like any other Julia array.

using AstroImages

img = AstroImage(randn(10,10))
Example block output

Indexing

You can look up individual pixels (see Conventions)

img[1,1] # Bottom left
-0.46971643153971615
img[1:5,1:5]
Example block output

Broadcasting

AstroImages participate in broadcasting as expected:

@. img + img^2 + 2img^3
Example block output

You can update them in-place (if the underlying array you passed supports mutation)

img[1:5,:] .= 0
img
Example block output