Skip to content

Instantly share code, notes, and snippets.

View arisada's full-sized avatar

Aris Adamantiadis arisada

View GitHub Profile
@arisada
arisada / sortpics.py
Created June 20, 2022 10:21
Sort Sony ARW files for astrophotography
#!/usr/bin/env python3
"""
Automatically move Sony ARW raw files into directories based on the guessed
content (brut/flat/offset/dark/darkflat).
Usage: ./sortpics.py *.ARW
"""
import sys
import os
#!/usr/bin/env python3
import usb.core
import usb.util
import usb.control
import time
cmd_calibrate = [0x03, 0x7e, 0x5a, 0x01, 0x01]
#bidirectional
cmd_setpos_bi = [0x03, 0x7e, 0x5a, 0x01, 0x3]
#!/usr/bin/env python3
from sympy import symbols, init_printing, simplify, diff
from sympy.utilities.codegen import codegen
import numpy as np
import re
import os
import pyopencl as cl
# https://docs.sympy.org/latest/tutorials/intro-tutorial/intro.html
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python3
"""This script patches PixInsight 1.8.9-2 to nop the call to QWidget::raise()
in PixInsightWorkspace::OnMainWindowUnblocked().
This works around the very annoying behavior of PixInsight putting itself
as top window when it receives focus. This happens often when you have other
windows open on top of Pix and you have "focus follows mouse" active in your
WM.
Tested for me, your mileage may vary.
This doesn't circumvent any security from PI.