pro abs2loc, abs_col, abs_row, $ cols_per_tile=cols_per_tile, $ rows_per_tile=rows_per_tile, $ v_offset=v_offset, $ h, v, loc_col, loc_row if n_elements(cols_per_tile) eq 0 then $ cols_per_tile = 951 if n_elements(rows_per_tile) eq 0 then $ rows_per_tile = 951 if n_elements(v_offset) eq 0 then $ v_offset = 0 h = fix(abs_col / cols_per_tile) v = fix(abs_row / rows_per_tile) + v_offset loc_col = abs_col mod cols_per_tile loc_row = abs_row mod rows_per_tile print, 'abs2loc:' print, ' abs_col: ', abs_col print, ' abs_row: ', abs_row print print, ' cols_per_tile:', cols_per_tile print, ' rows_per_tile:', rows_per_tile print, ' v_offset: ', v_offset print print, ' h: ', h print, ' v: ', v print, ' loc_col: ', loc_col print, ' loc_row: ', loc_row end