-
Notifications
You must be signed in to change notification settings - Fork 16
Description
There are some places where certain operations are applied if the noise type is rms and then does another operation otherwise, or just doesn't do it at all.
Two examples I found so far are in the subroutine compute_chisq (line 76):
if (trim(data(i)%N%type) == "rms" .and. data(i)%N%nside_chisq_lowres < res%info%nside .and. present(chisq_fullsky) .and. present(lowres_eval)) then
if (lowres_eval) then
lowres = .true.
info_lowres => comm_mapinfo(data(i)%info%comm, data(i)%N%nside_chisq_lowres, 0, data(i)%info%nmaps, data(i)%info%nmaps==3)
res_lowres => comm_map(info_lowres)
res_lowres_temp => comm_map(info_lowres)
call res%udgrade(res_lowres)
res_lowres_temp%map = res_lowres%map ! Save temporarily
call data(i)%N%invN_lowres(res_lowres) ! invN*res
res_lowres%map = res_lowres_temp%map*res_lowres%map ! res*(invN*res)
call res_lowres_temp%dealloc(); deallocate(res_lowres_temp)
end if
else
lowres=.false.
call data(i)%N%sqrtInvN(res)
res%map = res%map**2 !(sqrtInvN*res)**2 = res*invN*res
end if
It's not clear to me if things like lcut and the in-development rms_qucov should be skipped, or if the else construct is meant to only catch the pixel-pixel qucov noise format.
Another example is in comm_signal_mod.f90, line 447. I've recently added a default class that gives a warning, like this:
select type (N)
class is (comm_N_rms)
if (trim(data(i)%tod%init_from_HDF) == 'default' .or. present(init_from_output)) then
call data(i)%tod%initHDF(file, initsamp, data(i)%map, rms)
else
call get_chainfile_and_samp(data(i)%tod%init_from_HDF, &
& chainfile, initsamp2)
call open_hdf_file(chainfile, file2, 'r')
call data(i)%tod%initHDF(file2, initsamp2, data(i)%map, rms)
call close_hdf_file(file2)
end if
class default
write(*,*) 'Noise type is not covered'
end select
just so that people know that the tod parameters aren't being read in.
In any case, this has had the effect of things that shouldn't have had anything to do with the noise format being affected when the noise format is changed. There's probably some other subtle things elsewhere.