Skip to content

Instantly share code, notes, and snippets.

View bodokaiser's full-sized avatar
😀
Happy to be here!

Bodo Kaiser bodokaiser

😀
Happy to be here!
View GitHub Profile
import spcm
import math
from spcm import units
import numpy as np
size = 100
f0 = np.linspace(85.0e6, 121.0e6, size)
f1 = np.linspace(84.5e6, 120.5e6, size)
import spcm
import numpy as np
# Define frequency ranges for each channel
ch0_freqs = np.linspace(85.0e6, 121.0e6, 3)
ch1_freqs = np.linspace(84.5e6, 120.5e6, 3)
# Assign cores to each channel
ch0_cores = np.concatenate((np.arange(0, 8), np.arange(12, 20)))
ch1_cores = np.concatenate((np.arange(8, 12), [20]))
import os
import spcm
import logging
import time
import argparse
import numpy as np
from itertools import chain
from functools import reduce
loglevel = os.getenv("LOGLEVEL", "WARNING").upper()
@bodokaiser
bodokaiser / main.py
Created June 17, 2024 12:19
Generates the RF spectrum to create a tweezer array using AODs
import spcm
from spcm import units
import numpy as np
config = {
# 18925: {
# "path": "/dev/spcm0",
# "freq": np.linspace(84.5, 120.5, 3),
# "freq": [(120.5+84.5)/2]
# },
@bodokaiser
bodokaiser / Dockerfile
Created May 3, 2024 09:17
Docker development environment for building gatewares using artiq
FROM nixos/nix:2.21.2
RUN mkdir -p /root/.config/nix
COPY nix.conf /root/.config/nix
WORKDIR /app
COPY flake.nix .
RUN nix develop .
package main
import (
"log"
"net"
"net/http"
"os"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
@bodokaiser
bodokaiser / main.go
Created July 20, 2023 09:54
HTTP Server logging everything sent and received on the TCP socket.
package main
import (
"bufio"
"fmt"
"log"
"net"
"net/http"
)
@bodokaiser
bodokaiser / sri.py
Created July 6, 2023 08:36
Python class for the Stanford Research Instruments (SRI) PTC10 temperature (PID) controller
from telnetlib import Telnet
class PTC10:
def __init__(self, host: str, port=None):
self.host = host
self.port = port
def oven_power(self):
with Telnet(self.host, self.port) as conn:
@bodokaiser
bodokaiser / fused-silica-refractive-index.jl
Created June 28, 2023 07:29
Refractive indices for fused silica using the Sellmeier equation
### A Pluto.jl notebook ###
# v0.19.24
using Markdown
using InteractiveUtils
# ΓòöΓòÉΓòí ec26df3c-14b8-11ee-282f-c51a3afd5185
begin
using Unitful
using Statistics
@bodokaiser
bodokaiser / README.md
Last active June 19, 2023 09:06
Stanford Research Instruments PTC10

Stanford Research Instruments PTC10

Usage

go run main.go > time_date.csv

Show help for optional arguments: