From fabiomolinar at gmail.com Mon Mar 4 02:02:14 2019 From: fabiomolinar at gmail.com (=?UTF-8?Q?F=C3=A1bio_Molinar?=) Date: Mon, 4 Mar 2019 08:02:14 +0100 Subject: [SciPy-User] Root Locus Analysis Message-ID: Hi everyone, I am a Controls Engineer who used to use Matlab quite frequently at the University to analyze, among other things, system's stability. I am now reading again some theoretical books on control theory to refresh my mind again with some of the theories and concepts I haven't used for a while. But since I became a python programmer and enthusiast, I am doing this review while using SciPy to program some tests and examples. And I am really enjoying using SciPy to code some of my scripts. Although I just started using it, I can't stress enough how much fun and how useful the scipy.signal package is. But, during my theory review I came upon the Root Locus Analysis and, to my disappointment, I didn't find support for it on the scipy.signal package. *Is anyone aware if there is someone working on implementing Root Locus analysis into the scipy.signal package*? I know that there is another python package called "control" which has support for many control analysis tools, including Root Locus analysis, but I would like to avoid installing yet another package into my python environment. Especially because installing the "control" python package isn't that straight-forward and requires a bunch of other packages/libraries. Yours sincerely, *F?bio Thomaz Molinar* -------------- next part -------------- An HTML attachment was scrubbed... URL: From vs at it.uu.se Tue Mar 5 18:50:05 2019 From: vs at it.uu.se (Virgil Stokes) Date: Wed, 6 Mar 2019 00:50:05 +0100 Subject: [SciPy-User] On numpy.pad(array, pad_width, mode, **kwargs) Message-ID: One mode of padding is 'mean'. However, it does not return the actual mean of the array --- it returns the rounded value of the mean! example: a = np.array([1, 2, -1, 4, -3]) np.mean(a) = 0.6 np.pad(a, (2,), 'mean') = [ 1 1 1 2 -1 4 -3 1 1] The documentation that I found at: https://docs.scipy.org/doc/numpy/reference/generated/numpy.pad.html shows: ?mean? - Pads with the mean value of all or part of the vector along each axis. It actually Pads with the rounded mean value. IMHO it should return the "float_" value. If the SciPy team does not agree, then the documentation should be changed to show what it actually returns. --V IMHO it should N?r du har kontakt med oss p? Uppsala universitet med e-post s? inneb?r det att vi behandlar dina personuppgifter. F?r att l?sa mer om hur vi g?r det kan du l?sa h?r: http://www.uu.se/om-uu/dataskydd-personuppgifter/ E-mailing Uppsala University means that we will process your personal data. For more information on how this is performed, please read here: http://www.uu.se/en/about-uu/data-protection-policy -------------- next part -------------- An HTML attachment was scrubbed... URL: From ralf.gommers at gmail.com Fri Mar 8 15:15:11 2019 From: ralf.gommers at gmail.com (Ralf Gommers) Date: Fri, 8 Mar 2019 12:15:11 -0800 Subject: [SciPy-User] Root Locus Analysis In-Reply-To: References: Message-ID: On Sun, Mar 3, 2019 at 11:00 PM F?bio Molinar wrote: > Hi everyone, > > I am a Controls Engineer who used to use Matlab quite frequently at the > University to analyze, among other things, system's stability. I am now > reading again some theoretical books on control theory to refresh my mind > again with some of the theories and concepts I haven't used for a while. > > But since I became a python programmer and enthusiast, I am doing this > review while using SciPy to program some tests and examples. And I am > really enjoying using SciPy to code some of my scripts. Although I just > started using it, I can't stress enough how much fun and how useful the > scipy.signal package is. > > But, during my theory review I came upon the Root Locus Analysis and, to > my disappointment, I didn't find support for it on the scipy.signal > package. *Is anyone aware if there is someone working on implementing > Root Locus analysis into the scipy.signal package*? > Not that I am aware of. > I know that there is another python package called "control" which has > support for many control analysis tools, including Root Locus analysis, but > I would like to avoid installing yet another package into my python > environment. Especially because installing the "control" python package > isn't that straight-forward and requires a bunch of other > packages/libraries. > python-control may be your best bet. If you're on Windows yes, the Slycot dependency will be very hard to install. On other platforms it should be easy, especially if you use conda (conda-forge packages for macOS and Linux are available). Cheers, Ralf > Yours sincerely, > > *F?bio Thomaz Molinar* > _______________________________________________ > SciPy-User mailing list > SciPy-User at python.org > https://mail.python.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From moorepants at gmail.com Fri Mar 8 15:53:23 2019 From: moorepants at gmail.com (Jason Moore) Date: Fri, 8 Mar 2019 12:53:23 -0800 Subject: [SciPy-User] Root Locus Analysis In-Reply-To: References: Message-ID: slycot now builds on Windows using scikit-build, so not as painful anymore. Binaries will eventually be on conda-forge too. Jason moorepants.info +01 530-601-9791 On Fri, Mar 8, 2019 at 12:15 PM Ralf Gommers wrote: > > > On Sun, Mar 3, 2019 at 11:00 PM F?bio Molinar > wrote: > >> Hi everyone, >> >> I am a Controls Engineer who used to use Matlab quite frequently at the >> University to analyze, among other things, system's stability. I am now >> reading again some theoretical books on control theory to refresh my mind >> again with some of the theories and concepts I haven't used for a while. >> >> But since I became a python programmer and enthusiast, I am doing this >> review while using SciPy to program some tests and examples. And I am >> really enjoying using SciPy to code some of my scripts. Although I just >> started using it, I can't stress enough how much fun and how useful the >> scipy.signal package is. >> >> But, during my theory review I came upon the Root Locus Analysis and, to >> my disappointment, I didn't find support for it on the scipy.signal >> package. *Is anyone aware if there is someone working on implementing >> Root Locus analysis into the scipy.signal package*? >> > > Not that I am aware of. > > >> I know that there is another python package called "control" which has >> support for many control analysis tools, including Root Locus analysis, but >> I would like to avoid installing yet another package into my python >> environment. Especially because installing the "control" python package >> isn't that straight-forward and requires a bunch of other >> packages/libraries. >> > > python-control may be your best bet. If you're on Windows yes, the Slycot > dependency will be very hard to install. On other platforms it should be > easy, especially if you use conda (conda-forge packages for macOS and Linux > are available). > > Cheers, > Ralf > > > > >> Yours sincerely, >> >> *F?bio Thomaz Molinar* >> _______________________________________________ >> SciPy-User mailing list >> SciPy-User at python.org >> https://mail.python.org/mailman/listinfo/scipy-user >> > _______________________________________________ > SciPy-User mailing list > SciPy-User at python.org > https://mail.python.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joseph.slater at wright.edu Fri Mar 8 16:42:30 2019 From: joseph.slater at wright.edu (Slater, Joseph C.) Date: Fri, 8 Mar 2019 21:42:30 +0000 Subject: [SciPy-User] Root Locus Analysis In-Reply-To: References: Message-ID: <6F609523-E826-4A31-8BDB-F802F0770FB6@wright.edu> Also of note for control design: https://github.com/ilayn/harold (Trying to do without slycot) and https://github.com/alchemyst/Skogestad-Python (Robust control) Neither solves the problem at hand, but broader awareness can only help. Best Regards- Joe On Mar 8, 2019, at 3:53 PM, Jason Moore > wrote: slycot now builds on Windows using scikit-build, so not as painful anymore. Binaries will eventually be on conda-forge too. Jason moorepants.info +01 530-601-9791 On Fri, Mar 8, 2019 at 12:15 PM Ralf Gommers > wrote: On Sun, Mar 3, 2019 at 11:00 PM F?bio Molinar > wrote: Hi everyone, I am a Controls Engineer who used to use Matlab quite frequently at the University to analyze, among other things, system's stability. I am now reading again some theoretical books on control theory to refresh my mind again with some of the theories and concepts I haven't used for a while. But since I became a python programmer and enthusiast, I am doing this review while using SciPy to program some tests and examples. And I am really enjoying using SciPy to code some of my scripts. Although I just started using it, I can't stress enough how much fun and how useful the scipy.signal package is. But, during my theory review I came upon the Root Locus Analysis and, to my disappointment, I didn't find support for it on the scipy.signal package. Is anyone aware if there is someone working on implementing Root Locus analysis into the scipy.signal package? Not that I am aware of. I know that there is another python package called "control" which has support for many control analysis tools, including Root Locus analysis, but I would like to avoid installing yet another package into my python environment. Especially because installing the "control" python package isn't that straight-forward and requires a bunch of other packages/libraries. python-control may be your best bet. If you're on Windows yes, the Slycot dependency will be very hard to install. On other platforms it should be easy, especially if you use conda (conda-forge packages for macOS and Linux are available). Cheers, Ralf Yours sincerely, F?bio Thomaz Molinar _______________________________________________ SciPy-User mailing list SciPy-User at python.org https://mail.python.org/mailman/listinfo/scipy-user _______________________________________________ SciPy-User mailing list SciPy-User at python.org https://mail.python.org/mailman/listinfo/scipy-user _______________________________________________ SciPy-User mailing list SciPy-User at python.org https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.python.org_mailman_listinfo_scipy-2Duser&d=DwICAg&c=3buyMx9JlH1z22L_G5pM28wz_Ru6WjhVHwo-vpeS0Gk&r=rEyLMZFJ7eh_1iNO7KnqQcXbAnZbNOjKNJqN1v2jbrM&m=TSDmw5C_pMHHU9XEr6WBjtatVCGV9jkt9tsMicXuEpo&s=33DJzkrwfG-zpaW0uDpzZXxBUuaZG-PrW8YtSyVdWZM&e= Professor & Chair ~~~~~~~~~~~~~~~~~~~~~~~~ (+1) 937-775-5040 https://people.wright.edu/joseph.slater -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilhanpolat at gmail.com Sat Mar 9 06:22:41 2019 From: ilhanpolat at gmail.com (Ilhan Polat) Date: Sat, 9 Mar 2019 12:22:41 +0100 Subject: [SciPy-User] Root Locus Analysis In-Reply-To: <6F609523-E826-4A31-8BDB-F802F0770FB6@wright.edu> References: <6F609523-E826-4A31-8BDB-F802F0770FB6@wright.edu> Message-ID: I am the author of the first package that Joseph linked to (thank you for mentioning it). I don't know which version but it is now available in python-control package 0.8.1 I don't have Slycot and seemingly it is not needed for this functionality import control as cnt G = cnt.rss(5) cnt.root_locus(Gc, Plot=True); would give you a decent Root Locus plot (note the final semicolon). Some clickability is introduced but I didn't use it yet. Having said that, here is some rant; I have actually thought about this for a while and decided that there is nothing that this analysis brings in and is an artifact of the past only used to pester students. What root locus analysis does is to find out when a particular gain value causes a SISO system to go unstable under static gain feedback. Kind of a routh-hurwitz in a for loop. There can only be a single gain as a parameter and the system is strictly SISO. Hence the application scope is severely limited and cripples the curiosity of the interested students. Also it really doesn't give much of an insight. Instead consider the following home-baked plot inside an IPython notebook. I only spent about 15 minutes for this hence there is so much that can be polished but I hope it demonstrates the idea %matplotlib inline import numpy as np import matplotlib.pyplot as plt from ipywidgets import interactive from ipywidgets import FloatSlider from IPython.display import display # You don't really need harold for this, scipy.signal, python-control is also fine # We just need two polynomials representing num and den # For state models it is a bit more tedious but still simple from harold import Transfer, haroldpolyadd G = Transfer([1, 2, -3, 1], [1, -1, 3, 5, 4]) def rlocus_demo(K=1): # polyadd is here only because it takes care of addition of different lengths r = np.roots(haroldpolyadd(G.den[0], K*G.num[0])) print(r) # plt.scatter(roots.real, roots.imag) plt.xlim((r.real.min()-1,r.real.max()+1)) plt.ylim((r.imag.min()-1,r.imag.max()+1)) plt.scatter(r.real, r.imag) plt.ylabel('Imaginary') plt.xlabel('Real') plt.grid() K_slider = FloatSlider(min=1, max=50, step=0.2, value=1) w=interactive(rlocus_demo,K=K_slider) display(w) Paste it in a notebook cell and you have an interactive pzmap. Just by interacting with the slider we see things swap around from stable to unstable etc. and later towards the end suddenly you get a pair coinciding. Then you start to question things about why. You can take it from here to make other incredible things, adding more parameters with sliders, other plants, checking the effect of delays etc. Thus it is the concept of simultaneous pole motion and not the plot type itself that matters. Unfortunately this message is lost some time ago and we are stuck with plots of the 1950s (matlab has a big role in this unfortunately). Root locus curves were a big thing when we didn't have computing power at our disposal but hardly ever applies today. I guess it is not going away out of the curriculum anytime soon. I'll add this to my todo list and ping when I add that. Best, ilhan On Fri, Mar 8, 2019 at 10:43 PM Slater, Joseph C. wrote: > Also of note for control design: > > https://github.com/ilayn/harold (Trying to do without slycot) > and https://github.com/alchemyst/Skogestad-Python (Robust control) > > Neither solves the problem at hand, but broader awareness can only help. > > Best Regards- Joe > > > On Mar 8, 2019, at 3:53 PM, Jason Moore wrote: > > slycot now builds on Windows using scikit-build, so not as painful > anymore. Binaries will eventually be on conda-forge too. > > Jason > moorepants.info > > +01 530-601-9791 > > > On Fri, Mar 8, 2019 at 12:15 PM Ralf Gommers > wrote: > >> >> >> On Sun, Mar 3, 2019 at 11:00 PM F?bio Molinar >> wrote: >> >>> Hi everyone, >>> >>> I am a Controls Engineer who used to use Matlab quite frequently at the >>> University to analyze, among other things, system's stability. I am now >>> reading again some theoretical books on control theory to refresh my mind >>> again with some of the theories and concepts I haven't used for a while. >>> >>> But since I became a python programmer and enthusiast, I am doing this >>> review while using SciPy to program some tests and examples. And I am >>> really enjoying using SciPy to code some of my scripts. Although I just >>> started using it, I can't stress enough how much fun and how useful the >>> scipy.signal package is. >>> >>> But, during my theory review I came upon the Root Locus Analysis and, to >>> my disappointment, I didn't find support for it on the scipy.signal >>> package. *Is anyone aware if there is someone working on implementing >>> Root Locus analysis into the scipy.signal package*? >>> >> >> Not that I am aware of. >> >> >>> I know that there is another python package called "control" which has >>> support for many control analysis tools, including Root Locus analysis, but >>> I would like to avoid installing yet another package into my python >>> environment. Especially because installing the "control" python package >>> isn't that straight-forward and requires a bunch of other >>> packages/libraries. >>> >> >> python-control may be your best bet. If you're on Windows yes, the Slycot >> dependency will be very hard to install. On other platforms it should be >> easy, especially if you use conda (conda-forge packages for macOS and Linux >> are available). >> >> Cheers, >> Ralf >> >> >> >> >>> Yours sincerely, >>> >>> *F?bio Thomaz Molinar* >>> _______________________________________________ >>> SciPy-User mailing list >>> SciPy-User at python.org >>> https://mail.python.org/mailman/listinfo/scipy-user >>> >>> >> _______________________________________________ >> SciPy-User mailing list >> SciPy-User at python.org >> https://mail.python.org/mailman/listinfo/scipy-user >> >> > _______________________________________________ > SciPy-User mailing list > SciPy-User at python.org > > https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.python.org_mailman_listinfo_scipy-2Duser&d=DwICAg&c=3buyMx9JlH1z22L_G5pM28wz_Ru6WjhVHwo-vpeS0Gk&r=rEyLMZFJ7eh_1iNO7KnqQcXbAnZbNOjKNJqN1v2jbrM&m=TSDmw5C_pMHHU9XEr6WBjtatVCGV9jkt9tsMicXuEpo&s=33DJzkrwfG-zpaW0uDpzZXxBUuaZG-PrW8YtSyVdWZM&e= > > > Professor & Chair > ~~~~~~~~~~~~~~~~~~~~~~~~ > (+1) 937-775-5040 > https://people.wright.edu/joseph.slater > > _______________________________________________ > SciPy-User mailing list > SciPy-User at python.org > https://mail.python.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ejsaiet at alaska.edu Sat Mar 16 20:58:42 2019 From: ejsaiet at alaska.edu (Eyal Saiet) Date: Sat, 16 Mar 2019 16:58:42 -0800 Subject: [SciPy-User] Fwd: Discrete Fourier transforms (scipy.fftpack)- radially averaged power spectrum(RAPS) In-Reply-To: References: Message-ID: Hello, The scipy.fftpack is quite a comprehensive toolset. Nonetheless, I am scratching my head why I cannot find a radially averaged power spectrum(RAPS) tool in scipy.fftpack which seems a natural complementary tool for an FFT toolset. Do people just write the function for themselves? Or is it somewhere else already? * The radially averaged power spectrum(RAPS) is s the direction-independent mean spectrum, i.e. the average of all possible directional power spectra. The radially averaged power spectrum provides a convenient means to view and compare information contained in 2-D spectra in 1-D. This function computes and plots the RAPS of an input matrix (does not consider corner values outside averaging radius). The image can be rectangular but must be 2-D (e.g., multi-color channel data is not supported). The spatial resolution of the data is also specified (https://www.mathworks.com/matlabcentral/fileexchange/23636-radially-averaged-power-spectrum-of-2d-real-valued-matrix ) *This tool was in Astropy 2.7 but I cannot find it Astropy 3.1.... Thanks -- Eyal -------------- next part -------------- An HTML attachment was scrubbed... URL: From ejsaiet at alaska.edu Wed Mar 20 04:31:14 2019 From: ejsaiet at alaska.edu (Eyal Saiet) Date: Wed, 20 Mar 2019 00:31:14 -0800 Subject: [SciPy-User] Discrete Fourier transforms (scipy.fftpack)- radially averaged power spectrum(RAPS) In-Reply-To: References: Message-ID: Checking if this email made it through the scipy community!? On Sat, Mar 16, 2019 at 4:49 PM Eyal Saiet wrote: > Hello, > The scipy.fftpack is quite a comprehensive toolset. Nonetheless, I am > scratching my head why I cannot find a radially averaged power > spectrum(RAPS) tool in scipy.fftpack which seems a natural complementary > tool for an FFT toolset. Do people just write the function for themselves? > Or is it somewhere else already? > > * The radially averaged power spectrum(RAPS) is s the > direction-independent mean spectrum, i.e. the average of all possible > directional power spectra. The radially averaged power spectrum provides a > convenient means to view and compare information contained in 2-D spectra > in 1-D. This function computes and plots the RAPS of an input matrix (does > not consider corner values outside averaging radius). The image can be > rectangular but must be 2-D (e.g., multi-color channel data is not > supported). The spatial resolution of the data is also specified (https://www.mathworks.com/matlabcentral/fileexchange/23636-radially-averaged-power-spectrum-of-2d-real-valued-matrix > ) > > *This tool was in Astropy 2.7 but I cannot find it Astropy 3.1.... > > Thanks > -- > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jerome.kieffer at esrf.fr Wed Mar 20 05:07:19 2019 From: jerome.kieffer at esrf.fr (Jerome Kieffer) Date: Wed, 20 Mar 2019 10:07:19 +0100 Subject: [SciPy-User] Discrete Fourier transforms (scipy.fftpack)- radially averaged power spectrum(RAPS) In-Reply-To: References: Message-ID: <20190320100719.25328a6f@mac13.esrf.fr> On Wed, 20 Mar 2019 00:31:14 -0800 Eyal Saiet wrote: > Checking if this email made it through the scipy community!? I agree it would be interesting, for me at least. But I have my own implementation From ralf.gommers at gmail.com Fri Mar 22 15:14:57 2019 From: ralf.gommers at gmail.com (Ralf Gommers) Date: Fri, 22 Mar 2019 12:14:57 -0700 Subject: [SciPy-User] Discrete Fourier transforms (scipy.fftpack)- radially averaged power spectrum(RAPS) In-Reply-To: References: Message-ID: On Wed, Mar 20, 2019 at 1:32 AM Eyal Saiet wrote: > Checking if this email made it through the scipy community!? > > On Sat, Mar 16, 2019 at 4:49 PM Eyal Saiet wrote: > >> Hello, >> The scipy.fftpack is quite a comprehensive toolset. Nonetheless, I am >> scratching my head why I cannot find a radially averaged power >> spectrum(RAPS) tool in scipy.fftpack which seems a natural complementary >> tool for an FFT toolset. Do people just write the function for themselves? >> Or is it somewhere else already? >> > I'm not aware on any implementation. It would be a bit too specialized to put in scipy probably. >> * The radially averaged power spectrum(RAPS) is s the >> direction-independent mean spectrum, i.e. the average of all possible >> directional power spectra. The radially averaged power spectrum provides a >> convenient means to view and compare information contained in 2-D spectra >> in 1-D. This function computes and plots the RAPS of an input matrix (does >> not consider corner values outside averaging radius). The image can be >> rectangular but must be 2-D (e.g., multi-color channel data is not >> supported). The spatial resolution of the data is also specified (https://www.mathworks.com/matlabcentral/fileexchange/23636-radially-averaged-power-spectrum-of-2d-real-valued-matrix >> ) >> >> *This tool was in Astropy 2.7 but I cannot find it Astropy 3.1.... >> > I would suggest to ask the AstroPy team why it was removed, or just get the implementation from their older version and use that. Cheers, Ralf >> Thanks >> -- >> > > _______________________________________________ > SciPy-User mailing list > SciPy-User at python.org > https://mail.python.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cimrman3 at ntc.zcu.cz Tue Mar 26 09:41:14 2019 From: cimrman3 at ntc.zcu.cz (Robert Cimrman) Date: Tue, 26 Mar 2019 14:41:14 +0100 Subject: [SciPy-User] ANN: SfePy 2019.1 Message-ID: <8c391e1e-5cc6-dbb6-864a-65e49d5874cf@ntc.zcu.cz> I am pleased to announce release 2019.1 of SfePy. Description ----------- SfePy (simple finite elements in Python) is a software for solving systems of coupled partial differential equations by the finite element method or by the isogeometric analysis (limited support). It is distributed under the new BSD license. Home page: http://sfepy.org Mailing list: https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/ Git (source) repository, issue tracker: https://github.com/sfepy/sfepy Highlights of this release -------------------------- - automatic fallback for linear solvers - quadratic eigenvalue problem solver For full release notes see [1]. Cheers, Robert Cimrman [1] http://docs.sfepy.org/doc/release_notes.html#id1 --- Contributors to this release in alphabetical order: Robert Cimrman Lubos Kejzlar Vladimir Lukes