• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python configuration.ConfigurationDefinition类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pts.core.basics.configuration.ConfigurationDefinition的典型用法代码示例。如果您正苦于以下问题:Python ConfigurationDefinition类的具体用法?Python ConfigurationDefinition怎么用?Python ConfigurationDefinition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了ConfigurationDefinition类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: ConfigurationDefinition

# Ensure Python 3 compatibility
from __future__ import absolute_import, division, print_function

# Import the relevant PTS classes and modules
from pts.core.tools import introspection
from pts.core.tools import filesystem as fs
from pts.core.basics.configuration import ConfigurationDefinition, parse_arguments
from pts.core.remote.host import find_host_ids
from pts.core.remote.remote import Remote
from pts.core.tools import time

# -----------------------------------------------------------------

# Create definition
definition = ConfigurationDefinition()
definition.add_positional_optional("remote", "string", "remote host on which to clear the temporary directory", choices=find_host_ids())
definition.add_optional("names", "string_list", "remove temporary directories matching these names (e.g. 'installation' matches 'installation_2017-05-03--08-45-44-410', 'installation_2017-05-03--13-52-28-371', etc. and also exact matches")

# Create setter
config = parse_arguments("clear_temp", definition)

# -----------------------------------------------------------------

# Remote
if config.remote is not None:

    # Create the remote
    remote = Remote(host_id=config.remote)

    # Check whether names are given
开发者ID:SKIRT,项目名称:PTS,代码行数:30,代码来源:clear_temp.py


示例2: ConfigurationDefinition

# -----------------------------------------------------------------

# Ensure Python 3 compatibility
from __future__ import absolute_import, division, print_function

# Import the relevant PTS classes and modules
from pts.core.tools import filesystem as fs
from pts.core.basics.configuration import ConfigurationDefinition, parse_arguments
from pts.core.basics.log import log
from pts.magic.core.image import Image

# -----------------------------------------------------------------

# Create the configuration
definition = ConfigurationDefinition()
definition.add_required("add_to", "file_path", "add to this FITS file")
definition.add_required("add_from", "file_path", "add from this FITS file")
definition.add_flag("frames", "add frames", True)
definition.add_flag("masks", "add masks", True)
definition.add_flag("segments", "add segmentation maps", True)
definition.add_flag("replace", "replace planes", False)
definition.add_flag("replace_frames", "replace frames", False)
definition.add_flag("replace_masks", "replace masks", False)
definition.add_flag("replace_segments", "replace segmentation maps", False)
definition.add_flag("backup", "make backup", False)
config = parse_arguments("interpolate", definition)

# -----------------------------------------------------------------

if config.replace: config.replace_frames = config.replace_masks = config.replace_segments = True
开发者ID:SKIRT,项目名称:PTS,代码行数:30,代码来源:add_planes.py


示例3: ConfigurationDefinition

#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# **       PTS -- Python Toolkit for working with SKIRT          **
# **       © Astronomical Observatory, Ghent University          **
# *****************************************************************

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition
from pts.core.remote.host import find_host_ids

# -----------------------------------------------------------------

# Create the configuration definition
definition = ConfigurationDefinition()

# Add required
definition.add_positional_optional("remote", "string", "name of the remote host", choices=find_host_ids())
definition.add_positional_optional("matching", "string", "only adapt settings with a name matching this string")
definition.add_positional_optional("ids", "integer_list", "simulation IDs (if none specified, all simulation IDs will be used)")
definition.add_optional("names", "string_list", "simulation names")
definition.add_flag("from_directories", "use directory names as simulation names")

# -----------------------------------------------------------------

# Select certain properties
definition.add_optional("contains", "string", "only adapt properties containing this string in their name")
definition.add_optional("not_contains", "string", "don't adapt properties containing this string in their name")
definition.add_optional("exact_name", "string", "only adapt properties with this exact string as their name")
definition.add_optional("exact_not_name", "string", "don't adapt properties with this exact string as their name")
definition.add_optional("startswith", "string", "only adapt properties whose name starts with this string")
开发者ID:SKIRT,项目名称:PTS,代码行数:31,代码来源:adapt_simulation_settings.py


