! HD49385

&oscillation_controls  
   
   save_mode_model_number = 902
   el_to_save = 0
   order_to_save = 14
   save_mode_filename = 'eigenfcn.data'

      !show_l0_results = .true.
      !show_l1_results = .true.
      !show_l2_results = .true.
      
      !select_age_by_anchor_l0 = .true.
      select_age_by_anchor_l0 = .false.
         ! if false, pick age by best chi^2
         ! if true, pick age by anchor_l0 frequency within tolerances
            ! will not give min chi^2, 
            ! but can be much faster when trying lots of parameter settings.
            ! and can give useful approximate info about where to look for min chi^2.
         anchor_l0_atol = 1d-5
         anchor_l0_rtol = 1d-5
      
      include_nonradial_chi_square = .true.
      !include_nonradial_chi_square = .false.
         ! if false, chi^2 only includes l=0 and spectroscopic terms.
         ! if true, then also include l=1 and l=2 results in chi^2.
      
      ! start calculating modes when get within this sigma range and center h1 < limit
      num_sigma_surf = 5
      center_h1_limit = 0.01
      
      ! evaluate chi^2 when anchor_l0_freq is within this limit of anchor_l0_obs
      ! note: the code assumes anchor_l0_freq is decreasing with age for models of interest.
      use_lowest_order_l0_as_anchor = .true. ! else use freq with smallest sigma
      num_sigma_anchor_l0 = 3 ! skip models outside of this range for anchor_l0 freq
      
      max_dt_for_search = 1d5
      max_chi2_increase_during_search = 1.2
         ! if increases by more than this factor above best value, stop the search.

      
      ! surface constraints (skip if sigma < 0)
      logg_target = 4.00d0
      logg_sigma = 0.06d0
      logL_target = 0.67d0
      logL_sigma = 0.05d0
      Teff_target = 6095d0
      Teff_sigma = 65d0

      ! give up if exceed any of the following after center H is below center_h1_limit.
      ! (only use limits with sigma > 0)
      ! logg_limit = logg_target + logg_sigma*sigmas_coeff_for_logg_limit
      ! logL_limit = logL_target + logL_sigma*sigmas_coeff_for_logL_limit
      ! Teff_limit = Teff_target + Teff_sigma*sigmas_coeff_for_Teff_limit
      sigmas_coeff_for_logg_limit = -10
      sigmas_coeff_for_logL_limit = 10
      sigmas_coeff_for_Teff_limit = -10
      
      include_logg_in_chi_square = .false.
      include_logL_in_chi_square = .true.
      include_Teff_in_chi_square = .true.
      
      chi_square_param_P = 0 ! chi^2 = (sum of squares)/(N - P) where P = chi_square_param_P




      ! PULSATION DATA FROM OBSERVATIONS
       
      nu_max_obs = 1010 ! microHz

         
      ! for the radial modes, we require model orders match observation estimated orders.
      ! l0_obs(1) should be the lowest valid order for matching the observations.
      ! if there are gaps in the higher orders of the observed radial modes,
      ! indicate that by putting -1 in l0_obs for missing orders.
      l0_n_min = 13 ! expected order for mode matching l0_obs(1)
      ! NOTE: an incorrect value for l0_n_min will ensure large chi^2 values!!!!
      ! you may need to experiment a bit with this at first

      ! observed l=0 modes to match to model
      nl0 = 9
      l0_obs(1) = 799.70d0
      l0_obs(2) = 855.30d0
      l0_obs(3) = 909.92d0
      l0_obs(4) = 965.16d0
      l0_obs(5) = 1021.81d0
      l0_obs(6) = 1078.97d0
      l0_obs(7) = 1135.32d0
      l0_obs(8) = 1192.12d0
      l0_obs(9) = 1250.12d0
      l0_obs_sigma(1) = 0.27d0
      l0_obs_sigma(2) = 0.73d0
      l0_obs_sigma(3) = 0.26d0
      l0_obs_sigma(4) = 0.36d0
      l0_obs_sigma(5) = 0.28d0
      l0_obs_sigma(6) = 0.33d0
      l0_obs_sigma(7) = 0.34d0
      l0_obs_sigma(8) = 0.45d0
      l0_obs_sigma(9) = 0.89d0
      
      ! observed l=1 modes to match to model
      nl1 = 10
      l1_obs(1) = 748.60d0
      l1_obs(2) = 777.91d0
      l1_obs(3) = 828.21d0
      l1_obs(4) = 881.29d0
      l1_obs(5) = 935.90d0
      l1_obs(6) = 991.09d0
      l1_obs(7) = 1047.79d0
      l1_obs(8) = 1104.68d0
      l1_obs(9) = 1161.27d0
      l1_obs(10) = 1216.95d0
      l1_obs_sigma(1) = 0.23d0
      l1_obs_sigma(2) = 0.24d0
      l1_obs_sigma(3) = 0.42d0
      l1_obs_sigma(4) = 0.29d0
      l1_obs_sigma(5) = 0.23d0
      l1_obs_sigma(6) = 0.22d0
      l1_obs_sigma(7) = 0.24d0
      l1_obs_sigma(8) = 0.22d0
      l1_obs_sigma(9) = 0.33d0
      l1_obs_sigma(10) = 0.53d0
      
      ! observed l=2 modes to match to model
      nl2 = 8
      l2_obs(1) = 794.55d0
      l2_obs(2) = 905.31d0
      l2_obs(3) = 961.47d0
      l2_obs(4) = 1017.56d0
      l2_obs(5) = 1075.01d0
      l2_obs(6) = 1130.79d0
      l2_obs(7) = 1187.55d0
      l2_obs(8) = 1246.78d0
      l2_obs_sigma(1) = 0.52d0
      l2_obs_sigma(2) = 0.35d0
      l2_obs_sigma(3) = 0.49d0
      l2_obs_sigma(4) = 0.27d0
      l2_obs_sigma(5) = 0.27d0
      l2_obs_sigma(6) = 0.61d0
      l2_obs_sigma(7) = 0.32d0
      l2_obs_sigma(8) = 0.84d0
      
      
      ! miscellaneous
      
      
      ! composition controls
      Y_frac_he3 = 1d-4 ! = xhe3/(xhe3 + xhe4)
       
      ! surface corrections
      correction_b = 4.90d0 ! used in correcting model frequencies
         ! if this is <= 0, then no corrections are done.
      
      ! adipls controls
      iscan_factor_l0 = 5
      iscan_factor_l1 = 15
      iscan_factor_l2 = 15
         ! iscan for adipls = this factor times expected number of modes
      nu_lower_factor = 0.9
      nu_upper_factor = 1.1
         ! frequency range for adipls is set from observed frequencies times these
      do_restribute_mesh = .false.
         ! note: number of zones for redistribute is set in the redistrb.c input file


/ ! end oscillation_controls
