18 Jun, 2025
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
  • Tips & Tricks

Category: Tips & Tricks

Emails to SMS on a FoxBox

30 October 20147 November 2019 Thomas LecocqPython, Tips & Tricks

Our Belgian Earthquake Emergency Report System (BEERS) detects abnormal visitor fluxes on the http://www.seismologie.be website and sends emails & SMS whenever some threshold is met. Recently, we have upgraded our sms machinery to FoxBox and for some weird reasons, the…

Leave a comment

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

Old 16bit DOS programs on Windows 7 (x64)

19 February 201324 September 2013 Thomas LecocqInformation, Tips & Tricks

We needed to execute an old-but-working 16bits program to locate earthquakes called “HypoEllipse” (source), but calling it from the Windows 7 x64 boxes resulted in a nice : Bam ! Not working, sorry for you… No ! I say No…

16 bits, dos, earthquake, location, windows 74 Comments

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 & Datetimes – Tutorial 02: Bar Plot

8 June 20128 June 2012 Thomas LecocqPython, Tips & Tricks

To add some interesting information to the previous tutorial, I’ve downloaded the number of licence plates given for new cars in Belgium for the same time span: 2005 587764 2006 633570 2007 644313 2008 652590 2009 571001 2010 642086 2011…

dates, fuel prices, matplotlib, python, statistics, tutorialLeave a comment

Matplotlib & Datetimes – Tutorial 01: Fuel Prices

8 June 20128 June 2012 Thomas LecocqPython, Tips & Tricks

Anyone who has played a little with dates know how painful it can be… Even more when you want to plot this data !! Matplotlib provides (link) a dates API, but to be honnest, even if the documentation is well…

dates, datetime, matplotlib, python, statistics, tutorial2 Comments

Matplotlib Basemap tutorial 07: Shapefiles unleached

27 January 201113 February 2013 Thomas LecocqPython, Tips & Tricks

New version here Following a question in the matplotlib mailing list, I dug inside the code of readshapefile, in order to gain power : The goal: The data: http://www.gadm.org/ saved inside a new “borders/” folder ! The idea: Opening a…

basemap, dbf, matplotlib, mpl_toolkits, python, shapefile18 Comments

Matplotlib Fonts (plots, basemaps, etc.)

7 December 20108 December 2010 Thomas LecocqPython, Tips & Tricks

Here is the trick (well documented on the matplotlib webpage) to define the font family and size of what appears on your matplotlib plot:

basemap, configuration, customize, font, matplotlib1 Comment

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

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

  • Natalia Poiata on Matplotlib Basemap tutorial 09: Drawing circles
  • 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 !
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