示例4: ConfigurationDefinition

#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# **       PTS -- Python Toolkit for working with SKIRT          **
# **       © Astronomical Observatory, Ghent University          **
# *****************************************************************

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition
from pts.core.remote.host import find_host_ids

# -----------------------------------------------------------------

# Create the configuration definition
definition = ConfigurationDefinition()

# Add required
definition.add_required("remote", "string", "name of the remote host", choices=find_host_ids())
definition.add_positional_optional("id", "positive_integer", "simulation ID")
definition.add_optional("name", "string", "simulation name")

# Additional relative error
definition.add_optional("additional_error", "percentage", "additional percentual error for the observed flux points")

# Flags
definition.add_flag("write", "write the results", True)

# -----------------------------------------------------------------
开发者ID:SKIRT,项目名称:PTS,代码行数:28,代码来源:analyse_sed_fit_model.py


示例5: ConfigurationDefinition

#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# **       PTS -- Python Toolkit for working with SKIRT          **
# **       © Astronomical Observatory, Ghent University          **
# *****************************************************************

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition

# -----------------------------------------------------------------

# Create
definition = ConfigurationDefinition()

# Commands to be run
definition.add_optional("commands", "string_list", "commands to be run in interactive mode")

# Interactive mode
definition.add_flag("interactive", "use interactive mode", default=None)

# -----------------------------------------------------------------

# Showing
definition.add_flag("show", "show stuff", True)
definition.add_flag("show_components", "show the model components", False)

# Plotting
definition.add_flag("plot", "do plotting", True)

# Writing
开发者ID:SKIRT,项目名称:PTS,代码行数:31,代码来源:examine.py


示例6: ConfigurationDefinition

# -----------------------------------------------------------------

# Ensure Python 3 compatibility
from __future__ import absolute_import, division, print_function

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition, parse_arguments
from pts.core.remote.host import all_host_ids
from pts.core.simulation.remote import get_simulation_for_host
from pts.core.launch.analyser import reanalyse_simulation, all_steps
from pts.core.basics.log import log

# -----------------------------------------------------------------

# Create the configuration definition
definition = ConfigurationDefinition()
definition.add_required("remote", "string", "remote host to mount", choices=all_host_ids())
definition.add_required("ids", "integer_list", "simulation IDs")
definition.add_positional_optional("steps", "string_list", "re-analyse only certain steps", choices=all_steps, default=all_steps)
definition.add_positional_optional("features", "string_list", "re-analyse only certain features (if a single step is defined)")
definition.add_optional("not_steps", "string_list", "don't analyse these steps", choices=all_steps)
definition.add_optional("not_features", "string_list", "don't analyse these features (if a single not_step is defined)")

# Read the command line arguments
config = parse_arguments("reanalyse", definition, description="Re-analyse a certain simulation")

# -----------------------------------------------------------------

# Loop over the simulations
for simulation_id in config.ids:
开发者ID:SKIRT,项目名称:PTS,代码行数:30,代码来源:reanalyse.py


示例7: ConfigurationDefinition

# -*- coding: utf8 -*-
# *****************************************************************
# **       PTS -- Python Toolkit for working with SKIRT          **
# **       © Astronomical Observatory, Ghent University          **
# *****************************************************************

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition
from pts.core.remote.host import find_host_ids
from pts.modeling.tests.base import default_free_parameters, possible_free_parameters
from pts.evolve.solve.extremizer import genetic_definition

# -----------------------------------------------------------------

# Create definition
definition = ConfigurationDefinition(write_config=False)

