23 Mar, 2023
Skip to content
  • Home
  • Gallery
  • Tutorials
  • Thomas Lecocq @ ROB
    • Research Fields
    • Publications
  • About
  • Cookie Policy

Géophysique.be

Thomas Lecocq @ the Royal Observatory of Belgium

  • Home
  • Gallery
  • Tutorials
  • Thomas Lecocq @ ROB
    • Research Fields
    • Publications
  • About
  • Cookie Policy
  • Home
  • numpy

Tag: numpy

Jacknife

24 October 201325 October 2013 Thomas LecocqPython, Tips & Tricks

The Jacknife  is also sometimes called the “Leave One Out” method, and is a method to somehow evaluate the stability of statistics done on data. By leaving one element out of the input array and studying the mean of the…

example, masked array, numpy, python, statisticsLeave a comment

Pack an Enthought Traits app inside a .exe using py2exe (Canopy Edit)

19 June 201324 September 2013 Thomas LecocqPython

10 months ago, I published the updated version of my tutorial to pack an Enthought TraitsUI based application inside an .exe Windows Executable file, using a standard Python 2.7 install and the Enthought Tool Suite 4.0 (ETS4.0). In April 2013,…

Canopy, enthought tool suite, ets, MKL, numpy, py2exe, python, tutorialLeave a comment

Meteor in Russia – Seismic Signal ?

15 February 201324 September 2013 Thomas LecocqGéophysique - Geophysics, Information, Python, Séismologie - Seismology

Very early this morning, a meteor lit up the skies of Russia, somewhere close to Ekaterinburg. Same as for the Korean Boom Boom, we wanted to have a look at the seismic data of a close-by station to check if…

earthquake, iris dmc, meteor, numpy, obspy, python2 Comments

Plot waveforms of events on a dates axis

13 February 201324 September 2013 Thomas LecocqPython, Séismologie - Seismology

Following a question from my dear colleague Devy, here is how to plot a set of events, occurring at random moments in time. The idea is to plot the waveform of each event with the beginning at the top and…

earthquake, example, matplotlib, numpy, python1 Comment

North Korean nuclear tests with Obspy

12 February 2013 Thomas LecocqPython, Séismologie - Seismology

This morning, North Korea tested some nuclear “bomb” somewhere in the middle of the country (confirmed by Pyongyang officials and CTBTO), and many seismic sensors worldwide recorded the triggered waveforms. The location of the test is the same as the…

earthquake, korea, matplotlib, nuclear, numpy, obspy, python5 Comments

New Tutorial Series: Pandas

12 February 201324 September 2013 Thomas LecocqPython

In the coming months, I’ll prepare some tutorials over an excellent data analysis package called pandas ! To show you the power of pandas, just take a look at this old tutorial, where I exploited the power of itertools to…

matplotlib, numpy, pandas, python, tutorialLeave a comment

Matplotlib & Datetimes – Tutorial 04: Grouping & Analysing Sparse Data

15 June 201215 June 2012 Thomas LecocqPython, Tips & Tricks

To extend the previous tutorial (see here), we define a data array that has some information about the event that occurred for each datetime. The plot of data vs time now looks like: The data array is constructed with numpy.random:…

colormap, dates, datetime, example, indexing, matplotlib, numpy, numpy.where, python, statistics, tutorialLeave a comment

Matplotlib & Datetimes – Tutorial 03: Grouping Sparse Data

14 June 201214 June 2012 Thomas LecocqPython, Tips & Tricks

New tutorial, more advanced this time ! Let’s say we have a number of observations, like occurrences of earthquakes, or visitors connecting to a webserver, etc. These observations don’t occur every second, they are sparse on the time axis. To…

dates, datetime, example, groupby, itertools, matplotlib, numpy, python, tutorial3 Comments

Matplotlib Basemap tutorial 09: Drawing circles

20 February 201121 February 2011 Thomas LecocqPython

In the previous tutorial, I defined a “shoot” method to compute the landing point of a shoot from one point, to a given azimuth and distance. Using this logic, it’s possible to find the points situated at a given distance…

basemap, circle, mapping, maps, matplotlib, mpl_toolkits, numpy, python, tutorial2 Comments

Numpy Trick 01

6 December 20106 December 2010 Thomas LecocqPython, Tips & Tricks

I usually forget how much Numpy makes life easy : Say, you have a 101 element array, e.g.: import numpy as np a = np.linspace(0,100,101) and you want to take every 4th item in that array, that’s as easy as…

indexing, numpy, slicing1 Comment

Numpy.ma not always necessary

2 December 20102 December 2010 Thomas LecocqPython

I just discovered that there is an easier way to do this (e.g. from tutorial06): import numpy.ma as ma mask = ma.masked_where(countries[‘ISO’] != iso, countries[‘ISO’]) country = ma.array(countries[‘country’],mask=mask.mask).compressed()[0] by using the built-in numpy.where method: import numpy as np index =…

mask, numpy, numpy.ma, numpy.where1 Comment

Search

Recent

  • Emails to SMS on a FoxBox 30 October 2014
  • Earthworm statmgr replacement 22 July 2014
  • Playing with PICs – The beginning 1 May 2014
  • Shaded Relief Map in Python 25 February 2014
  • Relief Maps in Google Earth 10 January 2014

Recent Comments

  • Thomas Lecocq on Seismicity Map and Rate using Basemap and Pandas
  • vgb on Seismicity Map and Rate using Basemap and Pandas
  • python - L'installazione di shapefile / shapelib non trovato via condã o pip on Matplotlib Basemap tutorial 10: Shapefiles Unleached, continued
  • Jon on Resistivity Data Inversion – Use R2 !
  • Jake on Matplotlib Basemap tutorial 10: Shapefiles Unleached, continued
Copyright © All rights reserved.
Start Magazine by Axle Themes
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
SAVE & ACCEPT