Skip to content

Commit

Permalink
Rearranged directories in data a small amount
Browse files Browse the repository at this point in the history
  • Loading branch information
wandell committed Jun 17, 2023
1 parent 669e399 commit 7b0293a
Show file tree
Hide file tree
Showing 22 changed files with 30 additions and 700 deletions.
28 changes: 18 additions & 10 deletions color/Quanta2Energy.m
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
function energy = Quanta2Energy(wavelength, photons)
%Convert quanta (photons) to energy (watts)
%
% Synopsis
% energy = Quanta2Energy(WAVELENGTH,PHOTONS)
%
% Convert PHOTONS represented at the sampled WAVELENGTH positions to
% energy (watts or joules).
% Brief description
%
% WAVELENGTH is a column vector describing the wavelength samples [nm]
% PHOTONS can be a matrix in either RGB or XW (space-wavelength) format.
% In the XW format each spatial position is in a row and the wavelength
% varies across columsn. The output, ENERGY, [watts or Joules] is
% returned in same format as input (RGB or XW).
% Convert PHOTONS represented at the sampled WAVELENGTH positions to
% energy (watts or joules).
%
% WAVELENGTH is a vector describing the wavelength samples [nm]
% PHOTONS can be a matrix in either RGB or XW (space-wavelength)
% format.
%
% In the XW format each spatial position is in a row and the
% wavelength varies across columsn. The output, ENERGY, [watts or
% Joules] is returned in same format as input (RGB or XW).
%
% CAUTION: The input form differs from the Energy2Quanta() call, which has
% the energy spectra in the columns.
Expand Down Expand Up @@ -58,13 +63,16 @@
case 'XW'
% If photons is a vector, it must be a row
if isvector(photons), photons = photons(:)'; end
if size(photons, 2) ~= length(wavelength)
error('Quanta2Energy: quanta must have length of nWave');
if size(photons, 2) ~= numel(wavelength)
error('Photons (Quanta) must be in XW format.');
end
energy = (h*c/1e-9) * bsxfun(@rdivide, photons, wavelength);

energy = (h*c/1e-9) * bsxfun(@rdivide, photons, wavelength);

otherwise
error('Unknown image format');

end


end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion displays/displayPlot.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
plot(wave,spd(:,ii),cOrder{ii},'LineWidth',2);
end

xlabel('Wavelength (nm)');ylabel('Energy (watts/sr/m2/nm)');
xlabel('Wavelength (nm)');ylabel('Energy (watts/sr/m^2/nm)');
grid on; uData.wave = wave; uData.spd = spd;
set(g,'userdata',uData);

Expand Down
7 changes: 0 additions & 7 deletions rdt/rdt-config-isetbio.json

This file was deleted.

7 changes: 0 additions & 7 deletions rdt/rdt-config-scien.json

This file was deleted.

89 changes: 0 additions & 89 deletions rdt/rdtDownload.m

This file was deleted.

100 changes: 0 additions & 100 deletions rdt/rdtOILoad.m

This file was deleted.

121 changes: 0 additions & 121 deletions rdt/rdtScenesLoad.m

This file was deleted.

Loading

0 comments on commit 7b0293a

Please sign in to comment.