# Optional settings
definition.add_optional("nwavelengths", "positive_integer", "number of wavelengths for the reference simulation", 50)
definition.add_optional("npackages", "positive_integer", "number of photon packages per wavelength for the reference simulation", int(1e5))
definition.add_optional("dust_grid_relative_scale", "real", "smallest scale of the dust grid relative to the pixelscale of the input maps", 2.)
definition.add_optional("dust_grid_min_level", "positive_integer", "level for the dust grid", 2)
definition.add_optional("dust_grid_max_mass_fraction", "positive_real", "max mass fraction for the dust grid", 1e-6)

# Flags
definition.add_flag("transient_heating", "enable transient heating", False)
definition.add_flag("selfabsorption", "enable dust selfabsorption", False)

# For remote execution
definition.add_optional("host_ids", "string_list", "remote hosts to use for heavy computations and simulations", choices=find_host_ids())
definition.add_flag("attached", "launch remote executions in attached mode", False)
开发者ID:SKIRT,项目名称:PTS,代码行数:31,代码来源:config.py


示例8: ConfigurationDefinition

#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# **       PTS -- Python Toolkit for working with SKIRT          **
# **       © Astronomical Observatory, Ghent University          **
# *****************************************************************

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition

# -----------------------------------------------------------------

# Create the configuration
definition = ConfigurationDefinition()

# Add optional arguments
definition.add_section("wavelengths")
definition.sections["wavelengths"].add_optional("unit", str, "the unit of the wavelengths", "micron")
definition.sections["wavelengths"].add_optional("min", float, "the minimum wavelength", 0.09)
definition.sections["wavelengths"].add_optional("max", float, "the maximum wavelength", 2000)
definition.sections["wavelengths"].add_optional("npoints", int, "the number of wavelength points", 100)
definition.sections["wavelengths"].add_optional("min_zoom", float, "the minimum wavelength of the zoomed-in grid", 1)
definition.sections["wavelengths"].add_optional("max_zoom", float, "the maximum wavelength of the zoomed-in grid", 30)
definition.sections["wavelengths"].add_optional("npoints_zoom", int, "the number of wavelength points in the zoomed-in grid", 100)

definition.add_optional("packages", float, "the number of photon packages per wavelength", 2e5)
definition.add_flag("selfabsorption", "enable dust self-absorption")
definition.add_optional("dust_grid", str, "the type of dust grid to use (bintree, octtree or cartesian)", "bintree")

# -----------------------------------------------------------------
开发者ID:Stargrazer82301,项目名称:CAAPR,代码行数:30,代码来源:initialize_fit.py


示例9: ConfigurationDefinition

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition
from pts.core.config.plot import definition as plot_definition
from pts.core.basics.plot import plotting_libraries, mpl

# -----------------------------------------------------------------

formats = ["pdf", "png"]
default_format = "pdf"
normalizations = ["max", "sum"]

# -----------------------------------------------------------------

# Create configuration definition
definition = ConfigurationDefinition()

# Distributions
definition.add_positional_optional("distributions", "filepath_list", "distribution files to be plotted")
definition.add_flag("panels", "plot the distributions in separate panels")
definition.add_flag("recursive", "search distribution files recursively in the working directory")
definition.add_optional("normalize", "string", "normalize all distributions by a certain method", choices=normalizations)
definition.add_optional("normalization_value", "real", "value for normalization", 1.)

# Add plotting options
definition.import_section("plot", "plotting options", plot_definition)
definition.sections["plot"].optional["xsize"].default = 8
definition.sections["plot"].optional["ysize"].default = 4
definition.add_flag("logscale", "use value log scale")
definition.add_flag("logfrequency", "use log scale for frequency")
definition.add_optional("bar_width", "positive_real", "relative width of the bars (1 means edges touch)", 1.)
开发者ID:SKIRT,项目名称:PTS,代码行数:30,代码来源:plot_distributions.py


示例10: ConfigurationDefinition

# Import the relevant PTS classes and modules
from pts.core.tools import filesystem as fs
from pts.core.basics.configuration import ConfigurationDefinition, parse_arguments
from pts.core.basics.animation import Animation
from pts.core.basics.apng import APNG
from pts.core.basics.numpngw import write_apng

