= Phase = == Description == This is the process to generate phase for each LROC NAC image. This is a circuitous process that involves ISIS and SPC and ends with an ASCII image. == Procedure == === Overview === [[attachment:Phase.jpg|{{attachment:Phase.jpg||width=600}}]] === ISIS to Phase === [[attachment:ISIStoPhase.jpg|{{attachment:ISIStoPhase.jpg||width=600}}]] * More details can be found here [[ISIStoPhase]] === Convert to SPC === [[attachment:ConvertToSPC.jpg|{{attachment:ConvertToSPC.jpg||width=600}}]] * The Fortran code used (processLROjrw.f) can be found on [[Local Emission]] === Replace with correct SUMFILES === * Copy the SUMFILE from the topography SPC directory to the “working” directory in the Cube generation directory. Nothing crazy here, but you will need to change the filename from NXXXXX.SUM to NEXXXXX.SUM (for emission) or NPXXXXX.SUM (for phase). For I/F, you can leave the filename the same. * No need to change the contents of the SUMFILE, though if you want to keep the standard SUMFILE format, the first line (the SUMFILE name) should match the new filename. I don’t change the first line since it doesn’t affect the results. === Extract Pixels in ROI === [[attachment:MOSAICPhase.jpg|{{attachment:MOSAICPhase.jpg||width=600}}]] * The Fortran code used (rawMOSAICXjrw.f) can be found on [[Local Emission]] * A wrapper to run MOSAICX is here. ||[[MOSAICX Phase Wrapper]] || * Finally, sometimes the output from MOSAICX gives low DN for a string of pixels (zero + the offset). If this low value is not correct (i.e. it is not low in the output from ISIS to Emission) then the DN can be interpolated from the surrounding pixels. This is done via dumpMapLRO_fixErrors.f found on [[Local Emission]].