From 8e028eab2a19368ba0d83f1f003112328e81b0a8 Mon Sep 17 00:00:00 2001 From: CarrieFilion <15cfilion@gmail.com> Date: Thu, 10 Oct 2024 13:25:14 -0400 Subject: [PATCH 1/2] edits - --- faq.rst | 2 +- topics/howtosim.rst | 80 ++++++++++++++++++++----------------------- topics/yamlconfig.rst | 6 ++-- 3 files changed, 42 insertions(+), 46 deletions(-) diff --git a/faq.rst b/faq.rst index d74175c..cfbdae0 100644 --- a/faq.rst +++ b/faq.rst @@ -264,7 +264,7 @@ mass distribution (e.g. if you are starting with an arbitrary set of particles a build a basis from that with the most naive approach - here you would use ``pnum`` ~ 100 and let it go). These generally don't need to be changed from the defaults. -The EJ parameters are explained in :ref: `the section on centering `. +The EJ parameters are explained in :ref:`the section on centering `. You only want to change these values from their defaults if you have an external perturber, these shouldn't be changed if you are working with with simulations of isolated systems. diff --git a/topics/howtosim.rst b/topics/howtosim.rst index 96aa299..42aa14b 100644 --- a/topics/howtosim.rst +++ b/topics/howtosim.rst @@ -15,7 +15,8 @@ The general steps for creating an N-body simulation in EXP are to: #. Generate a model file and body files. The model file contains the initial density distribution for your dark matter halo. The body file contains the initial phase space positions for (e.g.) your stellar disk and dark matter halo -#. Generate a cache file with your bases. In this example, you would need one cache file for your cylindrical (disk) basis and another for your spherical (halo) basis +#. Generate a cache file with your bases. In this example, you would need one cache file for your cylindrical (disk) basis and another for your spherical (halo) basis. +This is unnecessary in newer versions of EXP. #. Run a three-step relaxation process to ensure that your initial conditions are as quiet as possible @@ -46,83 +47,78 @@ Parameters for ``gendisk`` are specified in a YAML file with the following field CMAPR : 1 # Radial coordinate mapping type for cylindrical grid (0:none, 1:rational fct) CMAPZ : 1 # Vertical coordinate mapping type for cylindrical grid (0:none, 1:sech, 2:power in z DF : 1 # Use change-over from Jeans to Eddington - DFLAG : 6 # Output flags for DiskHalo + DFLAG : 0 # Output flags for DiskHalo DIVERGE : 0 # Cusp extrapolation for primary halo model DIVERGE2 : 0 # Cusp extrapolation for number model DIVERGE_RFAC : 1 # Extrapolation exponent for primary mass model DIVERGE_RFAC2 : 1 # Extrapolation exponent for number model - DMFAC : 0.0 # Disk mass scaling factor for spherical deprojection model - DR_DF : 5 # Width of change for to Eddington + DMFAC : 1.0 # Disk mass scaling factor for spherical deprojection model + DR_DF : 1.0 # Width of change for to Eddington DUMPCOEF : false # Dump coefficients + ASCALE : XXXXX # radial scale length for disk basis construction (e.g. 0.01) HSCALE : XXXXX # Vertical scale length for disk basis construction (e.g. 0.002) - LMAX : 6 # Number of harmonics for Spherical SL for halo/spheroid - LMAXFID : 64 # Number of harmonics for Spherical SL for determining disk basis + LMAX : 18 # Number of harmonics for Spherical SL for halo/spheroid + LMAXFID : 128 # Number of harmonics for Spherical SL for determining disk basis (may want to bump to 256) LOGR : true # Make a logarithmic coordinate mapping MMAX : 6 # Number of azimuthal harmonics for disk basis - NCHEB : 16 # Chebyshev order for smoothing - NDP : 1 + NCHEB : 12 # Chebyshev order for smoothing + NDP : 8 # Number of angular wedges for disc NDR : 2000 # Number of points in DiskHalo radial table for disk - NDZ : 200 # Number of points in DiskHalo vertical table for disk + NDZ : 800 # Number of points in DiskHalo vertical table for disk NHR : 800 # Number of points in DiskHalo radial table for halo - NHT : 200 # Number of points in DiskHalo cos(theta) table for halo + NHT : 800 # Number of points in DiskHalo cos(theta) table for halo NMAXH : 18 # Number of radial basis functions in Spherical SL for halo/spheroid - NMAXFID : 72 # Number of radial basis functions in Spherical SL for determining disk basis - NODD : 8 # Number of vertically antisymmetric disk basis functions per M-order + NMAXFID : 64 # Number of radial basis functions in Spherical SL for determining disk basis (may want to bump to 128) + NODD : 6 # Number of vertically antisymmetric disk basis functions per M-order NMAXD : 18 # Number of disk basis functions per M-order NMAXLIM : 10000 # Restricts disk basis function to NORDER1`. Step Two: generate cache files ****************************** -If you didn't generate cache files in step one, you need to generate these files now. An example of how to do this is in the +If you didn't generate cache files in step one and you have an old install of EXP, you need to generate these files now. An example of how to do this is in the `pyEXP-Examples repo `_. If you are including a stellar disk in your simulation, EXP requires that you provide a cylindrical cache file with a name that matches the ``cachename`` for the **star disk** in the EXP YAML config file. You are not required to provide a spherical cache file, as it is much diff --git a/topics/yamlconfig.rst b/topics/yamlconfig.rst index 290aa67..e5f7826 100644 --- a/topics/yamlconfig.rst +++ b/topics/yamlconfig.rst @@ -97,7 +97,7 @@ is an EXP YAML file with annotation. bodyfile : halo.bod force : id : sphereSL - parameters : {rmax : 27.5} + parameters : {rmax : 2.5} - name : star disk parameters : {nlevel: 1, indexing: true, EJ: 2, nEJkeep: 256, EJdryrun: true} @@ -231,8 +231,8 @@ documentation `. Cachename: slgrid_sph_cache # cache name, this can be omitted if you are only interested in making a basis and not a simulation -The parameters *rmin* and *rmax* define the inner and outer radii for the basis in virial units -(e.g. where :math:`R_{vir} = 1`), *Lmax* and *nmax* describe the maximum harmonic and radial +The parameters *rmin* and *rmax* define the inner and outer radii for the basis in units where +:math:`G = 1`, *Lmax* and *nmax* describe the maximum harmonic and radial orders for the basis, respectively. The *rmapping* parameter adjusts the internal coordinate mapping and a good choice is the characteristic or scale radius of the halo. From 9b4ba426e6ca4a7fc8016e21e4486b6871e22f77 Mon Sep 17 00:00:00 2001 From: CarrieFilion <15cfilion@gmail.com> Date: Thu, 10 Oct 2024 14:14:33 -0400 Subject: [PATCH 2/2] some additional edits - --- topics/howtosim.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/topics/howtosim.rst b/topics/howtosim.rst index 42aa14b..be5cd22 100644 --- a/topics/howtosim.rst +++ b/topics/howtosim.rst @@ -61,7 +61,8 @@ Parameters for ``gendisk`` are specified in a YAML file with the following field LMAXFID : 128 # Number of harmonics for Spherical SL for determining disk basis (may want to bump to 256) LOGR : true # Make a logarithmic coordinate mapping MMAX : 6 # Number of azimuthal harmonics for disk basis - NCHEB : 12 # Chebyshev order for smoothing + CHEBY : false # Chebyshev smoothing + NCHEB : 12 # Chebyshev order for smoothing if CHEBY = true NDP : 8 # Number of angular wedges for disc NDR : 2000 # Number of points in DiskHalo radial table for disk NDZ : 800 # Number of points in DiskHalo vertical table for disk @@ -83,12 +84,12 @@ Parameters for ``gendisk`` are specified in a YAML file with the following field RFACTOR : 1.0 # Disk radial scaling factor for spherical deprojection model RMIN : 0.001 # Minimum halo radius RNUM : 200 # Number of radial knots for EmpCylSL basis construction quadrature - RSPHSL : 47.5 # Maximum halo expansion radius + RSPHSL : 1.95 # Maximum halo expansion radius RTRUNC : 0.1 # Maximum disk radius for erf truncation of EOF conditioning density RWIDTH : 0.0 # Width for erf truncation of r EOF conditioning density (ignored if zero) - R_DF : -1.0e20 # Change over radius for Eddington + R_DF : -1.0e20 # Change over radius for Eddington (default is all Eddington) SCMAP : 1 # Turn on Spherical SL coordinate mapping (1, 2, 0:off) - SCSPH : 1.0 # Scale for Spherical SL coordinate mapping + SCSPH : XXXXX # Scale for Spherical SL coordinate mapping - this should match rmapping in exp SEED : XXXXX # Random number seed (e.g. your favorite number) SELECT : false # Enable significance selection in coefficient computation SHFAC : 16 # Scale height factor for assigning vertical table size