Skip to content

Instantly share code, notes, and snippets.

View FilipDominec's full-sized avatar
🙂
Happy. Basically whenever I code, I am working on something I love

Filip Dominec FilipDominec

🙂
Happy. Basically whenever I code, I am working on something I love
View GitHub Profile
@FilipDominec
FilipDominec / filter_outliers.py
Last active September 6, 2017 13:25
Clean up two-column ASCII file from "hot pixels" that differ by more than 3σ from their neighbours
#!/usr/bin/python3
#-*- coding: utf-8 -*-
"""
Do you have some "outlier" noise in your experimental data, e.g. due to "hot pixels" in spectrometer?
Run
python3 rm_outliers.py my_file.dat
and the new "my_file.dat_corrected.dat" will be free of these errors.
@FilipDominec
FilipDominec / numpy2tkinter.py
Last active January 26, 2023 12:15
Easy plotting from 2D numpy array, supporting colormaps, embossing, (un)zooming etc. Depends on TkInter + numpy only.
#!/usr/bin/python3
#-*- coding: utf-8 -*-
# License: This code is released as public domain.
import time
import numpy as np
import tkinter as tk
X_SIZE, Y_SIZE = 200, 200