{ "info": { "author": "Michele Cappellari", "author_email": "michele.cappellari@physics.ox.ac.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "The JamPy Package\n=================\n\n**Jeans Anisotropic Modelling of Galactic Dynamics**\n\n.. image:: https://img.shields.io/pypi/v/jampy.svg\n :target: https://pypi.org/project/jampy/\n.. image:: https://img.shields.io/badge/arXiv-0806.0042-orange.svg\n :target: https://arxiv.org/abs/0806.0042\n.. image:: https://img.shields.io/badge/DOI-10.1111/...-green.svg\n :target: https://doi.org/10.1111/j.1365-2966.2008.13754.x\n\nJamPy is a Python implementation of the Jeans Anisotropic Modelling (JAM)\nformalism of `Cappellari (2008) `_,\nfor galactic dynamics, in spherical and axisymmetric geometry.\n\nJamPy also includes the updates for proper motions in axisymmetric and\nspherical geometry of `Cappellari (2012) `_ and\n`Cappellari (2015) `_ respectively.\n\n.. contents:: :depth: 1\n\nAttribution\n-----------\n\nIf you use this software for your research, please cite \n`Cappellari (2008) `_. \nAnd if you use it for proper motions, also cite the relevant papers above.\nThe BibTeX entry for the main JAM paper is::\n\n @ARTICLE{Cappellari2008,\n author = {{Cappellari}, M.},\n title = \"{Measuring the inclination and mass-to-light ratio of\n axisymmetric galaxies via anisotropic Jeans models of stellar\n kinematics}\",\n journal = {MNRAS},\n eprint = {0806.0042},\n year = 2008,\n volume = 390,\n pages = {71-86},\n doi = {10.1111/j.1365-2966.2008.13754.x}\n }\n\nInstallation\n------------\n\ninstall with::\n\n pip install jampy\n\nWithout writing access to the global ``site-packages`` directory, use::\n\n pip install --user jampy\n\nDocumentation\n-------------\n\nFull documentation is contained in the individual files headers.\n\nUsage examples are contained in the directory ``jampy/examples``, which is\ncopied by ``pip`` within the ``site-packages`` folder.\n\nWhat follows is the documentation of one of the main procedures, extracted from\nthe Python file header.\n\n\nPurpose of jam_axi_rms\n----------------------\n\nThis procedure calculates a prediction for the projected second\nvelocity moment ``V_RMS = sqrt(V**2 + sigma**2)``, or optionally any\nof the six components of the symmetric proper motion dispersion\ntensor, for an anisotropic axisymmetric galaxy model.\nIt implements the solution of the anisotropic Jeans equations presented\nin equation (28) and note 5 of `Cappellari (2008).\n`_\nPSF convolution in done as described in the Appendix of that paper.\nSee `Cappellari (2012; C12) `_\nfor explicit formulas for the full proper motion tensor.\n\nCalling Sequence\n----------------\n\n.. code-block:: python\n\n rmsModel, ml, chi2, flux = \\\n jam_axi_rms(surf_lum, sigma_lum, qobs_lum, surf_pot, sigma_pot, qobs_pot,\n inc, mbh, distance, xbin, ybin, beta=None, erms=None,\n flux_obs=None, goodbins=None, ml=None, nang=10, normpsf=1.,\n nrad=20, pixang=0., pixsize=0., plot=True, quiet=False,\n rbh=0.01, rms=None, sigmapsf=0., step=0., tensor='zz',\n vmax=None, vmin=None)\n\nInput Parameters\n----------------\n\nSURF_LUM:\n vector of length ``N`` containing the peak surface brightness of the\n MGE Gaussians describing the galaxy surface brightness in units of\n ``Lsun/pc**2`` (solar luminosities per parsec**2).\nSIGMA_LUM:\n vector of length ``N`` containing the dispersion in arcseconds of\n the MGE Gaussians describing the galaxy surface brightness.\nQOBS_LUM:\n vector of length ``N`` containing the observed axial ratio of the MGE\n Gaussians describing the galaxy surface brightness.\nSURF_POT:\n vector of length ``M`` containing the peak value of the MGE Gaussians\n describing the galaxy surface density in units of ``Msun/pc**2`` (solar\n masses per parsec**2). This is the MGE model from which the model\n potential is computed.\n\n In a common usage scenario, with a self-consistent model, one has\n the same Gaussians for both the surface brightness and the potential.\n This implies ``SURF_POT = SURF_LUM``, ``SIGMA_POT = SIGMA_LUM`` and\n ``QOBS_POT = QOBS_LUM``. The global M/L of the model is fitted by the\n routine when passing the ``RMS`` and ``ERMS`` keywords with the observed\n kinematics.\nSIGMA_POT:\n vector of length ``M`` containing the dispersion in arcseconds of\n the MGE Gaussians describing the galaxy surface density.\nQOBS_POT:\n vector of length ``M`` containing the observed axial ratio of the MGE\n Gaussians describing the galaxy surface density.\nINC:\n inclination in degrees (90 being edge-on).\nMBH:\n Mass of a nuclear supermassive black hole in solar masses.\n\n VERY IMPORTANT: The model predictions are computed assuming SURF_POT\n gives the total mass. In the common self-consistent case one has\n ``SURF_POT = SURF_LUM`` and if requested (keyword ML) the program can\n scale the output ``RMSMODEL`` to best fit the data. The scaling is\n equivalent to multiplying *both* SURF_POT and MBH by a factor M/L.\n To avoid mistakes, the actual MBH used by the output model is printed\n on the screen.\nDISTANCE:\n distance of the galaxy in Mpc.\nXBIN:\n Vector of length ``P`` with the X coordinates in arcseconds of the bins\n (or pixels) at which one wants to compute the model predictions. The\n X-axis is assumed to coincide with the galaxy projected major axis. The\n galaxy center is at (0,0).\n\n When no PSF/pixel convolution is performed (``SIGMAPSF=0`` or\n ``PIXSIZE=0``) there is a singularity at (0,0) which should be avoided\n by the input coordinates.\nYBIN:\n Vector of length ``P`` with the Y coordinates in arcseconds of the bins\n (or pixels) at which one wants to compute the model predictions. The\n Y-axis is assumed to coincide with the projected galaxy symmetry axis.\n\nOptional Keywords\n-----------------\n\nBETA:\n Vector of length ``N`` with the anisotropy\n ``beta_z = 1 - (sigma_z/sigma_R)**2`` of the individual MGE Gaussians.\nERMS:\n Vector of length ``P`` with the 1sigma errors associated to the ``RMS``\n measurements. From the error propagation::\n\n ERMS = sqrt((dVel*velBin)^2 + (dSig*sigBin)^2)/RMS,\n\n where ``velBin`` and ``sigBin`` are the velocity and dispersion in each\n bin and ``dVel`` and ``dSig`` are the corresponding errors.\n (Default: constant errors ``ERMS=0.05*np.median(RMS)``)\nFLUX_OBS:\n Optional mean surface brightness of each bin for plotting.\nGOODBINS:\n Boolean vector of length ``P`` with values True for the bins which\n have to be included in the fit (if requested) and ``chi**2`` calculation.\n (Default: fit all bins).\nML:\n Mass-to-light ratio to multiply the values given by SURF_POT.\n Setting this keyword is completely equivalent to multiplying the\n output ``RMSMODEL`` by ``np.sqrt(M/L)`` after the fit. This implies that\n the BH mass becomes ``MBH*(M/L)``.\n\n If this keyword is not set, or set to a negative number in input, the M/L\n is fitted from the data and the best-fitting M/L is returned in output.\n The BH mass of the best-fitting model is ``MBH*(M/L)``.\nNORMPSF:\n Vector of length ``Q`` with the fraction of the total PSF flux\n contained in the circular Gaussians describing the PSF of the\n observations. It has to be ``np.sum(NORMPSF) = 1``. The PSF will be used\n for seeing convolution of the model kinematics.\nNANG:\n Same as for ``NRAD``, but for the number of angular intervals\n (default: ``NANG=10``).\nNRAD:\n Number of logarithmically spaced radial positions for which the\n models is evaluated before interpolation and PSF convolution. One may\n want to increase this value if the model has to be evaluated over many\n orders of magnitutes in radius (default: ``NRAD=20``). The computation\n time scales as ``NRAD*NANG``.\nPIXANG:\n angle between the observed spaxels and the galaxy major axis X.\nPIXSIZE:\n Size in arcseconds of the (square) spatial elements at which the\n kinematics is obtained. This may correspond to the side of the spaxel\n or lenslets of an integral-field spectrograph. This size is used to\n compute the kernel for the seeing and aperture convolution.\n\n If this is not set, or ``PIXSIZE=0``, then convolution is not performed.\nPLOT:\n Set this keyword to produce a plot at the end of the calculation.\nQUIET:\n Set this keyword to avoid printing values on the screen.\nRBH:\n This scalar gives the sigma in arcsec of the Gaussian representing the\n central black hole of mass MBH (See Section 3.1.2 of `Cappellari 2008.\n `_)\n The gravitational potential is indistinguishable from a point source\n for ``radii > 2*RBH``, so the default ``RBH=0.01`` arcsec is appropriate\n in most current situations.\n\n ``RBH`` should not be decreased unless actually needed!\nRMS:\n Vector of length ``P`` with the input observed velocity second moment::\n\n V_RMS = sqrt(velBin**2 + sigBin**2)\n\n at the coordinates positions given by the vectors ``XBIN`` and ``YBIN``.\n\n If ``RMS`` is set and ``ML`` is negative or not set, then the model is\n fitted to the data, otherwise the adopted ML is used and just the\n ``chi**2`` is returned.\nSIGMAPSF:\n Vector of length ``Q`` with the dispersion in arcseconds of the\n circular Gaussians describing the PSF of the observations.\n\n If this is not set, or ``SIGMAPSF=0``, then convolution is not performed.\n\n IMPORTANT: PSF convolution is done by creating a 2D image, with pixels\n size given by ``STEP=MAX(SIGMAPSF, PIXSIZE/2)/4``, and convolving it\n with the PSF + aperture. If the input radii RAD are very large with\n respect to STEP, the 2D image may require a too large amount of memory.\n If this is the case one may compute the model predictions at small radii\n separately from those at large radii, where PSF convolution is not\n needed.\nSTEP:\n Spatial step for the model calculation and PSF convolution in arcsec.\n This value is automatically computed by default as\n ``STEP=MAX(SIGMAPSF,PIXSIZE/2)/4``. It is assumed that when ``PIXSIZE``\n or ``SIGMAPSF`` are big, high resolution calculations are not needed. In\n some cases however, e.g. to accurately estimate the central Vrms in a\n very cuspy galaxy inside a large aperture, one may want to override the\n default value to force smaller spatial pixels using this keyword.\nTENSOR:\n String specifying the component of the velocity dispersion tensor.\n\n ``TENSOR='xx'`` gives sigma_xx=sqrt of the component of the\n proper motion dispersion tensor in the direction parallel to the\n projected major axis.\n\n ``TENSOR='yy'`` gives sigma_yy=sqrt of the component of the\n proper motion dispersion tensor in the direction parallel to the\n projected symmetry axis.\n\n ``TENSOR='zz'`` (default) gives the usual line-of-sight V_rms=sqrt.\n\n ``TENSOR='xy'`` gives the mixed component of the proper\n motion dispersion tensor.\n\n ``TENSOR='xz'`` gives the mixed component of the proper\n motion dispersion tensor.\n\n ``TENSOR='yz'`` gives the mixed component of the proper\n motion dispersion tensor.\nVMAX:\n Maximum value of the ``Vrms`` to plot.\nVMIN:\n Minimum value of the ``Vrms`` to plot.\n\nOutput Parameters\n-----------------\n\nRMSMODEL:\n Vector of length P with the model predictions for the velocity\n second moments for each bin::\n\n V_RMS = sqrt(vel**2 + sig**2)\n\n Any of the six components of the symmetric proper motion dispersion\n tensor can be provided in output using the ``TENSOR`` keyword.\nML:\n Best fitting M/L.\nCHI2:\n Reduced ``chi**2`` describing the quality of the fit::\n\n chi2 = (((rms[goodBins] - rmsModel[goodBins])/erms[goodBins])**2).sum()\n / goodBins.sum()\n\nFLUX:\n Vector of length ``P`` with the PSF-convolved MGE surface brightness of\n each bin in ``Lsun/pc**2``, used to plot the isophotes on the model results.\n\n\n\nLicense\n-------\n\nOther/Proprietary License\n\nCopyright (c) 2003-2019 Michele Cappellari\n\nThis software is provided as is without any warranty whatsoever.\nPermission to use, for non-commercial purposes is granted.\nPermission to modify for personal or internal use is granted,\nprovided this copyright and disclaimer are included in all \ncopies of the software. All other rights are reserved.\nIn particular, redistribution of the code is not allowed.\n\nChangelog\n---------\n\nV5.0.21: MC, Oxford, 14 February 2019\n+++++++++++++++++++++++++++++++++++++\n\n- Significant speed up of ``mge_vcirc``.\n- Formatted documentation.\n- Created package-wide CHANGELOG: before this version, the\n CHANGELOG file only refers to the procedure ``jam_axi_rms``.\n\nV5.0.16: MC, Oxford, 27 September 2018\n++++++++++++++++++++++++++++++++++++++\n\n- Fixed clock DeprecationWarning in Python 3.7.\n\nV5.0.15: MC, Oxford, 12 May 2018\n++++++++++++++++++++++++++++++++\n\n- Dropped Python 2.7 support.\n\nV5.0.14: MC, Oxford, 17 April 2018\n++++++++++++++++++++++++++++++++++\n\n- Fixed MatplotlibDeprecationWarning in Matplotlib 2.2.\n- Changed imports for jam as a package.\n- Removed example.\n\nV5.0.13: MC, Oxford, 7 March 2018\n+++++++++++++++++++++++++++++++++\n\n- Check that PSF is normalized.\n\nV5.0.12: MC, Oxford, 22 January 2018\n++++++++++++++++++++++++++++++++++++\n\n- Print a message when no PSF convolution was performed.\n- Broadcast kernel and MGE convolution loops.\n- Fixed missing tensor in assertion test.\n\nV5.0.11: MC, Oxford, 10 September 2017\n++++++++++++++++++++++++++++++++++++++\n\n- Make default ``step`` depend on ``sigmapsf`` regardless of ``pixsize``.\n\nV5.0.10: MC, Oxford, 10 August 2017\n+++++++++++++++++++++++++++++++++++\n\n- Raise an error if goodbins is all False.\n\nV5.0.9: MC, Oxford, 17 March 2017\n+++++++++++++++++++++++++++++++++\n\n- Included ``flux_obs`` keyword. Updated documentation.\n- Fixed DeprecationWarning in Numpy 1.12.\n\nV5.0.8: MC, Oxford, 17 February 2017\n++++++++++++++++++++++++++++++++++++\n\n- Use odd kernel size for convolution.\n- Fixed corner case with coordinates falling outside the\n interpolation region, due to finite machine precision.\n\nV5.0.7: MC, Oxford, 23 February 2016\n++++++++++++++++++++++++++++++++++++\n\n- Scale rmsModel by the input M/L also when rms is not given.\n Thanks to Alex Grainger (Oxford) for pointing out the inconsistency.\n- Pass ``**kwargs`` for plotting.\n\nV5.0.6: MC, Oxford, 18 September 2015\n+++++++++++++++++++++++++++++++++++++\n\n- Plot bad bins on the data.\n\nV5.0.5: MC, Oxford, 23 May 2015\n+++++++++++++++++++++++++++++++\n\n- Changed meaning of goodbins to be a boolean vector.\n\nV5.0.4: MC, Sydney, 5 February 2015\n+++++++++++++++++++++++++++++++++++\n\n- Introduced further checks on matching input sizes.\n\nV5.0.3: MC, Oxford, 31 October 2014\n+++++++++++++++++++++++++++++++++++\n\n- Modified final plot layout.\n\nV5.0.2: MC, Oxford, 25 May 2014\n+++++++++++++++++++++++++++++++\n\n- Support both Python 2.7 and Python 3.\n\nV5.0.1: MC, Oxford, 24 February 2014\n++++++++++++++++++++++++++++++++++++\n\n- Plot bi-symmetrized V_rms as in IDL version.\n\nV5.0.0: MC, Paranal, 11 November 2013\n+++++++++++++++++++++++++++++++++++++\n\n- Translated from IDL into Python.\n\nV4.1.5: MC, Paranal, 8 November 2013\n++++++++++++++++++++++++++++++++++++\n\n- Use renamed CAP_* routines to avoid potential naming conflicts.\n\nV4.1.4: MC, Oxford, 12 February 2013\n++++++++++++++++++++++++++++++++++++\n\n- Include _EXTRA and RANGE keywords for plotting.\n\nV4.1.3: MC, Oxford, 1 February 2013\n+++++++++++++++++++++++++++++++++++\n\n- Output FLUX in Lsun/pc^2.\n\nV4.1.2: MC, Oxford, 28 May 2012\n+++++++++++++++++++++++++++++++\n\n- Updated documentation.\n\nV4.1.1: MC, Oxford, 8 December 2011\n+++++++++++++++++++++++++++++++++++\n\n- Only calculates FLUX if required.\n\nV4.1.0: MC, Oxford 19 October 2010\n++++++++++++++++++++++++++++++++++\n\n- Included TENSOR keyword to calculate any of the six components of\n the symmetric proper motion dispersion tensor (as in note 5 of the paper).\n\nV4.0.9: MC, Oxford, 15 September 2010\n+++++++++++++++++++++++++++++++++++++\n\n- Plot and output with FLUX keyword the PSF-convolved MGE surface brightness.\n\nV4.0.8: MC, Oxford, 09 August 2010\n++++++++++++++++++++++++++++++++++\n\nUse linear instead of smooth interpolation. After feedback from Eric Emsellem.\n\nV4.0.7: MC, Oxford, 01 March 2010\n+++++++++++++++++++++++++++++++++\n\n- Forces q_lum && q_pot < 1.\n\nV4.0.6: MC, Oxford, 08 February 2010\n++++++++++++++++++++++++++++++++++++\n\n- The routine TEST_JAM_AXISYMMETRIC_RMS with the usage example now adopts a\n more realistic input kinematics.\n- Updated documentation.\n\nV4.0.5: MC, Oxford, 6 July 2009\n+++++++++++++++++++++++++++++++\n\n- Skip unnecessary interpolation when computing few points without PSF\n convolution. After feedback from Eric Emsellem.\n\nV4.0.4: MC, Oxford, 29 May 2009\n+++++++++++++++++++++++++++++++\n\n- Compute FLUX even when not plotting.\n\nV4.0.3: MC, Oxford 4 April 2009\n+++++++++++++++++++++++++++++++\n\n- Added keyword RBH.\n\nV4.0.2: MC, Oxford, 21 November 2008\n++++++++++++++++++++++++++++++++++++\n\n- Added keywords NRAD and NANG. Thanks to Michael Williams for\n reporting possible problems with too coarse interpolation.\n\nV4.0.1: MC, Windhoek, 29 September 2008\n+++++++++++++++++++++++++++++++++++++++\n\n- Bug fix: when ERMS was not given, the default was not properly set.\n Included keyword STEP. The keyword FLUX is now only used for output:\n the surface brightness for plotting is computed from the MGE model.\n\nV4.0.0: MC, Oxford, 11 September 2008\n+++++++++++++++++++++++++++++++++++++\n\n- Implemented PSF convolution using interpolation on polar grid.\n Dramatic speed-up of calculation. Further documentation.\n\nV3.2.0: MC, Oxford, 14 August 2008\n++++++++++++++++++++++++++++++++++\n\n- Updated documentation.\n\nV3.1.3: MC, Oxford, 12 August 2008\n++++++++++++++++++++++++++++++++++\n\n- First released version.\n\nV2.0.0: MC, Oxford, 20 September 2007\n+++++++++++++++++++++++++++++++++++++\n\n- Introduced new solution of the MGE Jeans equations with constant\n anisotropy sig_R = b*sig_z.\n\nV1.0.0: Michele Cappellari, Vicenza, 19 November 2003\n+++++++++++++++++++++++++++++++++++++++++++++++++++++\n\n- Written and tested", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://purl.org/cappellari/software", "keywords": "", "license": "Other/Proprietary License", "maintainer": "", "maintainer_email": "", "name": "jampy", "package_url": "https://pypi.org/project/jampy/", "platform": "", "project_url": "https://pypi.org/project/jampy/", "project_urls": { "Homepage": "http://purl.org/cappellari/software" }, "release_url": "https://pypi.org/project/jampy/5.0.21/", "requires_dist": null, "requires_python": "", "summary": "JamPy: Jeans Anisotropic Models of Galactic Dynamics", "version": "5.0.21" }, "last_serial": 4821627, "releases": { "5.0.17": [ { "comment_text": "", "digests": { "md5": "c6b6a625726d15695cbe7cbee7c036d4", "sha256": "b413a97abd059d26d35dc5baa8513daf103f98a26a92c3a366508a815edc1042" }, "downloads": -1, "filename": "jampy-5.0.17.tar.gz", "has_sig": false, "md5_digest": "c6b6a625726d15695cbe7cbee7c036d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47118, "upload_time": "2018-05-21T09:22:14", "url": "https://files.pythonhosted.org/packages/3f/09/ca2eefd880183d437644354a83c6d440e744cdfe01886a7ea363e3efbf26/jampy-5.0.17.tar.gz" } ], "5.0.21": [ { "comment_text": "", "digests": { "md5": "ee01ef146b627edbdace5ea119de68be", "sha256": "b0e934d3b1f1ebd56adc677c4caf105339e7ea22d4dadc3237c96496c8d6654e" }, "downloads": -1, "filename": "jampy-5.0.21.tar.gz", "has_sig": false, "md5_digest": "ee01ef146b627edbdace5ea119de68be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 56820, "upload_time": "2019-02-14T18:28:43", "url": "https://files.pythonhosted.org/packages/77/db/f8c6da6d8875cd0469e11db483660bf963b7dd4ed24ce0f38e820c76af6a/jampy-5.0.21.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ee01ef146b627edbdace5ea119de68be", "sha256": "b0e934d3b1f1ebd56adc677c4caf105339e7ea22d4dadc3237c96496c8d6654e" }, "downloads": -1, "filename": "jampy-5.0.21.tar.gz", "has_sig": false, "md5_digest": "ee01ef146b627edbdace5ea119de68be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 56820, "upload_time": "2019-02-14T18:28:43", "url": "https://files.pythonhosted.org/packages/77/db/f8c6da6d8875cd0469e11db483660bf963b7dd4ed24ce0f38e820c76af6a/jampy-5.0.21.tar.gz" } ] }