Commits

Christopher De Vries  committed ae94505

Edits for first compile of hyperfinemap done.

  • Participants
  • Parent commits 8b8d003

Comments (0)

Files changed (3)

-bin_PROGRAMS = twolayer5_devo twolayer5_simplex twolayer5_hybrid hill5_devo hill5_simplex hill5_hybrid twolayer6_devo twolayer6_simplex twolayer6_hybrid hill6_devo hill6_simplex hill6_hybrid hill6core_devo hill6core_simplex hill6core_hybrid hill7_devo hill7_simplex hill7_hybrid hill5map hill5_plot hill5_multi_hybrid hill5map_slow
+bin_PROGRAMS = twolayer5_devo twolayer5_simplex twolayer5_hybrid hill5_devo hill5_simplex hill5_hybrid twolayer6_devo twolayer6_simplex twolayer6_hybrid hill6_devo hill6_simplex hill6_hybrid hill6core_devo hill6core_simplex hill6core_hybrid hill7_devo hill7_simplex hill7_hybrid hill5map hill5_plot hill5_multi_hybrid hill5map_slow hyperfinemap
 twolayer5_devo_SOURCES = twolayer5_devo.c twolayer5.c twolayer5.h devo2.h devo2.c grow_array.h grow_array.c read_data.c
 twolayer5_simplex_SOURCES = twolayer5_simplex.c twolayer5.c twolayer5.h grow_array.h grow_array.c read_data.c
 twolayer5_hybrid_SOURCES = twolayer5_hybrid.c twolayer5.c twolayer5.h devo2.h devo2.c grow_array.h grow_array.c read_data.c
 hill5_plot_SOURCES = hill5_plot.c hill5.c hill5.h grow_array.h grow_array.c read_data.c
 hill5_multi_hybrid_SOURCES = hill5_multi_hybrid.c hill5_multicomponent.c hill5_multicomponent.h devo2.h devo2.c grow_array.h grow_array.c read_data.c
 hill5map_slow_SOURCES = hill5map_slow.c hill5.c hill5.h devo2.h devo2.c grow_array.h grow_array.c read_data.c thinline.h thinline.c
-hyperfinemap = hyperfinemap.c hyperfine_model.c hyperfine_model.h devo2.h devo2.c grow_array.h drow_array.c
+hyperfinemap_SOURCES = hyperfinemap.c hyperfine_model.c hyperfine_model.h devo2.h devo2.c grow_array.h grow_array.c
 bin_SCRIPTS = noisescript.py noisescript2.py
 EXTRA_DIST = $(bin_SCRIPTS)

File hyperfine_model.c

   resrms=0.0;
   for(i=0;i<st->nchan;i++) {
     tauc=0.0;
-    for(j=0;j<n_components;j++) {
+    for(j=0;j<st->n_components;j++) {
 
-      tauc += tau*st->comp_relint_array[j]*exp(-pow((st->velocity_array[i]-v_lsr-comp_voff_array[j])/sigma,2.0)/2.0);
+      tauc += tau*st->comp_relint_array[j]*exp(-pow((st->velocity_array[i]-v_lsr-st->comp_voff_array[j])/sigma,2.0)/2.0);
     }
 
-    st->hyperfine_array[i]=(jfunc(tex,st->frequency)-jfunc(TBG,frequency))*(1.0-exp(-tauc));
+    st->hyperfine_array[i]=(jfunc(tex,st->frequency)-jfunc(TBG,st->frequency))*(1.0-exp(-tauc));
     resid=st->temperature_array[i]-st->hyperfine_array[i];
     if(st->velocity_array[i]>st->vrange[0] && st->velocity_array[i]<st->vrange[1]) {
       resrms+=resid*resid;
     return DBL_MAX;
   }
 
-  resrms = hyperfine_model(st,tau,v_lsr,v_in,sigma,tex);
+  resrms = hyperfine_model(st,tau,v_lsr,sigma,tex);
 
   return resrms;
 }

File hyperfinemap.c

   sprintf(tauoutname,"!%s-tau.fits",argv[13]);
   sprintf(vlsroutname,"!%s-vlsr.fits",argv[13]);
   sprintf(sigmaoutname,"!%s-sigma.fits",argv[13]);
-  sprintf(texoutname,"!%s-tpeak.fits",argv[13]);
+  sprintf(texoutname,"!%s-tex.fits",argv[13]);
   sprintf(chisqoutname,"!%s-chisq.fits",argv[13]);
 
   checkfits(fits_create_file(&fitsout,fitsoutname,&status));
   checkfits(fits_create_file(&tauout,tauoutname,&status));
   checkfits(fits_create_file(&vlsrout,vlsroutname,&status));
   checkfits(fits_create_file(&sigmaout,sigmaoutname,&status));
-  checkfits(fits_create_file(&texout,tpeakoutname,&status));
+  checkfits(fits_create_file(&texout,texoutname,&status));
   checkfits(fits_create_file(&chisqout,chisqoutname,&status));
 
   checkfits(fits_create_img(fitsout,FLOAT_IMG,3,naxes,&status));
 
   x_hyperfine = gsl_vector_alloc(4);
   step_size_hyperfine = gsl_vector_alloc(4);
-  minex_func_hyperfine.f=hillyperfine_gsl;
+  minex_func_hyperfine.f=hyperfine_gsl;
   minex_func_hyperfine.n=4;
   minex_func_hyperfine.params=NULL;
 
           }
         } while(status_thin==GSL_CONTINUE && k<40000);
 
-        hyperfine_init(&hyperfine_st,naxes[2],velocity_spectrum,input_spectrum,frequency,vmin,vmax,ncomponents,components_voffs,component_relints);
+        hyperfine_init(&hyperfine_st,naxes[2],velocity_spectrum,input_spectrum,frequency,vmin,vmax,ncomponents,component_voffs,component_relints);
         
-        gsl_vector_set(x_hhyperfine,0,devo_fit[0]);
+        gsl_vector_set(x_hyperfine,0,devo_fit[0]);
         gsl_vector_set(x_hyperfine,1,devo_fit[1]);
         gsl_vector_set(x_hyperfine,2,devo_fit[2]);
         gsl_vector_set(x_hyperfine,3,devo_fit[3]);
             checkfits(fits_write_pix(vlsrout,TDOUBLE,fpixel,1,gsl_vector_ptr(s_hyperfine->x,1),&status));
             checkfits(fits_write_pix(sigmaout,TDOUBLE,fpixel,1,gsl_vector_ptr(s_hyperfine->x,2),&status));
             checkfits(fits_write_pix(texout,TDOUBLE,fpixel,1,gsl_vector_ptr(s_hyperfine->x,3),&status));
-            chisq=hyperfine_gsl(s_hill->x,NULL);
+            chisq=hyperfine_gsl(s_hyperfine->x,NULL);
             checkfits(fits_write_pix(chisqout,TDOUBLE,fpixel,1,&chisq,&status));
             model_spectrum=hyperfine_getfit(&hyperfine_st);