Skip to content
16 changes: 12 additions & 4 deletions src/lightcurve.f90
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ subroutine get_lightcurve(ncolumns,dat,npartoftype,masstype,itype,ndim,ntypes,&
real, dimension(:), allocatable :: freq,spectrum,bb_spectrum
real, dimension(:,:), allocatable :: img,taupix,flux_nu,v_on_c,badpix
real, dimension(:,:,:), allocatable :: img_nu,img_tmp
real :: zobs,dzobs,dx,dy,area,freqmin,freqmax,lam_max,freq_max,bb_scale,opacity_factor,f_col
real :: zobs,dzobs,dx,dy,area,freqmin,freqmax,lam_max,freq_max,bb_scale,opacity_factor,f_col,o_col
real :: betaz,lorentz,doppler_factor,doppler_factor_max,tempi,badarea
real :: rstar,lstar
logical :: relativistic,nofits
Expand Down Expand Up @@ -127,8 +127,16 @@ subroutine get_lightcurve(ncolumns,dat,npartoftype,masstype,itype,ndim,ntypes,&
if (f_col < 0.0) f_col = renvironment('f_col', 1.0)
print "(/,a,f5.2,/,a,/)",' SPECTRAL HARDENING FACTOR f_col = ',f_col, &
' (use --fcol=1.7 for radiation-pressure dominated flows; Shimura & Takahara 1995)'
o_col = renvironment('o_col')
Comment thread
s-neilson marked this conversation as resolved.
Outdated
print "(a,f8.2)"," Temperature offset: ",o_col

!If the user does not provide a limit for the render region it is calculated automatically.
xmin(1:ndim) = lim(ix(1:ndim),1)
xmax(1:ndim) = lim(ix(1:ndim),2)
xmax(1:ndim) = lim(ix(1:ndim),2)
xmin(1) = renvironment('SPLASH_MARGIN_XMIN', xmin(1))
xmax(1) = renvironment('SPLASH_MARGIN_XMAX', xmax(1))
xmin(2) = renvironment('SPLASH_MARGIN_YMIN', xmin(2))
xmax(2) = renvironment('SPLASH_MARGIN_YMAX', xmax(2))
Comment thread
s-neilson marked this conversation as resolved.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
!
!--set number of particles to use in the interpolation routines
! and allocate memory for weights
Expand Down Expand Up @@ -214,7 +222,7 @@ subroutine get_lightcurve(ncolumns,dat,npartoftype,masstype,itype,ndim,ntypes,&
doppler_factor_max = 0.
!$omp parallel do default(none) &
!$omp shared(n,nfreq,freq,flux,flux_nu,dat,h,weight,radkernel) &
!$omp shared(opacity,relativistic,v_on_c,itemp,f_col) &
!$omp shared(opacity,relativistic,v_on_c,itemp,f_col,o_col) &
!$omp private(i,betaz,lorentz,tempi,rstar,lstar) &
Comment thread
s-neilson marked this conversation as resolved.
!$omp firstprivate(opacity_factor,doppler_factor) &
!$omp reduction(max:doppler_factor_max)
Expand All @@ -239,7 +247,7 @@ subroutine get_lightcurve(ncolumns,dat,npartoftype,masstype,itype,ndim,ntypes,&
lstar = 4.*pi*rstar**2*steboltz*tempi**4
print "(a,2(es10.3,a),/)",' Luminosity of sink = ',lstar,' erg/s = ',lstar/Lsun,' L_sun'
else
tempi = dat(i,itemp)*f_col
tempi = (dat(i,itemp)*f_col)+o_col
Comment thread
s-neilson marked this conversation as resolved.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
endif
!call get_opacity_nongrey(nfreq,freq,dat(i,temp),dat(i,rho),opacity_nu(:,i))
flux_nu(:,i) = B_nu(tempi,freq*doppler_factor)
Expand Down
Loading