Questions regarding "per-field config"
Hi all, My PR to add support for per-field configuration (https://github.com/yt-project/yt/pull/1931) is now ready code-wise. The only question remaining is the exact format of the configuration file. The PR adds support for configuring the plot behaviour of individual fields, allowing to set the default colormap, units and log scale of any field. Currently, this is stored in the config file as [gas.density] # this will set the density plotting options cmap = "plasma" log = true units = "mp/cm**3" [gas.velocity_divergence] cmap = "bwr" log = false [deposit] path_length_units = "kpc" # use kpc for projections instead of cm but the plot config could be stored in a section of its own, like � [ANYTHING.gas.density] cmap = "plasma" log = true units = "mp/cm**3" [ANYTHING.gas.velocity_divergence] cmap = "bwr" log = false [ANYTHING.deposit] path_length_units = "kpc" Where we could substitute ANYTHING with e.g. plots, plotting_configuration or please_let_me_handcraft_my_plot. What are your opinion on how to keep this config file tidy? Best, Corentin -- Dr. Corentin Cadiou Post Doctoral Research Assistant Cosmoparticle Initiative Hub, desk 27 University College London (UCL) Gower St, Bloomsbury, London WC1E 6BT mobile: +33.6.43.18.66.83
Hi Corentin, thanks for raising the question in here. Here’s my reasoning: I think adding some sections to the config file make sense in some cases. For instance, in YTEP-0039 I’m proposing to add a new `logging` section to gather log-related parameters. Now if we choose not to have a dedicated section name for the plotting options you’re enabling, we take a risk of limiting the design space in the future if for any reason we need to add new sections with non-arbitrary names. As a consequence, I think the prudent option is to have a dedicated section name for plots. Either `plotting` or `plot` is clear and short, and definetly worth it in my opinion. I’m fine with either. If you agree with this, I’ll harmonise YTEP-0039 with your choice (`logging` for `plotting` or `log` for `plot`). best Clément
On 17 Mar 2021, at 09:45, Corentin CADIOU <corentin.cadiou@iap.fr> wrote:
Hi all,
My PR to add support for per-field configuration (https://github.com/yt-project/yt/pull/1931) is now ready code-wise. The only question remaining is the exact format of the configuration file.
The PR adds support for configuring the plot behaviour of individual fields, allowing to set the default colormap, units and log scale of any field. Currently, this is stored in the config file as
[gas.density] # this will set the density plotting options cmap = "plasma" log = true units = "mp/cm**3"
[gas.velocity_divergence] cmap = "bwr" log = false
[deposit] path_length_units = "kpc" # use kpc for projections instead of cm
but the plot config could be stored in a section of its own, like
[ANYTHING.gas.density] cmap = "plasma" log = true units = "mp/cm**3"
[ANYTHING.gas.velocity_divergence] cmap = "bwr" log = false
[ANYTHING.deposit] path_length_units = "kpc"
Where we could substitute ANYTHING with e.g. plots, plotting_configuration or please_let_me_handcraft_my_plot.
What are your opinion on how to keep this config file tidy?
Best, Corentin
-- Dr. Corentin Cadiou Post Doctoral Research Assistant Cosmoparticle Initiative Hub, desk 27 University College London (UCL) Gower St, Bloomsbury, London WC1E 6BT
mobile: +33.6.43.18.66.83
<OpenPGP_0x73D9869A513DE06A.asc><OpenPGP_signature.sig>
Hi all, I kind of like the idea that we'd have *all* of a field-specific config in a single place. So if I want to configure my preferred units for a field, they'd be next to the colormap, etc. I like having it stuck into `plots` a little bit less. -Matt On Wed, Mar 17, 2021 at 6:03 AM Clément Robert via yt-dev <yt-dev@python.org> wrote:
Hi Corentin, thanks for raising the question in here. Here’s my reasoning: I think adding some sections to the config file make sense in some cases. For instance, in YTEP-0039 I’m proposing to add a new `logging` section to gather log-related parameters. Now if we choose not to have a dedicated section name for the plotting options you’re enabling, we take a risk of limiting the design space in the future if for any reason we need to add new sections with non-arbitrary names.
As a consequence, I think the prudent option is to have a dedicated section name for plots. Either `plotting` or `plot` is clear and short, and definetly worth it in my opinion. I’m fine with either. If you agree with this, I’ll harmonise YTEP-0039 with your choice (`logging` for `plotting` or `log` for `plot`). best Clément
On 17 Mar 2021, at 09:45, Corentin CADIOU <corentin.cadiou@iap.fr> wrote:
Hi all,
My PR to add support for per-field configuration (https://github.com/yt-project/yt/pull/1931) is now ready code-wise. The only question remaining is the exact format of the configuration file.
The PR adds support for configuring the plot behaviour of individual fields, allowing to set the default colormap, units and log scale of any field. Currently, this is stored in the config file as
[gas.density] # this will set the density plotting options cmap = "plasma" log = true units = "mp/cm**3"
[gas.velocity_divergence] cmap = "bwr" log = false
[deposit] path_length_units = "kpc" # use kpc for projections instead of cm
but the plot config could be stored in a section of its own, like
[ANYTHING.gas.density] cmap = "plasma" log = true units = "mp/cm**3"
[ANYTHING.gas.velocity_divergence] cmap = "bwr" log = false
[ANYTHING.deposit] path_length_units = "kpc"
Where we could substitute ANYTHING with e.g. plots, plotting_configuration or please_let_me_handcraft_my_plot.
What are your opinion on how to keep this config file tidy?
Best, Corentin
-- Dr. Corentin Cadiou Post Doctoral Research Assistant Cosmoparticle Initiative Hub, desk 27 University College London (UCL) Gower St, Bloomsbury, London WC1E 6BT
mobile: +33.6.43.18.66.83
<OpenPGP_0x73D9869A513DE06A.asc><OpenPGP_signature.sig>
_______________________________________________ yt-dev mailing list -- yt-dev@python.org To unsubscribe send an email to yt-dev-leave@python.org https://mail.python.org/mailman3/lists/yt-dev.python.org/ Member address: matthewturk@gmail.com
participants (3)
-
Clément Robert
-
Corentin CADIOU
-
Matthew Turk