# -----------------------------------------------------------------

formats = ["avi", "gif", "apng"]
default_format = "gif"

# -----------------------------------------------------------------

# Create the definition
definition = ConfigurationDefinition()

# File format
definition.add_optional("format", "string", "output format", default_format, choices=formats)
definition.add_optional("fps", "positive_integer", "frames per second", 10)

# Parse the command line arguments
config = parse_arguments("animate", definition)

# -----------------------------------------------------------------

# Add the frames
paths = fs.files_in_cwd(extension="png", sort=int)

# Determine path
path = "animation." + config.format
开发者ID:SKIRT,项目名称:PTS,代码行数:31,代码来源:animate.py


示例11: verify_modeling_cwd

from pts.core.basics.configuration import ConfigurationDefinition, parse_arguments
from pts.modeling.fitting.component import get_populations
from pts.modeling.fitting.run import get_generations_table, get_generation_path
from pts.modeling.fitting.generation import Generation
from pts.modeling.core.environment import verify_modeling_cwd
from pts.modeling.fitting.run import FittingRuns

# -----------------------------------------------------------------

modeling_path = verify_modeling_cwd()
runs = FittingRuns(modeling_path)

# -----------------------------------------------------------------

# Create configuration definition
definition = ConfigurationDefinition()

# -----------------------------------------------------------------

# FITTING RUN
if runs.empty: raise RuntimeError("No fitting runs are present (yet)")
elif runs.has_single: definition.add_fixed("fitting_run", "name of the fitting run", runs.single_name)
else: definition.add_required("fitting_run", "string", "name of the fitting run", choices=runs.names)

# Create the configuration
config = parse_arguments("check_populations", definition)

# -----------------------------------------------------------------

# Load populations table
populations = get_populations(modeling_path)
开发者ID:SKIRT,项目名称:PTS,代码行数:31,代码来源:check_populations.py


示例12: ConfigurationDefinition

# Ensure Python 3 compatibility
from __future__ import absolute_import, division, print_function

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition, parse_arguments
from pts.core.remote.host import find_host_ids
from pts.core.tools import introspection
from pts.core.tools import filesystem as fs
from pts.core.simulation.simulation import RemoteSimulation
from pts.core.remote.remote import Remote
from pts.core.basics.log import log

# -----------------------------------------------------------------

# Create the configuration definition
definition = ConfigurationDefinition()

# Add settings
definition.add_positional_optional("remotes", "string_list", "the IDs of the remote hosts for which to clear the simulations", choices=find_host_ids(), default=find_host_ids())
definition.add_positional_optional("ids", "integer_list", "the IDs of the simulations to clear")
definition.add_flag("full", "fully clear the simulations, also remove remote simulation directories")

# -----------------------------------------------------------------

# Parse the arguments into a configuration
config = parse_arguments("clear_tasks", definition, description="Clear PTS tasks for a certain remote host")

# -----------------------------------------------------------------

# Loop over the remote hosts
for host_id in config.remotes:
开发者ID:SKIRT,项目名称:PTS,代码行数:31,代码来源:clear_simulations.py


示例13: ConfigurationDefinition

#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# **       PTS -- Python Toolkit for working with SKIRT          **
# **       © Astronomical Observatory, Ghent University          **
# *****************************************************************

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition

# -----------------------------------------------------------------

# Create configuration definition
definition = ConfigurationDefinition()

# Add optional arguments
definition.add_positional_optional("host_id", "string", "install SKIRT/PTS remotely")
definition.add_optional("repository", "string", "repository name from which to clone (only possible when installing remotely and SKIRT/PTS is already installed locally)")

# Add flags
definition.add_flag("private", "use the private SKIRT/PTS repository")

# Advanced
definition.add_flag("force", "force re-installation when already present", letter="f")
definition.add_flag("force_conda", "force installation of conda and creation of a conda environment even when it is already present")

definition.add_flag("finish", "finish previously initiated installation")

