I'm completely new to coding and have almost no idea what I'm doing. Currently I'm trying to find the radius of each pixel from the center of a galaxy in a fits file. I was told to try this by creating a blank array the same size as the fits file and I'm trying to use a for loop for each x value and another for each y. So far, I have the array and have attempted to create the for loops.
xcenter =249.8
ycenter =250.0
d=fltarr(500,500)
for i=0,499 do begin
d=d(i-xcenter,*)
endfor
for j=0,499 do begin
d=d(j-ycenter,*)
endfor
I know this look awful and I obviously have no idea what I'm doing. So if anyone can offer any help at all I'd be grateful.