;---------------------------------------------------------------------- ; Load calibration info. -tab 14may2013 ; */ function nsxng_load_ncp,verb=verb ; common nsx c = nsxng_constants() nsxdir = c.nsxdir ; Load polynomials into structure. ; These polynomials determine the edges of the slit for each order. if size(nsxdir,/tname) ne 'STRING' then return, 0 wrd = string(format='(A,"cal/nsx_edge.dat")',nsxdir) if keyword_set(VERB) then print, format='("Read ",A,".")',wrd if not isfile(wrd) then begin return, 0 endif readcol, wrd, nsos, xoffs, coef0s, coef1s, coef2s, coef3s, for='I,D,D,D,D,D', /sil NCP = replicate(nsxng_NCPtype(),9) ii = 0L for nso=3, 7 do begin NCP[nso].porda = 3 NCP[nso].xoffa = xoffs[ii] NCP[nso].coefa[0]=coef0s[ii] NCP[nso].coefa[1]=coef1s[ii] NCP[nso].coefa[2]=coef2s[ii] NCP[nso].coefa[3]=coef3s[ii] ii++ NCP[nso].pordb = 3 NCP[nso].xoffb = xoffs[ii] NCP[nso].coefb[0]=coef0s[ii] NCP[nso].coefb[1]=coef1s[ii] NCP[nso].coefb[2]=coef2s[ii] NCP[nso].coefb[3]=coef3s[ii] ii++ endfor return, ncp end pro nsxng_load_ncp_test ncp = nsxng_load_ncp() help, ncp help, ncp[3], /str end