# Add flag
#definition.add_flag("all_remotes", "update on all remote hosts")
开发者ID:SKIRT,项目名称:PTS,代码行数:30,代码来源:install.py


示例14: ConfigurationDefinition

#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# **       PTS -- Python Toolkit for working with SKIRT          **
# **       © Astronomical Observatory, Ghent University          **
# *****************************************************************

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition
from pts.core.remote.host import find_host_ids
from pts.core.config.analyse_simulation import definition as analysis_definition

# -----------------------------------------------------------------

# Create the configuration
definition = ConfigurationDefinition(write_config=False)

# Add positional optional
definition.add_positional_optional("host_ids", "string_list", "name of the remote host(s) for which to show/retrieve simulations and tasks", choices=find_host_ids())
definition.add_positional_optional("ids", "string_integer_list_dictionary", "simulation IDs for the different remote hosts")

# Add flag
definition.add_flag("show_progress", "show the progress of the simulation that is still running (only if there is just one)", False)
definition.add_flag("debug_output", "show all simulation output in debug mode")

# -----------------------------------------------------------------

definition.add_flag("retrieve", "retrieve finished simulations", True)
definition.add_flag("analyse", "analyse retrieved simulations", True)

# -----------------------------------------------------------------
开发者ID:SKIRT,项目名称:PTS,代码行数:31,代码来源:status.py


示例15: ConfigurationDefinition

# -----------------------------------------------------------------

# Ensure Python 3 compatibility
from __future__ import absolute_import, division, print_function

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition, parse_arguments
from pts.modeling.core.environment import find_modeling_environment_up_cwd
from pts.magic.plot.imagegrid import ResidualImageGridPlotter
from pts.core.tools import filesystem as fs
from pts.magic.core.frame import Frame

# -----------------------------------------------------------------

# Create the configuration definition
definition = ConfigurationDefinition()
definition.add_optional("not_filters", "lazy_broad_band_filter_list", "don't show these filters")

definition.add_flag("downsample", "perform downsampling")
definition.add_optional("max_npixels", "positive_integer", "maximum number of pixels to enabled downsampling", 400)
definition.add_flag("truncate", "truncate the images", True)

definition.add_flag("distributions", "show residual distributions", False)

# Extra
definition.add_flag("normalize", "normalize the images")
definition.add_optional("share_scale_with", "string", "share the scale of all other images with this image")
definition.add_optional("colormap", "string", "colormap", "viridis")

# Extra
definition.add_flag("write_data", "write data")
开发者ID:SKIRT,项目名称:PTS,代码行数:31,代码来源:show_residuals.py


示例16: ConfigurationDefinition

# -*- coding: utf8 -*-
# *****************************************************************
# **       PTS -- Python Toolkit for working with SKIRT          **
# **       © Astronomical Observatory, Ghent University          **
# *****************************************************************

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition
from pts.core.basics.plot import normal_colormaps
from pts.magic.plot.imagegrid import default_cmap, light_theme, themes

# ------------------------------------------------------------------------------

# Create definition
definition = ConfigurationDefinition(write_config=False)

# From directory
definition.add_optional("from_directory", "directory_path", "load images from directory")

# Colormap
definition.add_optional("cmap", "string", "colormap", default_cmap, choices=normal_colormaps)

# Options
definition.add_optional("axes_label_size", "positive_integer", "axes label size", 14)
definition.add_optional("ticks_label_size", "positive_integer", "ticks label size", 8)
definition.add_optional("legend_fontsize", "positive_integer", "legend fontsize", 14)
definition.add_optional("legend_markers_cale", "positive_integer", "legend marker scale", 0)
definition.add_optional("lines_marker_size", "positive_real", "lines marker size", 2.5)
definition.add_optional("linewidth", "positive_integer", "linewidth", 1)

# Dark or light theme?
开发者ID:SKIRT,项目名称:PTS,代码行数:31,代码来源:plot_imagegrid.py


示例17: verify_modeling_cwd

