Package: apsg
What is APSG?APSG is the package for structural geologists. It defines several new python classes to easily manage, analyze and visualize orientational structural geology data.Major changes in class names and API from version 1.0.0APSG has been significantly refactored from version 1.0 and several changes are
breaking backward compatibility. The main APSG namespace provides often-used
classes in lowercase names as aliases toPascalCaseconvention used in
modules to provide a simplified interface for users. ThePascalCasenames of
classes use longer and plain English names instead acronyms for better
readability.Checkdocumentationfor more details.RequirementsYou need Python 3.8 or later to run APSG. The package requiresNumPyandSciPy, andMatplotlib.Quick startAPSG can be installed using pip:pip install apsgIf you want to run the latest version of the code, you can install it from git:pip install git+https://github.com/ondrolexa/apsg.gitAlternatively, you can download the package manually from the GitHub repositoryhttps://github.com/ondrolexa/apsg, unzip it, navigate into the package, and use the command:python setup.py installorpip install .Upgrading via pipTo upgrade an existing version of APSG from PyPI, executepip install apsg --upgrade --no-depsPlease note that the dependencies (Matplotlib, NumPy and SciPy) will also be upgraded if you omit the--no-depsflag; use the--no-deps("no dependencies") flag if you don't want this.CondaThe APSG package is also available onconda-forgechannel.Current release infoNameDownloadsVersionPlatformsInstalling apsgInstallingapsgfrom theconda-forgechannel can be achieved by addingconda-forgeto your channels with:conda config --add channels conda-forgeOnce theconda-forgechannel has been enabled,apsgcan be installed with:conda install apsgIt is possible to list all of the versions ofapsgavailable on your platform with:conda search apsg --channel conda-forgeDocumentationExplore the full features of APSG. You can find detailed documentationhere.ContributingMost discussion happens onGithub. Feel free to openan issueor comment on any open issue or pull request. CheckCONTRIBUTING.mdfor more details.DonateAPSG is an open-source project, available for you for free. It took a lot of time and resources to build this software. If you find this software useful and want to support its future development please consider donating me.LicenseAPSG is free software: you can redistribute it and/or modify it under the terms of the MIT License. A copy of this license is provided inLICENSEfile.Changes1.1.4 (Dec 13 2023)Ellipsoid repr bugfix1.1.3 (Oct 23 2023)Bugfix releaseslip and dilatation tendency methods added to stressproj alias of project for FeatureSet added1.1.2 (Oct 09 2023)added title_kws argument for plotting routines1.1.1 (Oct 06 2023)sigma estimate contour fix1.1.0 (Oct 04 2023)APSG offers convenient pandas integration via pandas accessors.See documentation and Pandas interface tutorial for further details.StereoNet tensor method addedCluster class renamed to ClusterSet1.0.3 (Apr 30 2023)lambda properties of tensors renamed to Scursor coordinates in stereonet show lin and fol1.0.1 (Nov 22 2022)density_lookup method implemented for StereoNet.gridStress tensor sigma* properties using inverted order of eigenvaluesrender2fig method of StereoNet implementedvector-like objects are not iterable, so properly render in pandas1.0.0 (Oct 7 2022)New major releaseAPSG has been significantly refactored from version 1.0 and several changes are
breaking backward compatibility. The main APSG namespace provides often-used
classes in lowercase names as aliases toPascalCaseconvention used in
modules to provide a simplified interface for users. ThePascalCasenames of
classes use longer and plain English names instead acronyms for better
readability.See documentation for further details.0.7.3 (Oct 6 2022)figure window title removed from StereoNetfor future only bugfixes planned, foo further development see versions >=1.00.7.2 (Oct 6 2022)bugfix release0.7.1 (Jul 13 2021)paleomag rs3 input/output improvedSimple SQLAlchemy API to sdb database implementedStereoNet arc method fixedStereoNet polygon method added0.7.0 (Feb 3 2021)Python 2 support droppedRosePlot addedOrtensor has from_pairs method for Lisle tensor for orthogonal dataStereoNet scatter method has labels kwarg to show hover annotations0.6.3 (Dec 6 2019)Python 2/3 compatibility fix0.6.2 (Dec 6 2019)few minor bugs fixedStereogrid apply_func passes Vec3 instead numpy arrayPair H method to get mutual rotation implementedvelgrad method of DefGrad accepts steps kwarg
to generate list of DefGrad tensorsAdded Tensor class to work with deformation tensors0.6.1 (Dec 12 2018)Stereogrid always use Euclidean norms as weightsDefGrad properties e1, e2, e3 (natural principal strains) addedDefGrad properties eoct, goct (octahedral strains) addedDefGrad from_ratios class method addedDefGrad properties k, d, K, D (strain symmetries and intesities) addedNew class Ellipsoid added to work with ellipsoidsFabricPLot renamed to VollmerPlot for consistencyRamsayPlot, FlinnPlot and HsuPlot implementedAll fabric plots have new path method accepting list of tensors0.6.0 (Nov 7 2018)Stress always gives eigenvalues sortedStress I1, I2, I3 properties for invariants implementedStress mean_stress property implementedStress hydrostatic and deviatoric properties implementedprecision added to settings to control numerical comparismsfigsize added to settings to control figure size across APSGAnimation examples fixedrand class method implemented for Fol, Lin, Vec3 and Pair to
generate random instanceGroup to_csv and from_csv improvedSDB tags method works properly for multiple tagsSDB can modify database metadataQGIS 3 plugin ReadSDB compatibility0.5.4 (Oct 19 2018)StereoNet has cbpad keyword for colorbar paddingFabricPlot bug introduced in 0.5.2 fixed.0.5.3 (Oct 10 2018)Bugfix release0.5.2 (Oct 10 2018)Fischer distribution sampling addedtransform method has norm kwarg to normalize tranformed vectorsaxisangle property to calculate axis and angle from rotation matrixStereoNet arc method addedVec3 and Group upper and flip properties implementedDefGrad, VelGrad and Stress rotate method accepts also rotation matrixvelgrad method added to DefGrad to calculate matrix logarithmStereoGrid has new methods max, min, max_at, min_at0.5.1 (Dec 5 2017)Kent distribution sampling addedAutomatic kernel density estimate for contouringUserWarnings fix0.5.0 (Nov 19 2017)bux fix minor release0.4.4 (Mar 25 2017)Group method centered improvedGroup method halfspace added to reorient all vectors towards resultant
halfspace0.4.3 (Mar 25 2017)Stress tensor with few basic methods implementedStereoGrid keyword argument 'weighted' to control weightingStereoNet kwargs are passed to underlying methods for immediate plotsStereoNet tensor method implemented (draw eigenlins or fols based on
fol_plot settings)Group totvar property and dot and proj methods implementedFol and Lin dot method returns absolute value of dot productVec3 H method to get mutual rotation implementedStereoNet.contourf method draw contour lines as well by default. Option
clines controls it.centered bug fixedStereoNet allows simple animations. Addanimate=Truekwarg to plotting
method and finally call StereoNet animate method.0.4.1-2 (Mar 4 2017)bugfix0.4.0 (Mar 4 2017)Density class renamed to StereoGridFault sense under rotation fixedFaultSet example providedAngelier-Mechler dihedra method implemented for FaultSetStereoNet accepts StereoGrid and Ortensor as quick plot argumentsStereoNet instance has axtitle method to put text below stereonet0.3.7 (Jan 5 2017)conda build for all platformsnumpy, matplotlib and other helpres imported by defaultortensor is normed by defaultortensor MADp, MADo, MAD and kind properties added0.3.6 (Jan 3 2017)shell script iapsg opens interactive console0.3.5 (Nov 12 2016)Simple settings interface implemented in in apsg.core.seetings dictionary.
To change settings use:from apsg.core import settings
setting['name']=valuenotationsetting with valuesddorrhrcontrol how azimuth argument of
Fol is represented.vec2ddsetting with valuesTrueorFalsecontrol howVec3is
represented.Vec3 could be instantiated by one arument (vector like), 2 arguments
(azimuth, inclination) or 3 arguments (azimuth, inclination, magnitude).Group and FaultSet can return array or list of user-defined attributes of
all elements0.3.4 (Jun 20 2016)RTD fix0.3.3 (Jun 4 2016)Added E1,E2,E3 properties and polar decomposition method to DefGrad objectStereoNet has vector method to mimics lower and upper hemisphere plotting
of Lin and Vec3 objects as used in paleomagnetic plotsStereoNet could be initialized with subplotsrake method of Fol added to return vector defined by rakeDensity could be initialized without data for user-defined calculations
New method apply_func could be used to calculate densityContour(f) methods accept Density object as argumentAdded Group class methods to generate Spherical Fibonacci and Golden Section
based uniform distributions of Vec3, Lin and Fol0.3.2 (Feb 22 2016)FabricPlot - triangular fabric plot added.asvec3 property has .V aliasResultant of Fol and Lin is calculated as vectorial in centered positiondv property of Fol added to return dip slip vector0.3.1 (Nov 20 2015)SDB class improved. Support basic filtering including tagsStereoNet has close method to close figure and new method
to re-initialize figure when closed in interactive modeiapsg shell script added to invoke apsg ipython shell0.3.0 (Nov 9 2015)Group fancy indexing implemented. Group could be indexed by sequences
of indexes like list, tuple or array as well as sliced.Cluster class with hierarchical clustering implementedGroup to_file and from_file methods implemented to store data in fileGroup copy method for shallow copy implementedStereoNet now accept Vec3 and Fault object as well for instant plotting.Ortensor updated with new properties E1,E2,E3 and Vollmer(1989) indexes
P,G,R and C. Bug in Woodcocks's shape and strength values fixed.uniform_lin and uniform_fol improved.asvec3 method implemented for Fol and Linfol_plot property of StereoNet allows choose poles or great circles for
immediate plottingbootstrap method of Group provide generator of random resampling with
replacements.Group examples method provide few well-known datasets.Matplotlib deprecation warnings are ignored by default0.2.3 (Oct 21 2015)New Docstrings formatStereoNet.getfols method bug fixed.Shell scripts to run interactive session improved.0.2.2 (Apr 17 2015)FaultSet class added. Fault and Hoeppner methods of StereoNet implementedVelGrad and DefGrad classes used for transformations addedG class to quickly create groups from strings added.0.2.1 (Dec 9 2014)Quick plotting of groups fixed.0.2.0 (Dec 9 2014)new StereoNet class for Schmidt projectionQuick plot when data are passed as argumentStereoNetclass instantiationmplstereonet dependency depreceatednewPairandFaultclasses to manipulate paired data (full support in future)newuniform_linanduniform_folGroupmethodsabs forGroupimplemented to calculate euclidean normsnewGroupmethod normalizednewGroupproperties and methods to calculate spherical statistics0.1.0 (Nov 1 2014)First release of APSG