asteca / ASteCA

Code for the ASteCA package.
http://asteca.github.io/
MIT License
18 stars 6 forks source link

Remove (z,a) steps #413

Closed Gabriel-p closed 4 years ago

Gabriel-p commented 5 years ago

Currently the user needs to input z,a steps to read the values from the isochrone files. This should be taken directly from the stored files, to simplify the params_input file (and the whole process).


Note

The above is not a good idea because it would remove the option to perform a coarse run with large z and/or log(age) steps (it would require the user to remove z files from the folder, or download a whole new set).

Instead of that, add an auto option that detects the steps in both parameters.

Currently the code checks that all the metallicity files contain the same number of defined ages in:

checker -> read_met_files -> isoch_params -> read_isochs.main()

which is similar to an "age step checking" that could be used to detect the log(age) step.

But the za_steps variable (where the steps are stored) is used before calling the above function, in:

checker ->  read_met_files -> met_ages_values.getParamVals()

to define the params_values variable which contains the allowed values for the (z, log(age), M) discrete parameters, and the limits for the (E_BV, dm, b_fr) continuous parameters.

Need to give this more thought.


04/10/2019

Now that (z, a) values are averaged from the available values in the (z, a) grid, there seems to be no reason for keeping these steps around anymore. The code should just check that the min/max values (or the fixed value) given to the z, log(age) parameters are within the available range in the metallicity files within each photometric system's folder.

Even more, there's no point to the restriction that z & log(age) values should be equispaced as far as I can see. The code should check that:

  1. the same values for the metallicities are defined in each photometric system's folder
  2. the same values for the log(ages) are defined in each metallicity file

The fundam_params (created in read_met_files()) variable now contains a grid for (z, a) only. For the rest of the parameters it stores only the min/max or fixed value. See if this variable can be simplified, it is passed around a lot.

Process of reading, checking, and storing metallicity files.

checker
 |--> check/read_met_files.check_get()
      |--> inp/met_ages_values.main()
           get_metals()
           CMDAges()
              |--> inp/isochs_format.cmd_age_format()
           getParamVals()
           match_ranges()
       ranges_files_check()
          find_missing()
       |--> inp/isoch_params.main()
            |--> inp/read_isochs.main()
                 |--> inp/isochs_format.cmd_age_format()
                 |--> inp/isochs_format.cmd_line_start_format()
                 filters_and_extra_pars()
                    |--> inp/isochs_format.read_line_start()
                    |--> inp/isochs_format.girardi_filters_ids()
                    |--> inp/isochs_format.cmd_common_ids()
                    readCMDFile()
Gabriel-p commented 4 years ago

This is how the process looks now.

Process of reading, checking, and storing metallicity files.

|--> checker
    |--> check/read_met_files
        |--> inp/readZA
             readMetvals()
             findMetSubset()
             checkMetrange()
             filterMetvals()
             readAgevals()
                |--> inp/isochs_format.age_format()
             findAgeSubset()
             logAges()
             checkAgerange()
             filterAgevals()
        |--> inp/read_isochs
            |--> inp/isochs_format.age_format()
            |--> inp/isochs_format.line_start_format()
            |--> inp/isochs_format.read_line_start()
            |--> inp/isochs_format.common_ids()
            readMetFile()
               readCMDFile()
        |--> inp/interp_isochs
            interpPoints()
            interp_isoch_data()
            |--> synth_clust/binarity.binarGen()