from pts.modeling.component.component import get_log_file_paths
from pts.core.tools import filesystem as fs
from pts.core.basics.log import log
from pts.core.tools import time
from pts.core.tools import formatting as fmt

# -----------------------------------------------------------------

# Get the modeling commands
modeling_path = verify_modeling_cwd()
filepaths = get_log_file_paths(modeling_path)

# -----------------------------------------------------------------

# Create the configuration definition
definition = ConfigurationDefinition()

# Add settings
definition.add_required("match", "string", "(partial) command name")

# Get configuration
config = parse_arguments("previous_config", definition)

# -----------------------------------------------------------------

matches = defaultdict(list)

# -----------------------------------------------------------------

# Loop over the filepaths
for filepath in filepaths:
开发者ID:SKIRT,项目名称:PTS,代码行数:31,代码来源:previous_log.py


示例18: ConfigurationDefinition

#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# **       PTS -- Python Toolkit for working with SKIRT          **
# **       © Astronomical Observatory, Ghent University          **
# *****************************************************************

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition
from pts.magic.maps.colour.colour import colour_strings

# -----------------------------------------------------------------

# Create the configuration
definition = ConfigurationDefinition()

# Add optional
definition.add_positional_optional("colours", "string_list", "colour maps to make", default=colour_strings, suggestions=colour_strings)

# -----------------------------------------------------------------
开发者ID:SKIRT,项目名称:PTS,代码行数:20,代码来源:make_colour_maps.py


示例19: ConfigurationDefinition

# Ensure Python 3 compatibility
from __future__ import absolute_import, division, print_function

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition, parse_arguments
from pts.core.plot.sed import plot_sed
from pts.core.plot.distribution import plot_distribution
from pts.core.tools import formatting as fmt
from pts.core.tools import sequences
from pts.core.tools.stringify import tostr
from pts.core.basics.structure import load_structure, filetypes, composite, table, dictionary, sed, distribution, regions

# -----------------------------------------------------------------

# Create configuration definition
definition = ConfigurationDefinition(write_config=False)
definition.add_required("filetype", "string", "type of file", choices=filetypes)
definition.add_required("filename", "file_path", "path of the dictionary file")

# As table?
definition.add_flag("table", "show as table")

# Displaying and formatting
definition.add_flag("interactive", "display tables interactively", False)
definition.add_flag("latex", "print as latex")

# Modyfying the table
definition.add_optional("columns", "string_list", "only show these columns")
definition.add_optional("sort", "string", "sort the entries on this column")

# Extra options
开发者ID:SKIRT,项目名称:PTS,代码行数:31,代码来源:show_file.py


示例20: ConfigurationDefinition

#!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# **       PTS -- Python Toolkit for working with SKIRT          **
# **       © Astronomical Observatory, Ghent University          **
# *****************************************************************

# Import the relevant PTS classes and modules
from pts.core.basics.configuration import ConfigurationDefinition

# -----------------------------------------------------------------

# Create configuration definition
definition = ConfigurationDefinition()

# Add required
definition.add_required("ski", "file_path", "path to the ski file")

# Add optional
definition.add_optional("input", "directory_path", "path to the input directory")

# Add optional
definition.add_optional("nwavelengths", "integer", "the number of wavelengths (useful for when a file wavelength grid is used and the file is not present)")
definition.add_optional("ncells", "integer", "number of dust cells (useful only when the ski file includes a tree dust grid)")

# Add flag
definition.add_flag("probe", "probe the number of cells (or memory usage) by launching a dry-run of the simulation, if necessary (tree dust grid and ncells not specified)", True)

# Add optional
definition.add_optional("nprocesses", "integer_list", "number of processes", [1, 2, 4, 8, 12, 20])
开发者ID:SKIRT,项目名称:PTS,代码行数:30,代码来源:estimate_memory.py



注:本文中的pts.core.basics.configuration.ConfigurationDefinition类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python log.info函数代码示例发布时间:2022-05-25
下一篇:
Python configuration.parse_arguments函数代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap