Using the SPOT equation ρ = π L/[E cos (θs) d-²] to calculate TOA reflectance from Radiance.
L was calculated using this equation [L = (X/A) + B]
d was calculated by converting date to julian day then converting to d using http://landsathandbook.gsfc.nasa.gov/pdfs/Landsat_Calibration_Summary_RSE.pdf
Esun was calculated using http://www2.astrium-geo.com/files/pmedia/public/r452_9_normalsolarirradiance.pdf
To calculate cos (θs), taking the sun elevation from 90 and then converting to radians http://www.mathinary.com/degrees_radians.jsp and then getting the cos of the answer
Example of above equation filled in for a Spot2 image p= (3.14*radian band1)/(1865*(0.98717*0.98717)*cos(70))
This equation works in Erdas Model maker however the resulting image is blank.
I need to know where I'm going wrong using the equation in Erdas