Commit 8360d340 authored by Andrea Giannetti's avatar Andrea Giannetti
Browse files

Fixed main input file to include low lvg solution computation in case of non-convergence.

parent 59303a94
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
radmc_postprocessing:
    nphotons: 1000000
    nphot: 1000000
    scattering_mode_max: 0
    iranfreqmode: 1
    tgas_eq_tdust: 1
    lines_slowlvg_as_alternative: 1

radmc_observation:
    inclination: 0
+5 −5
Original line number Diff line number Diff line
@@ -34,10 +34,8 @@ def write_radmc_main_input_file(config_mdl: dict,
    """
    _path = validate_parameter(path, default='.')
    with open(os.path.join(_path, 'radmc3d.inp'), "w") as outfile:
        outfile.write(f'nphot = {config_mdl["radmc_postprocessing"]["nphotons"]}\n')
        outfile.write(f'scattering_mode_max = {config_mdl["radmc_postprocessing"]["scattering_mode_max"]}\n')
        outfile.write(f'iranfreqmode = {config_mdl["radmc_postprocessing"]["iranfreqmode"]}\n')
        outfile.write(f'tgas_eq_tdust = {config_mdl["radmc_postprocessing"]["tgas_eq_tdust"]}\n')
        for parameter in config_mdl["radmc_postprocessing"]:
            outfile.write(f'{parameter} = {config_mdl["radmc_postprocessing"][parameter]}\n')
        outfile.write(f'lines_mode = {radmc_lines_mode_mapping[config_lines["lines_mode"]]}\n')


@@ -106,7 +104,7 @@ def populate_model_table(config_mdl: dict,
    model_pars_dict = {
        'zipped_grid_name': grid_tarfile,
        'fits_cube_name': cube_filename,
        'nphotons': config_mdl['radmc_postprocessing']['nphotons'],
        'nphotons': config_mdl['radmc_postprocessing']['nphot'],
        'scattering_mode_max': int(config_mdl['radmc_postprocessing']['scattering_mode_max']),
        'iranfreqmode': config_mdl['radmc_postprocessing']['iranfreqmode'],
        'tgas_eq_tdust': config_mdl['radmc_postprocessing']['tgas_eq_tdust'],
@@ -221,6 +219,8 @@ def main(grid_tarfile: str,
    os.chdir(_radmc_input_path)
    os.system(radmc_command)
    os.chdir(execution_dir)
    logger.debug(f'Checking presence of file: {os.path.join(_radmc_input_path, "image.out")}')
    assert os.path.isfile(os.path.join(_radmc_input_path, 'image.out'))

    config_full = config_mdl.copy()
    config_full.update(config_stg)