- MWE
- Default settings
- Useful troubleshootings
- General information
Last active
June 25, 2024 03:58
-
-
Save tapyu/4f5911905e73814af48e08a17b12db2e to your computer and use it in GitHub Desktop.
CeTZ: ein Typst Zeichenpaket - A library for drawing stuff with Typst. Topics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "@preview/cetz:0.2.2": canvas, plot, draw, coordinate, vector | |
#set page(width: auto, height: auto, margin: .5cm) | |
#set text(font: "Times New Roman") | |
#show math.equation: set text(font: "Times New Roman") | |
#canvas({ | |
draw.arc((0,0), start: 45deg, stop: 135deg, radius: 5, name: "earth") | |
// *dictionaries* | |
let outter_right = (name: "earth", anchor: 10%) | |
let outter_left = (name: "earth", anchor: 150deg) | |
let inner_right = (name: "earth", anchor: 40deg) | |
let inner_left = (name: "earth", anchor: 140deg) | |
let arc_center = (name: "earth", anchor: "arc-center") | |
let center = (name: "earth", anchor: "center") | |
// *first way to obtain a point* | |
draw.arc-through( | |
inner_right, | |
(center,250%,arc_center), // new point through interpolation | |
inner_left, | |
name: "inner_arc" | |
) | |
// *second way to obtain a point* | |
draw.arc-through( | |
outter_right, | |
(v => vector.add(v, (0, 5)), "earth.arc-center"), // new point through function | |
outter_left, | |
name: "outter_arc" | |
) | |
// *third way to obtain a point* | |
draw.get-ctx(ctx => { | |
let (ctx, point) = coordinate.resolve(ctx, "earth.arc-center") | |
draw.circle(vector.add(point, (0, 2)), radius: 0.3, name: "E") | |
draw.line("E.north-west", "E.south-east") | |
draw.line("E.north-east", "E.south-west") | |
draw.content((v => vector.add(v, (0, -0.3)), "E.south"), [$bold(E)$], position: "center") | |
draw.line((v => vector.add(v, (0.5, 0.8)), "E.north"), (rel: (-1, 0)), mark: (end: ">"), name: "B_line") | |
draw.content("B_line.50%", [$bold(B)$], anchor: "north", padding: 0.1) | |
}) | |
draw.line((v => vector.add(v, (0, 0.2)), "outter_arc.50%"), (rel: (0, 0.7)), mark: (end: ">"), name: "ExB_line") | |
draw.content((v => vector.add(v, (0, 0.6)),"ExB_line.end"), [$bold(E times B)$], anchor: "north", padding: 0.1) | |
draw.line((v => vector.add(v, (0.5,0.3)), "outter_arc.30%"), (rel: (angle: -60deg, radius: 40pt)), mark: (end: ">"), name: "er_line") | |
draw.content(("er_line.50%"), [$e^-$], anchor: "south-west", padding: 0.1) | |
draw.line((v => vector.add(v, (-0.8,-0.3)), "outter_arc.65%"), (rel: (angle: 240deg, radius: 40pt)), mark: (end: ">"), name: "er_line") | |
draw.content(("er_line.50%"), [$e^-$], anchor: "south-east", padding: 0) | |
draw.content((v => vector.add(v, (0,-.5)), "earth.arc-center"), [Magnetic equator], anchor: "north", padding: 0.1) | |
draw.content((v => vector.add(v, (0,-.5)), "earth.arc-center"), [Magnetic equator], anchor: "north", padding: 0.1) | |
draw.content("earth.43deg", [$20 degree$ south], anchor: "north", padding: 0.8) | |
draw.content("earth.135deg", [$20 degree$ north], anchor: "north", padding: 0.8) | |
draw.line("earth.arc-center", (rel: (y: -0.2)), (rel: (y: 0.4))) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL:=/bin/bash | |
TYP_FILES:=$(wildcard *.typ) | |
PDF_FILES:=$(patsubst %.typ,%.pdf,$(TYP_FILES)) | |
.PHONY: img typ | |
all: typ img | |
img: | |
@for pdffile in $(PDF_FILES); do \ | |
gs -dNOPAUSE -sDEVICE=jpeg -sOutputFile=$${pdffile/%pdf/jpg} -r200 -dBATCH $${pdffile} > /dev/null; \ | |
rm -f $${pdffile}; \ | |
done | |
@echo "The .pdf files have been converted to .jpg" | |
typ: | |
@for t in $(TYP_FILES); do \ | |
typst compile "$${t}"; \ | |
done | |
tst: | |
echo "typ:$(TYP_FILES) pdf:$(PDF_FILES)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "@preview/cetz:0.2.0": canvas, draw, tree | |
#set page(paper: "presentation-16-9") | |
#show par: set block(spacing: 0.65em) | |
#set text(size: 20pt) | |
#canvas(length: 4cm, { | |
import draw: * | |
set-style(mark: (end: ">")) | |
line((0,0), (0.7, 0), name: "line1") | |
content("line1.start", | |
align(center, [ | |
Postcorrelated | |
signal model | |
(baseband signal + | |
scintillation noise) | |
]), anchor: "east") | |
content("line1.end", | |
align(center, [ | |
Scintillation | |
signal | |
Estimation | |
]), anchor: "west") | |
line((1.7,0.3), (2.2, 0.6), name: "line21") | |
content("line21.end", | |
align(center, [ | |
Time series | |
classification | |
]), anchor: "west") | |
line((1.7,0), (2.2, 0), name: "line22") | |
content("line22.end", | |
align(center, [ | |
Statistics \&, | |
features extraction | |
]), anchor: "west") | |
line((1.7,0), (2.2, -0.8), name: "line22") | |
content("line22.end", | |
align(center, [ | |
Forecasting | |
]), anchor: "west") | |
line((3.5, 0.6), (3.5+0.5, 0.05), name: "line31") | |
line((3.5, 0), (3.5+0.5, 0), name: "line32") | |
content("line32.end", | |
align(center, [ | |
Deployment | |
]), anchor: "west") | |
line((3.1, -0.8), (3.5+0.5, -0.05), name: "line33") | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "@preview/cetz:0.2.2": canvas, plot, draw, coordinate, vector | |
#import draw: * | |
#set page(width: auto, height: auto, margin: .5cm) | |
#set block(spacing: 0.65em) | |
#canvas({ | |
line( | |
(0, 8), | |
(0,0), | |
mark: (start: ">"), | |
name: "antenna" | |
) | |
line( | |
"antenna.20%", | |
(rel: (2,0)), | |
mark: (end: ">") | |
) | |
content( | |
(), | |
block([ISMR], stroke: (thickness: 1pt), inset: 5pt), | |
anchor: "west", | |
name: "ismr" | |
) | |
line( | |
"ismr.east", | |
(rel: (3.5,0)), | |
mark: (end: ">") | |
) | |
content( | |
(), | |
block("Software\ntriggering\nsystem", stroke: (thickness: 1pt), inset: 5pt), | |
anchor: "west", | |
name: "software-system" | |
) | |
for (i, x-shift) in ((40, -.55), (60, -.25), (100, .9)){ | |
line( | |
"antenna." + str(i) + "%", | |
(rel: (2,0)), | |
mark: (end: ">") | |
) | |
content( | |
(), | |
block([RF-FE], stroke: (thickness: 1pt), inset: 5pt), | |
anchor: "west", name:"re-fe"+str(i) | |
) | |
line( | |
"re-fe"+str(i)+".east", | |
(rel: (1,0)), | |
mark: (end: ">") | |
) | |
content((), block("Circular\nbuffer", stroke: (thickness: 1pt), inset: 5pt), anchor: "west", name:"cb"+str(i)) | |
line( | |
"cb"+str(i)+".east", | |
((), i*1%, (rel: (2.5,0))), | |
(rel: (0.3,0.3)), | |
) | |
line( | |
(rel: (y: -0.3)), | |
(rel: (x: 5), to: "cb"+str(i)), | |
mark: (end: ">") | |
) | |
line( | |
(rel: (x: x-shift), to:"software-system.south"), | |
((), "|-","antenna." + str(i - 3) + "%"), | |
mark: (end: ">") | |
) | |
} | |
circle( | |
(rel: (x: 10.2), to: "antenna.33%"), | |
radius: (1, 0.2), | |
anchor: "west", | |
name: "database-top" | |
) | |
line( | |
"database-top.west", | |
(rel: (y: -6)), | |
) | |
arc-through( | |
(), | |
(rel: (1,-0.3)), | |
(rel: (1, 0.3)) | |
) | |
line( | |
(), | |
(rel: (y: 6)), | |
) | |
content( | |
(rel: (y: -3), to: "database-top.center"), | |
[Database], | |
anchor: "center", | |
) | |
content((rel: (2.5,0), to: "antenna.80%"), [ | |
*.* | |
*.* | |
*.* | |
]) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "@preview/cetz:0.2.2": canvas, plot, draw, coordinate, vector | |
#set page(width: auto, height: auto, margin: .5cm) | |
#set block(spacing: 0.65em) | |
#let draw-mixer(name, pos: ()) = { | |
draw.circle(pos, radius: 0.5, anchor: "west", name: name) | |
draw.line(name+".north-east", name+".south-west") | |
draw.line(name+".north-west", name+".south-east") | |
} | |
#let draw-integrate-and-dump(name, pos: ()) = { | |
draw.content((), block("I&D", stroke: (thickness: 1pt), inset: 5pt), anchor: "west", name: name+"-I&D") | |
draw.line(name+"-I&D.east", (rel: (1,0)), mark: (end: ">"), name: name+"-I&Dout") | |
draw.content(name+"-I&Dout.50%", [$#name.at(0)_#name.at(1)$], anchor: "south", padding: 7pt) | |
} | |
#canvas({ | |
// r[k] to I/Q | |
draw.line((y: 10), (rel: (x: 2)), name:"r[k]", mark: (end: ">")) | |
draw-mixer("Imixer") | |
draw.content("r[k].50%", [$r[k]$], anchor: "south", padding: 7pt) | |
draw.line("r[k].50%", (rel: (y: -4)), (rel: (x: 3)), mark: (end: ">")) | |
draw-mixer("Qmixer") | |
// I to E,P,L | |
draw.line("Imixer.east", (rel: (x: 10)), name: "I", mark: (end: ">")) | |
draw.content("I.10%", [$I$], anchor: "south", padding: 7pt) | |
draw-mixer("ILmixer", pos: "I.end") | |
draw.line("I.40%", (rel: (y: 5)), (rel: (x: 2)), name: "I1", mark: (end: ">")) | |
draw-mixer("IEmixer") | |
draw.line("I1.40%", (rel: (x: 4)), mark: (end: ">"), name: "I2") | |
draw-mixer("IPmixer") | |
// Q to E,P,L | |
draw.line( | |
"Qmixer.east", | |
((), "-|", "I1.end"), | |
name: "Q", | |
mark: (end: ">") | |
) | |
draw.content("Q.10%", [$Q$], anchor: "south", padding: 7pt) | |
draw-mixer("QEmixer", pos: "Q.end") | |
draw.line( | |
"Q.80%", | |
(rel: (y: -5)), | |
((), "-|", "I.end"), | |
name: "Q1", | |
mark: (end: ">") | |
) | |
draw-mixer("QLmixer") | |
draw.line( | |
"Q1.25%", | |
((), "-|", "I2.end"), | |
mark: (end: ">") | |
) | |
draw-mixer("QPmixer") | |
// (I to E,P,L) and (Q to E,P,L) to integrate and dump | |
draw.line("ILmixer.east", (rel: (x: 2)), name: "ILout", mark: (end: ">")) | |
draw-integrate-and-dump("IL") | |
draw.line("IEmixer.east", ("IEmixer", "-|", "ILout.end"), mark: (end: ">")) | |
draw-integrate-and-dump("IE") | |
draw.line("IPmixer.east", ("IPmixer", "-|", "ILout.end"), mark: (end: ">")) | |
draw-integrate-and-dump("IP") | |
draw.line("QLmixer.east", ("QLmixer", "-|", "ILout.end"), mark: (end: ">")) | |
draw-integrate-and-dump("QL") | |
draw.line("QEmixer.east", ("QEmixer", "-|", "ILout.end"), mark: (end: ">")) | |
draw-integrate-and-dump("QE") | |
draw.line("QPmixer.east", ("QPmixer", "-|", "ILout.end"), mark: (end: ">")) | |
draw-integrate-and-dump("QP") | |
// bar | |
draw.line((rel: (y: 1), to: "IE-I&Dout.end"), (rel: (y: -1), to: "QL-I&Dout.end"), name: "bar", stroke: (thickness: 3pt)) | |
// code loop | |
for (perc, label) in ((10, "IE"), (15, "IP"), (20, "IL"), (25, "QE"), (30, "QP"), (35, "QL")) { | |
draw.line("bar."+str(perc)+"%", (rel: (x: 2)), name: label+"-out", mark: (end: ">")) | |
draw.content(label+"-out.50%", [$#label.at(0)_#label.at(1)$], anchor: "south", padding: 7pt) | |
} | |
draw.content( | |
(rel: (y: 0.5), to: "IE-out.end"), | |
(rel: (3, -0.5), to: "QL-out.end"), | |
box(align(center)[Code loop], stroke: (thickness: 1pt), inset: 60pt), | |
name: "code-loop" | |
) | |
draw.line("code-loop.east", (rel: (x: 2)), mark: (end: ">"), name: "code-loop-out") | |
draw.content("code-loop-out.50%", [$delta tau$], anchor: "south", padding: 7pt) | |
draw.content( | |
"code-loop-out.end", | |
box("Code\nloop\nfilter", stroke: (thickness: 1pt), inset: 10pt), | |
anchor: "west", | |
name: "code-loop-filter" | |
) | |
draw.line("code-loop-filter.east", (rel: (2,0)), mark: (end: ">"), name: "code-loop-filter-out") | |
draw.content("code-loop-filter-out.50%", [$tau$], anchor: "south", padding: 7pt) | |
draw.content( | |
"code-loop-filter-out.end", | |
circle(text("+", size: 20pt), inset: 5pt), | |
anchor: "west", | |
name: "sum-code-aid" | |
) | |
draw.line( | |
"sum-code-aid.east", | |
(rel: (x: 1)), | |
(rel: (y: 7)), | |
(rel: (x: -27)), | |
mark: (end: ">"), | |
name: "sum-code-aid-out" | |
) | |
draw.content( | |
"sum-code-aid-out.1%", | |
[$hat(tau)$], | |
anchor: "south", | |
padding: 7pt | |
) | |
draw.content( | |
"sum-code-aid-out.end", | |
block("Code NCO", stroke: (thickness: 1pt), inset: 10pt), | |
anchor: "east", | |
name: "code-nco" | |
) | |
draw.line("code-nco.south", (rel: (y: -1)), mark: (end: ">"), name: "code-nco-out") | |
draw.content("code-nco-out.50%", [Code delay], anchor: "west", padding: 7pt) | |
draw.content( | |
"code-nco-out.end", | |
block("Code generator", stroke: (thickness: 1pt), inset: 10pt), | |
anchor: "north", | |
name: "code-generator" | |
) | |
draw.line("code-generator.east", (rel: (x: 5)), mark: (end: ">")) | |
draw.content( | |
(), | |
block(width: 150pt, align(center)[3-bit shift register], stroke: (thickness: 1pt), inset: 10pt), | |
anchor: "west", | |
name: "3-bit-shift-register" | |
) | |
for i in ("E", "P", "L") { | |
draw.line( | |
("3-bit-shift-register.south", "-|", "I"+i+"mixer.north"), | |
"I"+i+"mixer.north", | |
mark: (end: ">"), | |
name: "3-bit-shift-register-"+i | |
) | |
draw.content( | |
(rel: (y: -0.3), to: "3-bit-shift-register-"+i+".start"), | |
[$#i$], | |
anchor: "east", | |
padding: 5pt | |
) | |
draw.line( | |
"3-bit-shift-register-"+i+".90%", | |
(rel: (x: -1.3)), | |
(rel: (y: -2.5)), | |
(rel: (x: +1.3)), | |
((), "|-", "Q"+i+"mixer.north"), | |
mark: (end: ">") | |
) | |
} | |
// carrier loop | |
for (perc, label) in ((70, "IP"), (80, "QP")) { | |
draw.line("bar."+str(perc)+"%", (rel: (x: 2)), name: label+"-out", mark: (end: ">")) | |
draw.content(label+"-out.50%", [$#label.at(0)_#label.at(1)$], anchor: "south", padding: 7pt) | |
} | |
draw.content( | |
("IP-out.end", 50%, "QP-out.end"), | |
box(width: 90pt, align(center)[Carrier loop], stroke: (thickness: 1pt), inset: 60pt), | |
anchor: "west", | |
name: "carrier-loop", | |
) | |
draw.line("carrier-loop.east", (rel: (x: 1.5)), mark: (end: ">"), name: "carrier-loop-out") | |
draw.content("carrier-loop-out.50%", [$delta phi.alt$], anchor: "south", padding: 7pt) | |
draw.content("carrier-loop-out.50%", [$delta f$], anchor: "north", padding: 7pt) | |
draw.content( | |
"carrier-loop-out.end", | |
box("Carrier\nloop\nfilter", stroke: (thickness: 1pt), inset: 10pt), | |
anchor: "west", | |
name: "carrier-loop-filter" | |
) | |
draw.line("carrier-loop-filter.east", (rel: (1,0)), mark: (end: ">"), name: "carrier-loop-filter-out") | |
draw.content("carrier-loop-filter-out.50%", [$f$], anchor: "south", padding: 7pt) | |
draw.content("carrier-loop-filter-out.50%", [$dot(f)$], anchor: "north", padding: 7pt) | |
draw.content( | |
"carrier-loop-filter-out.end", | |
circle(text("+", size: 20pt), inset: 5pt), | |
anchor: "west", | |
name: "sum-carrier-aid" | |
) | |
draw.line( | |
"sum-carrier-aid.south", | |
(rel: (y: -2)), | |
name: "sum-carrier-aid-out-to-external-velocity", | |
mark: (start: ">") | |
) | |
draw.content( | |
(), | |
align(center)[External | |
velocity | |
aid], | |
anchor: "north", | |
padding: 7pt) | |
draw.line( | |
"sum-carrier-aid.east", | |
(rel: (x: 2)), | |
(rel: (y: -7)), | |
(rel: (x: -26)), | |
name: "sum-carrier-aid-out", | |
) | |
draw.content( | |
"sum-carrier-aid-out.2%", | |
[$hat(f)_d$], | |
anchor: "south", | |
padding: 7pt | |
) | |
draw.line( | |
"sum-carrier-aid-out.1%", | |
(rel: (y: 3)), | |
mark: (end: ">"), | |
name: "sum-carrier-aid-out-to-code" | |
) | |
draw.content( | |
"sum-carrier-aid-out-to-code.end", | |
block("Scale factor", stroke: (thickness: 1pt), inset: 10pt), | |
anchor: "south", | |
name: "scale-factor" | |
) | |
draw.line( | |
("sum-code-aid.south", "|-", "scale-factor.north"), | |
"sum-code-aid.south", | |
mark: (end: ">"), | |
name: "scale-factor-out" | |
) | |
draw.content( | |
"scale-factor-out.50%", | |
[ | |
Carrier aid | |
to code loop | |
], | |
anchor: "west", | |
padding: 7pt | |
) | |
draw.content( | |
"sum-carrier-aid-out.end", | |
block("Carrier NCO", stroke: (thickness: 1pt), inset: 10pt), | |
anchor: "east", | |
name: "carrier-nco" | |
) | |
draw.line("carrier-nco.north", (rel: (y: 3)), mark: (end: ">"), name: "carrier-nco-out") | |
draw.content("carrier-nco-out.50%", [ | |
Carrier phase | |
Doppler frequency | |
], anchor: "west", padding: 7pt) | |
draw.content( | |
"carrier-nco-out.end", | |
block("Carrier Generator", stroke: (thickness: 1pt), inset: 10pt), | |
anchor: "south", | |
name: "carrier-generator" | |
) | |
draw.line( | |
("carrier-generator.north", "-|", "Qmixer.south"), | |
"Qmixer.south", | |
mark: (end: ">") | |
) | |
draw.line( | |
("carrier-generator.north", "-|", "Imixer.south"), | |
"Imixer.south", | |
mark: (end: ">") | |
) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "@preview/cetz:0.2.2" | |
#import cetz.draw: * | |
#import cetz.decorations: * | |
#set page(width: auto, height: auto, margin: .5cm) | |
#let draw-satellite(ref, height, angle, name) = { | |
group( | |
name: name, { | |
set-origin(ref) | |
translate(x: height*calc.cos(90deg-angle), y: height*calc.sin(90deg-angle)) | |
rotate(-angle) | |
anchor("tip", (0,0)) | |
line( | |
(-0.2,+0.2), | |
(rel: (+0.2,-0.2)), | |
(rel: (+0.2,+0.2)), | |
) | |
circle((rel: (-0.2, 0.07)), radius: (0.5,0.2), name: "antenna-base") | |
rect((rel: (0,0.1)), (rel: (1, 1)), name: "body", anchor: "east") | |
rect("body.east", (rel: (0.5, 0.5)), anchor: "north") | |
rect("body.west", (rel: (-0.5, 0.5)), anchor: "north") | |
} | |
) | |
} | |
#cetz.canvas({ | |
intersections("i", { | |
// GNSS-Receiver | |
content((), box([GNSS Receiver], stroke: (thickness: 1pt), inset: 10pt), name: "GNSS-Receiver") | |
// sats | |
draw-satellite("GNSS-Receiver.center", 5, 35deg, "satellite3") | |
draw-satellite("GNSS-Receiver.center", 5, -35deg, "satellite4") | |
// lines | |
hide(line("satellite3.tip", "GNSS-Receiver.center")) | |
hide(line("satellite4.tip", "GNSS-Receiver.center")) | |
}) | |
wave(line("i.2", "i.0"), stroke: (paint: blue), amplitude: 0.2) | |
wave(line("i.4", "i.1"), stroke: (paint: green), amplitude: 0.2) | |
line("GNSS-Receiver.south", (rel: (y: -1)), mark: (end: ">")) | |
content((), box([Ionospheric scintillation estimation], stroke: (thickness: 1pt), inset: 5pt), anchor: "north") | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "@preview/cetz:0.2.2": canvas, plot, draw | |
#set page(width: auto, height: auto, margin: .5cm) | |
#let style = (stroke: black, fill: rgb(0, 0, 200, 75)) | |
#canvas({ | |
draw.bezier((0, 0.5), (3, 1.5), (1, 0.5), (2, 0.5)) | |
draw.bezier((3, 1.5), (4.5, 2), (4, 1.5), (4.4, 1.9)) | |
draw.bezier((4.5, 2), (6.5, 3.5), (4.5, 3), (7, 3)) | |
draw.bezier((6.5, 3.5), (4.5, 6), (4, 6), (4.5, 6)) | |
plot.plot(size: (8, 6), | |
x-tick-step: none, | |
x-ticks: ((0, $10^9$), (1, $10^10$), (2, $10^11$), (3, $10^12$), (4, $10^13$)), | |
x-min: 0, x-max: 4, | |
x-label: [Electron density ($e^- slash m^3$)], | |
y-tick-step: none, | |
y-ticks: ((0, $0$), (1, $100$), (2, $200$), (3, $300$), (4, $400$), (5, $500$), (6, $600$)), | |
y-min: 0, y-max: 6, | |
y-label: "Height (km)", | |
{ | |
plot.add( | |
style: style, | |
domain: (-calc.pi, -2), x => 0.5 // put just to create the plot | |
) | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "@preview/cetz:0.2.2": canvas, plot, draw, decorations | |
#set page(width: auto, height: auto, margin: .5cm) | |
#set text(font: "Times New Roman") | |
#show math.equation: set text(font: "Times New Roman") | |
#let style = (stroke: black, fill: rgb(0, 0, 200, 75)) | |
#let day = ( | |
(31.658485413997603,53.254468931071465), | |
(36.22582366558017,53.97563411382025), | |
(41.41010604426596,54.81588924790475), | |
(47.33631175449741,55.82978443671142), | |
(54.11061754161436,56.8401058155911), | |
(61.854395118915875,57.574015288243324), | |
(70.70638572151877,58.53155434524553), | |
(80.67413013653031,59.46787889899534), | |
(92.39208881612474,60.281227917457805), | |
(106.06855396637098,60.77389049006333), | |
(120.05318095494029,61.89406401956516), | |
(137.44810694673816,63.24669582930038), | |
(157.7564342015085,64.84945521306865), | |
(180.69880374023,66.03092397911891), | |
(207.57774573686666,67.18687987786795), | |
(233.83854627347617,68.45352171084558), | |
(270.73205670637395,70.08884000870904), | |
(309.0848226653993,70.89455679274486), | |
(351.9780042214877,72.51074218418648), | |
(402.75752135169466,73.36770770026668), | |
(458.9987996816675,74.5838503323017), | |
(525.7505625078694,75.91036302315507), | |
(600.9907945024687,76.7698103274936), | |
(685.6078340941438,77.65254098976413), | |
(785.3151352134023,78.80015132691379), | |
(897.7016872704762,79.84477687167173), | |
(1026.1718935408935,80.52708674772505), | |
(1173.0274878897767,81.28968456528415), | |
(1340.8996056177493,82.05950424389435), | |
(1532.7959241435829,83.09728278897568), | |
(1752.154549996148,83.77447959849539), | |
(2002.9056175808446,84.4240328311109), | |
(2289.541703353579,85.42459081769405), | |
(2617.198316976422,86.35783501080728), | |
(2991.745911573116,86.62958413249456), | |
(3419.895061584317,87.41563559984218), | |
(3909.316692639514,87.55306646238115), | |
(4468.779517541673,87.82857671468433), | |
(5108.307140733739,88.4748102373998), | |
(5839.357646005851,88.57911178585684), | |
(6675.028885023006,89.35945354523278), | |
(7630.293144720808,89.88741910101902), | |
(8722.265397983023,90.65554791530757), | |
(9970.509943708803,90.97654319070861), | |
(11397.390930180156,91.1792341777541), | |
(13028.473041874639,91.66993699966699), | |
(14938.320606439425,92.42203728939717), | |
(17024.3157833625,93.40217306562141), | |
(19460.66784921567,93.64703900307835), | |
(22245.686578934885,94.397852050611), | |
(25429.269704541435,94.6701115693653), | |
(29068.455829034257,95.47911066262684), | |
(33228.44635737262,95.82972956777321), | |
(37983.77367613579,96.01809045761831), | |
(43419.6365115275,96.96546305568833), | |
(49633.42639063885,97.11790771999573), | |
(56736.472554783744,97.13062225510905), | |
(64856.03658761015,97.9221830052345), | |
(74137.59249470243,98.35900008623945), | |
(84747.43308567468,98.61686099003794), | |
(96875.64935594733,98.52653286748068), | |
(110739.53624824113,98.52653286748068), | |
(126587.48581304504,99.16057143502958), | |
(138955.71126148198,101.60548476307794), | |
(136998.4158225076,105.8821165813139), | |
(128917.50009499009,109.80286407205696), | |
(130447.9605310982,115.64471947247074), | |
(150079.38802891434,119.26209319826536), | |
(171557.2689446077,120.67553716492415), | |
(196108.85221668257,122.84325455891623), | |
(219143.15082368362,127.6923216095191), | |
(252061.56894237493,131.5865721945501), | |
(281117.68382829736,134.86145630755476), | |
(305133.2943093014,139.7474428407325), | |
(343092.2920668631,144.13498687939907), | |
(370557.50183551747,149.32553034009425), | |
(400221.3554241544,154.21209694074244), | |
(413282.30622614734,159.85704064203728), | |
(432698.08008425805,167.15632497322827), | |
(453379.2426662956,173.9936760230292), | |
(488605.61915127625,179.99238914453144), | |
(547700.5730517821,184.91534659420404), | |
(606598.540183053,191.4912987884967), | |
(642054.4594903842,199.25818747361768), | |
(712713.6757944972,205.49636543183027), | |
(774130.0535629048,214.63267191870284), | |
(807314.244988603,220.9223619320093), | |
(839601.0687744047,228.1482310179112), | |
(866892.7587112177,237.7378877924343), | |
(904793.5516585688,290.60739219238246), | |
(815220.2681038908,301.6592733632915), | |
(739566.6601308077,312.0531948270278), | |
(645667.8004591567,319.30899788194495), | |
(564834.2909572236,325.9822902313884), | |
(492121.9500404449,335.71217245014117), | |
(440513.66205392627,342.11067327609953), | |
(396990.1845657532,349.4942684700943), | |
(347289.5338078099,358.48388129987904), | |
(301264.34028811747,367.33463071196024), | |
(268301.3050201579,375.1088245651476), | |
(240896.01427774882,382.5789534010537), | |
(212667.97270815092,389.6285448314958), | |
(184541.2797110537,399.0026495426246), | |
(161437.88307827403,402.9914707194917), | |
(144703.43751978973,414.60434506789886), | |
(127790.33594905894,423.84835508376284), | |
(115362.63555890416,434.9528920360963), | |
(100911.99798546675,444.8825661658319), | |
(89404.99480389283,457.51435190910036), | |
(79972.6548863097,471.3051145686867), | |
(69960.58621252695,480.8498465971535), | |
(65383.91093705412,494.0599043434722), | |
(57508.20515290961,505.2922251414054), | |
(51477.38288847843,521.5524615585634), | |
(48622.53868646338,538.1880965438777), | |
(43366.873186866476,554.4904329992556), | |
(39394.92804076358,568.6685344250784), | |
(35070.607814367184,584.0566048306324), | |
(32008.227373691367,601.0172498651903), | |
(29456.60984741595,622.8612574905817), | |
(26406.093902746987,636.0533734741797), | |
(24572.640078107834,652.746969230305), | |
(22245.686578934885,674.0666841693113), | |
(19991.749164963054,686.3283360288868), | |
(18398.614584000457,707.8647534183374), | |
(17043.14477299145,730.0533351912458), | |
(16003.90391579532,757.1941232621216), | |
(14690.641708087323,785.6539897146064), | |
(13123.87118729546,809.7876977992732), | |
(11836.802326661596,839.1759115960474), | |
(11345.53995476964,856.5052871794582), | |
(10194.054349574479,884.0177794495461), | |
(9488.296001661929,914.0727477235407), | |
(8722.265397983023,947.123732134665), | |
(8059.433685388579,983.1300615664316) | |
) | |
#let night = ( | |
(10.27373458250527,80.46012909567392), | |
(11.27373458250527,81.46012909567392), | |
(12.88712021805661,82.04876253933335), | |
(14.731397683635839,82.55514584101552), | |
(16.839609939338132,83.12992398785853), | |
(19.249528727614067,83.7196629652837), | |
(22.004331309933146,84.29151357028087), | |
(25.153374051319876,85.07862243523266), | |
(28.75307671267444,85.29050099454477), | |
(32.86793329428343,86.14330498162415), | |
(37.57166754127794,86.42569226918896), | |
(42.90505701779596,86.95624291919022), | |
(49.094926986024674,87.50723218468133), | |
(56.1209084297081,88.26657543983549), | |
(64.15237899981463,88.77646142093647), | |
(73.33323437717668,89.23086766748003), | |
(83.82796317239412,89.82860255322518), | |
(95.82459398271541,90.7426196172743), | |
(109.53806420261611,91.01227941866091), | |
(125.21407094530181,91.33453781727715), | |
(144.63305271445023,91.51235162589361), | |
(162.24577283296608,92.94786254112701), | |
(187.03261977690875,93.61026822935148), | |
(213.79888253742016,94.62055149844068), | |
(244.39566867411747,94.83136114569012), | |
(279.3711648900451,95.7921017544461), | |
(319.35200895925874,95.87992297838919), | |
(365.0545168698924,96.45904027375597), | |
(417.2975166851432,96.8893304808959), | |
(477.01701905978956,96.8893304808959), | |
(545.2829872562451,96.69926045951875), | |
(623.3185071198191,96.8132576817057), | |
(712.5217004716484,97.7172938075085), | |
(818.6277745669628,98.64483647412362), | |
(923.9299449686606,99.72857830081966), | |
(1001.5177421678071,100.38833423085585), | |
(913.114142010514,101.94221277898959), | |
(815.3164986147065,104.08066792550352), | |
(712.5217004716484,104.94374967375732), | |
(623.3185071198191,104.7378791135533), | |
(545.2829872562451,105.25233030146086), | |
(477.01701905978956,106.3405198599907), | |
(416.87489232941164,106.41711312200351), | |
(365.0545168698924,107.50226581278989), | |
(319.35200895925874,107.57265444152729), | |
(278.5883478193934,107.96659609447387), | |
(244.39566867411747,109.07578675247522), | |
(213.79888253742016,109.19007945865539), | |
(186.653971400152,109.48708463085288), | |
(163.6173231845173,110.39740737683042), | |
(142.98851248580468,111.03513564589306), | |
(129.26003998683987,114.02656910466293), | |
(120.48439776934872,118.11970211700124), | |
(121.46504084340906,122.9880725204763), | |
(127.07075284797249,125.46416068192138), | |
(143.13347307009118,130.34215724058865), | |
(160.9860722566444,134.39295094662657), | |
(184.77219715478418,136.9250312704205), | |
(211.21497053720873,138.40278655120966), | |
(241.44197268846972,139.5489597261121), | |
(275.99476508427864,141.018107411455), | |
(315.492412134205,141.42482770461274), | |
(360.6425726367114,142.52137828240075), | |
(412.2541785337744,143.1946324025925), | |
(471.25192812374246,143.8710668955523), | |
(538.692853399789,145.15750699845827), | |
(615.7852583423429,145.83557714599112), | |
(703.9103674730414,146.5897188231164), | |
(804.6470725360676,146.99326445042573), | |
(927.2866316399796,147.4982936173384), | |
(1051.432950966996,149.00820970159896), | |
(1201.9036585591327,150.38487312957056), | |
(1373.9082488610086,150.67553514253567), | |
(1570.5284386531,151.67328938221735), | |
(1795.2869696087496,152.64101213676125), | |
(2052.2107234244563,153.20154128480652), | |
(2345.9028693647656,154.47026933103973), | |
(2681.625336851729,154.7536327053883), | |
(3065.3930907175177,155.91270301400573), | |
(3504.081898200773,156.85441990402822), | |
(4005.5515184919655,157.4304215508015), | |
(4578.786521950748,158.81731209029167), | |
(5234.057261979984,159.86026019464927), | |
(5983.1038836058,160.76267172392565), | |
(6867.123564681789,160.82055709554953), | |
(7818.126464381993,162.62537887931705), | |
(8966.004671362674,163.926362924618), | |
(10061.85191793592,168.2531173500053), | |
(10815.775586632964,175.54238999749325), | |
(11216.942186169217,184.97859888558384), | |
(11654.316024298882,194.47399938552562), | |
(12399.91002237479,200.7336066352123), | |
(13978.680837007785,204.23554571725157), | |
(16143.630058619834,209.59857185296534), | |
(18220.226206648196,215.96820183034856), | |
(20933.514336169384,220.91513181508535), | |
(23929.31231991777,223.5625893269345), | |
(27482.06379628425,227.28304691830417), | |
(31268.450884737744,232.68907386394628), | |
(35443.65877714453,238.08047927199698), | |
(41179.13987102485,245.90315371443347), | |
(46705.77548662899,251.41819404318528), | |
(53389.84514570622,254.26471829266325), | |
(61030.472890842444,257.2781563631114), | |
(69764.55187526267,260.53186540329943), | |
(79748.56604931399,263.1024304815135), | |
(91161.39380201316,266.4995628977457), | |
(104207.51283210328,268.42529708431937), | |
(119120.66366862813,270.6128145178497), | |
(136168.03747841663,273.49758136685), | |
(155655.063191246,273.67665777579714), | |
(177930.8797111153,275.9430922281375), | |
(203394.59125639222,278.41046991304665), | |
(232502.41790250893,280.1287458335379), | |
(265775.8694397638,283.11495371461115), | |
(298118.6502808796,291.20084039302293), | |
(303811.0889929808,311.492000511435), | |
(306195.2004738468,304.2198529820651), | |
(307527.78159601754,320.43961461826336), | |
(272318.41805432807,326.0249673583238), | |
(237984.61411181747,332.7442254955106), | |
(209854.569420142,340.34797210051556), | |
(184541.2797110537,348.261137324152), | |
(160215.67185722524,354.77526630769796), | |
(141841.51347691956,363.0955858635956), | |
(125057.58575095434,370.60426837288827), | |
(113465.5880940524,377.8546158929132), | |
(99260.41681739804,383.2004479037162), | |
(86157.53460463112,392.57799088961355), | |
(75962.62199826782,401.46518855969333), | |
(66310.14517860848,404.0829268630839), | |
(59836.41179596228,415.40568719103703), | |
(55759.44282750959,422.3638485974495), | |
(48804.79262530079,431.4803680781135), | |
(43454.847720781094,440.38440653358225), | |
(39221.12482104298,447.77897243650165), | |
(35339.93566662067,457.2728464627807), | |
(31574.09802598458,467.84095822412473), | |
(29043.22013102274,480.85745576128136), | |
(25970.90958138964,493.25425072892267), | |
(23244.22824439883,505.1305564055373), | |
(20680.517883344848,524.0951083792983), | |
(18399.57065584246,539.5510305056813), | |
(16642.259756068295,555.1828737307669), | |
(15161.681800198014,575.3712301059421), | |
(13615.581038485143,593.4886039537812) | |
) | |
// from strings to floats | |
#let day = day.flatten().map(float).chunks(2) | |
#let night = night.flatten().map(float).chunks(2) | |
#let transformed_day = day.map(x => (calc.ln(x.at(0)), calc.ln(x.at(1)))) | |
#let transformed_night = night.map(x => (calc.ln(x.at(0)), calc.ln(x.at(1)))) | |
#canvas({ | |
plot.plot( | |
size: (8,8), | |
x-min: calc.ln(10), | |
x-max: calc.ln(1e6), | |
x-tick-step: none, | |
x-ticks: ((calc.ln(10), [$10$]), (calc.ln(1e2), [$10^2$]), (calc.ln(1e3), [$10^3$]), (calc.ln(1e4), [$10^4$]), (calc.ln(1e5), [$10^5$]), (calc.ln(1e6), [$10^6$])), | |
x-label: [Electron density ($e^- slash m^3$)], | |
y-min: calc.ln(50), | |
y-max: calc.ln(1e3), | |
y-tick-step: none, | |
y-ticks: ((calc.ln(50), [$50$]), (calc.ln(1e2), [$100$]), (calc.ln(200), [$200$]), (calc.ln(300), [$300$]), (calc.ln(400), [$400$]), (calc.ln(500), [$500$]), (calc.ln(1000), [$1000$])), | |
y-label: "Height (km)", | |
legend: "legend.inner-north-west", | |
x-grid: true, | |
y-grid: true, | |
name: "plot", | |
// plot-style: (fill: black), | |
{ | |
plot.add( | |
transformed_day, | |
label: "Day", | |
style: (stroke: red), | |
) | |
plot.add( | |
transformed_night, | |
label: "Night", | |
style: (stroke: blue) | |
) | |
// anchors | |
plot.add-anchor("1000", (calc.ln(1e6), calc.ln(1e3))) | |
plot.add-anchor("200" , (calc.ln(1e6), calc.ln(200))) | |
plot.add-anchor("150" , (calc.ln(1e6), calc.ln(150))) | |
plot.add-anchor("90" , (calc.ln(1e6), calc.ln(90))) | |
plot.add-anchor("60" , (calc.ln(1e6), calc.ln(60))) | |
} | |
) | |
decorations.brace("plot.1000", "plot.200", name: "F2-brace") | |
decorations.brace("plot.200", "plot.150", name: "F1-brace") | |
decorations.brace("plot.150", "plot.90", name: "E-brace") | |
decorations.brace("plot.90", "plot.60", name: "D-brace") | |
draw.content("F2-brace.spike", [F2], anchor: "west", padding: 0.2) | |
draw.content("F1-brace.spike", [F1], anchor: "west", padding: 0.2) | |
draw.content("E-brace.spike", [E], anchor: "west", padding: 0.2) | |
draw.content("D-brace.spike", [D], anchor: "west", padding: 0.2) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "@preview/cetz:0.2.2" | |
#import cetz.draw: * | |
#import cetz.decorations: * | |
#set page(width: auto, height: auto, margin: .5cm) | |
#let data1 = ( | |
(9.271621908082795516e-01,4.138964740006747389e-05), | |
(9.307341052045963181e-01,3.199316281955027477e-04), | |
(9.375943515382526572e-01,-1.921526618945281102e-03), | |
(9.461319143249071750e-01,-5.674211815763049310e-03), | |
(9.526428296688245201e-01,-6.885550626561210731e-03), | |
(9.582530820929925364e-01,-6.636026131267875640e-03), | |
(9.637553949243814477e-01,-4.563659395344567271e-03), | |
(9.692612403218591188e-01,-2.210209557295702947e-03), | |
(9.752280092575386083e-01,4.942715521321211492e-05), | |
(9.805243718932953323e-01,1.952336966024360810e-03), | |
(9.863812583434768966e-01,2.776460180055625483e-03), | |
(9.924795314176311223e-01,4.242841190925793204e-03), | |
(9.971820075334801858e-01,5.897071505017773517e-03), | |
(1.001255959325796807e+00,8.035718789693883923e-03), | |
(1.005203002026590964e+00,1.096091292226463419e-02), | |
(1.009915302512830682e+00,1.428806261228857122e-02), | |
(1.013299760969580410e+00,2.024798554363237135e-02), | |
(1.015406150250809159e+00,2.757274748566688680e-02), | |
(1.014733197824277067e+00,3.444191116202476033e-02), | |
(1.013528781475188323e+00,4.069268015532870320e-02), | |
(1.012552325098926564e+00,4.709872007426892798e-02), | |
(1.010032861136664017e+00,5.321048137263874322e-02), | |
(1.006692340414750753e+00,5.839565726035844673e-02), | |
(1.003678049331722111e+00,6.243358120730241323e-02), | |
(1.001973081803442467e+00,6.863441753298347991e-02), | |
(1.001718130431672016e+00,7.834709703292037919e-02), | |
(1.001152324875376642e+00,8.817276455907636923e-02), | |
(1.000117455588864779e+00,9.726828669475189038e-02), | |
(9.989167123143322113e-01,1.069973222518944278e-01), | |
(9.954081030506970462e-01,1.151188280143608522e-01), | |
(9.909641008636216331e-01,1.225061426039333323e-01), | |
(9.869186338295087291e-01,1.296464870556124360e-01), | |
(9.836749498984836970e-01,1.372304515490768706e-01), | |
(9.797717775097826154e-01,1.440932543945106226e-01), | |
(9.763585533195505706e-01,1.507096415971259651e-01), | |
(9.746905711913662618e-01,1.592393666142340458e-01), | |
(9.729572768227341406e-01,1.696308339246948294e-01), | |
(9.692230400113862610e-01,1.828055695732339059e-01), | |
(9.661104961010128500e-01,1.966126944267005128e-01), | |
(9.628248245081624246e-01,2.095816831490854848e-01), | |
(9.589087507761244744e-01,2.230783446375447510e-01), | |
(9.537187943945161228e-01,2.376768136151725108e-01), | |
(9.476221908203776856e-01,2.504584712847506278e-01), | |
(9.422174978516019150e-01,2.613062775541835636e-01), | |
(9.371650867997249890e-01,2.708692539847294967e-01), | |
(9.325252154977605734e-01,2.810271913876304928e-01), | |
(9.274450705444987619e-01,2.935405371318169920e-01), | |
(9.233714123356178138e-01,3.079185393779223512e-01), | |
(9.216900004013661718e-01,3.233189227401307431e-01), | |
(9.188063028202613225e-01,3.387210679734476426e-01), | |
(9.158480298665439001e-01,3.547880396804922176e-01), | |
(9.137650885054497962e-01,3.697497340488114514e-01), | |
(9.110269673344897345e-01,3.844070613756269128e-01), | |
(9.099728557816660901e-01,3.987572810514076194e-01), | |
(9.093295859021902627e-01,4.137313486196449452e-01), | |
(9.088575555062284872e-01,4.269887386983774458e-01), | |
(9.084721675624624071e-01,4.397630340682172623e-01), | |
(9.073969985399926719e-01,4.530755924707203230e-01), | |
(9.059808618329565633e-01,4.657231087327980967e-01), | |
(9.049359121354989544e-01,4.761214389093906263e-01), | |
(9.046603448324298524e-01,4.868620752702410015e-01), | |
(9.062872046483768651e-01,4.988905025570327667e-01), | |
(9.095341680350405023e-01,5.119719476227387878e-01), | |
(9.136357452605485818e-01,5.245264172206619557e-01), | |
(9.171557696413799032e-01,5.368910085733960003e-01), | |
(9.205425174623690365e-01,5.482052653065947467e-01), | |
(9.244341234303962151e-01,5.603429998047285698e-01), | |
(9.281576706668352994e-01,5.726164454258774184e-01), | |
(9.316149682304624147e-01,5.834192477463384652e-01), | |
(9.353734357507377251e-01,5.937850358617945412e-01), | |
(9.405893793339359377e-01,6.027871821656963780e-01), | |
(9.475618149288971281e-01,6.108030364818904934e-01), | |
(9.539311542858002202e-01,6.185879684154860225e-01), | |
(9.593453371066357205e-01,6.278061936173399138e-01), | |
(9.650186460785672438e-01,6.358488187892785692e-01), | |
(9.721054913513609286e-01,6.407146622284266568e-01), | |
(9.809169229069205631e-01,6.445927044083037405e-01), | |
(9.906837326892894424e-01,6.464308921382045936e-01), | |
(1.000587938885347805e+00,6.470322754496179440e-01), | |
(1.008417514151652039e+00,6.485851857510407381e-01), | |
(1.012067035092307110e+00,6.516999996481933621e-01), | |
(1.015312775922939448e+00,6.554747669744152017e-01), | |
(1.018377093206858985e+00,6.602557215242639277e-01), | |
(1.021919863691415298e+00,6.668566094552442758e-01), | |
(1.028533217317067372e+00,6.729490508308555441e-01), | |
(1.034047451525984318e+00,6.785649954603245604e-01), | |
(1.039467512193965160e+00,6.849023517926624560e-01), | |
(1.046003459559041504e+00,6.924842188658782982e-01), | |
(1.052137152276994225e+00,7.000092655573212364e-01), | |
(1.055628701191122065e+00,7.068457037546364008e-01), | |
(1.058274681498952097e+00,7.126678726698731925e-01), | |
(1.059767417568083125e+00,7.211760229696398961e-01), | |
(1.059584661689821683e+00,7.319491541735457796e-01), | |
(1.059510507056772521e+00,7.436179982854063120e-01), | |
(1.060104388126736907e+00,7.548800531513254475e-01), | |
(1.060571013202013857e+00,7.653493025388603543e-01), | |
(1.059637679507031249e+00,7.738712490191580473e-01), | |
(1.058569897972943652e+00,7.820360707517167720e-01), | |
(1.058131731309040369e+00,7.893933620415740648e-01), | |
(1.057752169173573176e+00,7.955219924937586562e-01) | |
) | |
// from strings to floats | |
#let data1 = data1.flatten().map(float).chunks(2) | |
#let data2 = ( | |
(2.821388494495256677e-04,-2.525646686620645287e+00), | |
(1.309598082576034477e-03,-3.074628398632078596e+00), | |
(2.083133118480009691e-03,2.935969293448589035e+00), | |
(1.832682558554839941e-03,-2.824523412410558709e+00), | |
(1.755624437620709752e-03,-2.127840495881983429e+00), | |
(2.293656945698123797e-03,-9.772774588557577857e-01), | |
(4.432753078654085195e-03,-6.273411894807063849e-01), | |
(6.377921063520679106e-03,-6.111554874057444353e-01), | |
(9.514062232861239185e-03,-7.140542293902818471e-01), | |
(1.390340512218348097e-02,-7.008309259337862640e-01), | |
(1.847806325499571148e-02,-7.132135986972834019e-01), | |
(2.316202414937376663e-02,-6.592544632256633896e-01), | |
(2.841005584298164632e-02,-6.511497630491003274e-01), | |
(3.469998774385880946e-02,-6.582472493771371891e-01), | |
(4.176212488445817800e-02,-7.019503521444517835e-01), | |
(4.892158920856240489e-02,-7.285615346091417477e-01), | |
(5.519821893776045985e-02,-7.452248177839158050e-01), | |
(6.192591527598700213e-02,-7.600172351159520945e-01), | |
(6.975179828374514224e-02,-7.672754579734053504e-01), | |
(7.844271321146037423e-02,-7.718996154449602187e-01), | |
(8.629353082869688218e-02,-7.723904390317533064e-01), | |
(9.386267362303447881e-02,-7.661568192911389907e-01), | |
(1.013188137144364481e-01,-7.592117645971102613e-01), | |
(1.093225214579923305e-01,-7.541057648054466656e-01), | |
(1.174823438837762635e-01,-7.539647705664286326e-01), | |
(1.262443168031104901e-01,-7.507361381543693479e-01), | |
(1.340946630421256669e-01,-7.516482843607140696e-01), | |
(1.416244923608339368e-01,-7.600330941108934812e-01), | |
(1.485970340349472840e-01,-7.691144076804119489e-01), | |
(1.552843793215022417e-01,-7.702252797254366401e-01), | |
(1.622705688340931596e-01,-7.648285041325174616e-01), | |
(1.697669180203340289e-01,-7.613344959405085044e-01), | |
(1.760800861850859711e-01,-7.664183856541756379e-01), | |
(1.822291291248506750e-01,-7.750466539108454844e-01), | |
(1.881611026368673056e-01,-7.793449413072994769e-01), | |
(1.938181630746246831e-01,-7.920747023408268861e-01), | |
(1.999927580791218407e-01,-8.132264968880538181e-01), | |
(2.069984437591257664e-01,-8.308322338958057385e-01), | |
(2.139348069966934551e-01,-8.440058807071165736e-01), | |
(2.212475305038357765e-01,-8.529767364813042319e-01), | |
(2.289884583842953236e-01,-8.578688277772912318e-01), | |
(2.380234164855691559e-01,-8.633497283037807613e-01), | |
(2.472730621287857755e-01,-8.663668565499711427e-01), | |
(2.559852615091671724e-01,-8.659272994773424825e-01), | |
(2.648606739138274491e-01,-8.640063410887565132e-01), | |
(2.745010955356150251e-01,-8.604725154386084762e-01), | |
(2.848761574562838073e-01,-8.539351728078254933e-01), | |
(2.959296412865305981e-01,-8.452593849854466157e-01), | |
(3.066103762673459965e-01,-8.346568767338986561e-01), | |
(3.165727925790927100e-01,-8.232934934276301409e-01), | |
(3.260065750462616818e-01,-8.117698606481292822e-01), | |
(3.344453701580533123e-01,-7.998381515124075580e-01), | |
(3.428986402040380410e-01,-7.871084452958545530e-01), | |
(3.496813166704371700e-01,-7.728643615863292071e-01), | |
(3.550616063297959979e-01,-7.581016864672469602e-01), | |
(3.599227982423836014e-01,-7.430168340122218495e-01), | |
(3.647524781990721943e-01,-7.288560112926318890e-01), | |
(3.693930753387901222e-01,-7.156786103796702880e-01), | |
(3.734399334910341040e-01,-7.035989633972087320e-01), | |
(3.777089757004704618e-01,-6.923412243124694720e-01), | |
(3.827153223023275763e-01,-6.806017818125845720e-01), | |
(3.890341841952134061e-01,-6.702027536739941782e-01), | |
(3.952363406041295435e-01,-6.555369947995065560e-01), | |
(4.012023087937638954e-01,-6.398600449070178664e-01), | |
(4.074298204139168433e-01,-6.255160845988562146e-01), | |
(4.142618420088085562e-01,-6.115290873807511796e-01), | |
(4.221426890909028562e-01,-5.972306904743039935e-01), | |
(4.311573323537900571e-01,-5.833219894097702030e-01), | |
(4.410872865487263650e-01,-5.727558445699317824e-01), | |
(4.520125067151403164e-01,-5.646941163360913452e-01), | |
(4.638946729811577185e-01,-5.573813340881081935e-01), | |
(4.755121215270830537e-01,-5.506158264679192893e-01), | |
(4.870026152366333516e-01,-5.454151314857730304e-01), | |
(4.984091315233908914e-01,-5.396539971137792602e-01), | |
(5.092640795901938189e-01,-5.340097877955328753e-01), | |
(5.187163759797756013e-01,-5.281727713961432702e-01), | |
(5.270794474531833584e-01,-5.228876925896709382e-01), | |
(5.356881433940325898e-01,-5.179173282484056395e-01), | |
(5.445704207226749194e-01,-5.136821695060564963e-01), | |
(5.532456349680625607e-01,-5.092821160033679240e-01), | |
(5.619788492529003143e-01,-5.048684664109260867e-01), | |
(5.705435718705544890e-01,-5.019610862250609706e-01), | |
(5.783956197806915389e-01,-5.019408124511959279e-01), | |
(5.864659238001104224e-01,-5.005845231676931961e-01), | |
(5.939489110999305321e-01,-4.962887737165030955e-01), | |
(6.020975517166021751e-01,-4.940738008388153579e-01), | |
(6.109060066006313239e-01,-4.924974579429589050e-01), | |
(6.208061954342543043e-01,-4.899503312910084007e-01), | |
(6.303381967906827033e-01,-4.890378619678377725e-01), | |
(6.403726254645039084e-01,-4.902724261148234119e-01), | |
(6.514028057209639844e-01,-4.927778091231500013e-01), | |
(6.631348380725504699e-01,-4.952082516387441569e-01), | |
(6.742531923264493132e-01,-4.973224885885954571e-01), | |
(6.844636552514001826e-01,-5.000587075068839704e-01), | |
(6.933856282671858606e-01,-5.024894092845829663e-01), | |
(7.007624039105995184e-01,-5.043920364293027481e-01), | |
(7.065088439855290448e-01,-5.072547732621232042e-01), | |
(7.108449420784012096e-01,-5.111790775540258069e-01), | |
(7.142919006326711173e-01,-5.157153779679155559e-01), | |
(7.174181307659555085e-01,-5.206356095426339925e-01) | |
) | |
// from strings to floats | |
#let data2 = data2.flatten().map(float).chunks(2) | |
#let draw-satellite(ref, height, angle, name) = { | |
group( | |
name: name, { | |
set-origin(ref) | |
translate(x: height*calc.cos(90deg-angle), y: height*calc.sin(90deg-angle)) | |
rotate(-angle) | |
anchor("tip", (0,0)) | |
line( | |
(-0.2,+0.2), | |
(rel: (+0.2,-0.2)), | |
(rel: (+0.2,+0.2)), | |
) | |
circle((rel: (-0.2, 0.07)), radius: (0.5,0.2), name: "antenna-base") | |
rect((rel: (0,0.1)), (rel: (1, 1)), name: "body", anchor: "east") | |
rect("body.east", (rel: (0.5, 0.5)), anchor: "north") | |
rect("body.west", (rel: (-0.5, 0.5)), anchor: "north") | |
} | |
) | |
} | |
#cetz.canvas({ | |
intersections("i", { | |
// GNSS-Receiver | |
content((), box([GNSS Receiver], stroke: (thickness: 1pt), inset: 10pt), name: "GNSS-Receiver") | |
// sats | |
draw-satellite("GNSS-Receiver.center", 5, -90deg, "satellite1") | |
draw-satellite("GNSS-Receiver.center", 5, -113deg, "satellite2") | |
// lines | |
hide(line("satellite1.tip", "GNSS-Receiver.center")) | |
hide(line("satellite2.tip", "GNSS-Receiver.center")) | |
}) | |
wave(line("i.2", "i.0"), stroke: (paint: blue), amplitude: 0.2) | |
wave(line("i.3", "i.1"), stroke: (paint: orange), amplitude: 0.2) | |
line("GNSS-Receiver.south", (rel: (y: -1)), mark: (end: ">")) | |
content((), box([ | |
#show par: set block(spacing: 5pt) | |
Ionospheric | |
scintillation | |
estimation | |
], stroke: (thickness: 1pt), inset: 5pt), anchor: "north", name: "ionospheric-scintillation-estimation") | |
line("ionospheric-scintillation-estimation.south", (rel: (y: -1)), mark: (end: ">")) | |
import cetz: plot | |
// amplitude | |
group({ | |
translate(x: -5.5, y: -7) | |
plot.plot( | |
size: (8, 3), | |
x-label: "", | |
y-label: "Amplitude", | |
x-grid: true, | |
y-grid: true, | |
x-tick-step: 200, | |
y-tick-step: 0.4, | |
x-format: none, | |
{ | |
plot.add( | |
array.range(100).zip(data1.map(self => self.at(0)).slice(0,100)), | |
style: (stroke: blue) | |
) | |
plot.add( | |
array.range(100).zip(data2.map(self => self.at(0)).slice(0,100)), | |
style: (stroke: orange) | |
) | |
} | |
) | |
}) | |
// phase | |
group({ | |
translate(x: -5.5, y: -10.2) | |
plot.plot( | |
size: (8, 3), | |
x-label: "Samples", | |
y-label: "Phase", | |
x-grid: true, | |
y-grid: true, | |
y-min: -2.8, | |
y-max: +2.8, | |
x-tick-step: 200, | |
y-tick-step: none, | |
y-ticks: ((3.14/2, [$ pi/2 $]), 0, (-3.14/2, [$ -pi/2 $])), | |
{ | |
plot.add( | |
array.range(100).zip(data1.map(self => self.at(1)).slice(0,100)), | |
style: (stroke: blue) | |
) | |
plot.add( | |
array.range(100).zip(data2.map(self => self.at(1)).slice(0,100)), | |
style: (stroke: orange) | |
) | |
} | |
) | |
}) | |
line((-1.5, -11.2), (rel: (y: -0.7)), mark: (end: ">"), name: "line-out") | |
content("line-out.end", box(text(stroke: (thickness: 0.2pt, paint: red), fill: red.saturate(100%))[How to characterize this signal?], fill: yellow, inset: 1pt), anchor: "north", padding: 5pt) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "@preview/cetz:0.2.0": canvas, draw, tree | |
#set page(width: auto, height: auto, margin: .5cm) | |
#show par: set block(spacing: 0.65em) | |
#let data = ( | |
align(center)[ | |
Postcorrelated signal model | |
(baseband signal + scinitllation noise) | |
], | |
( | |
align(center)[ | |
Scintillation | |
signal | |
Estimation | |
], | |
align(center)[ | |
Time series | |
classification | |
], | |
align(center)[ | |
Features | |
extraction | |
] | |
) | |
) | |
#canvas(length: 3cm, { | |
import draw: * | |
set-style(content: (padding: .2), | |
fill: gray.lighten(70%), | |
stroke: gray.lighten(70%)) | |
tree.tree(data, spread: 2.5, grow: 1, draw-edge: (from, to, ..) => { | |
line((a: from, number: .6, b: to), | |
(a: to, number: .6, b: from), mark: (end: ">")) | |
}, name: "tree") | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment