Working with arrays
You can extract a part of an array, let say the 4th to the 7th elements of vec1 (the arrays begin with the index = 0):
The version 5.0 of IDL recommends to use [ ] instead of ( ) for the arrays.
You can also extract part of an image. The * (star) symbol means all the (remaining) elements in the considered dimension.
sub_image = image1[101:400,101:400]
Tip: The spectr here is a 2D array, with only 1 column. If you want to have a 1D vector, you have to reform it:
spectr = reform(spectr)
This is not the case for the row vectors, compare:
IDL courses C. Morisset © 2004 IA/UNAM V 2.2