Skip to content

Commit

Permalink
Convert double quotes to single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiashienzsch committed Sep 16, 2024
1 parent 42c9e93 commit d9247ca
Show file tree
Hide file tree
Showing 39 changed files with 308 additions and 308 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ repos:
hooks:
- id: check-case-conflict
- id: check-docstring-first
# - id: check-executables-have-shebangs
- id: check-json
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-yaml
- id: check-xml
- id: detect-private-key
- id: double-quote-string-fixer
- id: end-of-file-fixer
- id: forbid-new-submodules
- id: mixed-line-ending
Expand Down
12 changes: 6 additions & 6 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@


class PFFDTD(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeToolchain", "CMakeDeps"
settings = 'os', 'compiler', 'build_type', 'arch'
generators = 'CMakeToolchain', 'CMakeDeps'

def requirements(self):
self.requires("cli11/2.4.2")
self.requires("fmt/11.0.2")
self.requires('cli11/2.4.2')
self.requires('fmt/11.0.2')

if self.settings.os != "Macos":
self.requires("hdf5/1.14.4.3")
if self.settings.os != 'Macos':
self.requires('hdf5/1.14.4.3')

def config_options(self):
pass
32 changes: 16 additions & 16 deletions data/models/InfiniteBaffle/InfiniteBaffle.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,38 +36,38 @@ def generate_model(self, constants):
height = self.bmax[2]

model = {
"mats_hash": {
"_RIGID": {
"tris": [
'mats_hash': {
'_RIGID': {
'tris': [
[0, 2, 1],
[0, 3, 2],
[1, 5, 4],
[1, 3, 5]
],
"pts": [
'pts': [
[0.0, length, 0.0],
[width/2, length, 0.0],
[width/2, length, height],
[0.0, length, height],
[width, length, 0.0],
[width, length, height]
],
"color": [255, 255, 255],
"sides": [0, 0, 0, 0]
'color': [255, 255, 255],
'sides': [0, 0, 0, 0]
}
},
"sources": [
{"name": "S1", "xyz": [width/2, length-offset, height/2]},
'sources': [
{'name': 'S1', 'xyz': [width/2, length-offset, height/2]},
],
"receivers": [
{"name": "R1", "xyz": [width/2, offset, height/2 - 0.75]},
{"name": "R2", "xyz": [width/2, offset, height/2 - 0.25]},
{"name": "R3", "xyz": [width/2, offset, height/2 + 0.00]},
{"name": "R4", "xyz": [width/2, offset, height/2 + 0.25]},
{"name": "R5", "xyz": [width/2, offset, height/2 + 0.75]},
'receivers': [
{'name': 'R1', 'xyz': [width/2, offset, height/2 - 0.75]},
{'name': 'R2', 'xyz': [width/2, offset, height/2 - 0.25]},
{'name': 'R3', 'xyz': [width/2, offset, height/2 + 0.00]},
{'name': 'R4', 'xyz': [width/2, offset, height/2 + 0.25]},
{'name': 'R5', 'xyz': [width/2, offset, height/2 + 0.75]},
]
}

with open(self.model_file, "w") as file:
with open(self.model_file, 'w') as file:
json.dump(model, file)
print("", file=file)
print('', file=file)
46 changes: 23 additions & 23 deletions data/models/LivingRoom/LivingRoom.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class LivingRoom(Setup3D):
draw_backend = 'polyscope'

def generate_model(self, constants):
dir = pathlib.Path(".")
obj = dir/"obj"
dir = pathlib.Path('.')
obj = dir/'obj'

s1 = [3.65-0.5, 6.0-0.3, 1.2]
s2 = [3.65-0.5, 6.0-2.5, 1.2]
Expand All @@ -54,25 +54,25 @@ def generate_model(self, constants):
r2 = [0.6, 6.0-2.0, 1.1]

m = MeshModelBuilder()
m.add("Book Shelf", obj / 'book_shelf.obj', [200, 200, 200], reverse=True)
m.add("Ceiling", obj / 'ceiling.obj', [150, 150, 150], reverse=True)
m.add("Coffee Table", obj / 'coffee_table.obj', [10, 10, 10], reverse=True)
m.add("Couch", obj / 'couch.obj', [29, 50, 112], reverse=True)
m.add("Desk", obj / 'desk.obj', [103, 70, 55], reverse=True)
m.add("Door", obj / 'door.obj', [103, 70, 55], reverse=True)
m.add("Floor", obj / 'floor.obj', [133, 94, 66], reverse=True)
m.add("Kallax", obj / 'kallax.obj', [200, 200, 200], reverse=True)
m.add("Monitors", obj / 'monitors.obj', [15, 15, 15], reverse=True)
m.add("Speakers", obj / 'speakers.obj', [25, 25, 25], reverse=True)
m.add("Speaker Stands", obj / 'speaker_stands.obj', [5, 5, 5], reverse=True)
m.add("Table", obj / 'table.obj', [200, 200, 200], reverse=True)
m.add("TV 42", obj / 'tv_42.obj', [10, 10, 10], reverse=True)
m.add("TV 55", obj / 'tv_55.obj', [10, 10, 10], reverse=True)
m.add("TV Table", obj / 'tv_table.obj', [120, 120, 120], reverse=True)
m.add("Walls", obj / 'walls.obj', [175, 175, 175], reverse=True)
m.add("Window", obj / 'window.obj', [137, 207, 240], reverse=True)
m.add_source("S1", s1)
m.add_source("S2", s2)
m.add_receiver("R1", r1)
m.add_receiver("R2", r2)
m.add('Book Shelf', obj / 'book_shelf.obj', [200, 200, 200], reverse=True)
m.add('Ceiling', obj / 'ceiling.obj', [150, 150, 150], reverse=True)
m.add('Coffee Table', obj / 'coffee_table.obj', [10, 10, 10], reverse=True)
m.add('Couch', obj / 'couch.obj', [29, 50, 112], reverse=True)
m.add('Desk', obj / 'desk.obj', [103, 70, 55], reverse=True)
m.add('Door', obj / 'door.obj', [103, 70, 55], reverse=True)
m.add('Floor', obj / 'floor.obj', [133, 94, 66], reverse=True)
m.add('Kallax', obj / 'kallax.obj', [200, 200, 200], reverse=True)
m.add('Monitors', obj / 'monitors.obj', [15, 15, 15], reverse=True)
m.add('Speakers', obj / 'speakers.obj', [25, 25, 25], reverse=True)
m.add('Speaker Stands', obj / 'speaker_stands.obj', [5, 5, 5], reverse=True)
m.add('Table', obj / 'table.obj', [200, 200, 200], reverse=True)
m.add('TV 42', obj / 'tv_42.obj', [10, 10, 10], reverse=True)
m.add('TV 55', obj / 'tv_55.obj', [10, 10, 10], reverse=True)
m.add('TV Table', obj / 'tv_table.obj', [120, 120, 120], reverse=True)
m.add('Walls', obj / 'walls.obj', [175, 175, 175], reverse=True)
m.add('Window', obj / 'window.obj', [137, 207, 240], reverse=True)
m.add_source('S1', s1)
m.add_source('S2', s2)
m.add_receiver('R1', r1)
m.add_receiver('R2', r2)
m.write(self.model_file)
16 changes: 8 additions & 8 deletions data/models/Localization/Localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ def generate_model(self, constants):

room = RoomModelBuilder(L, W, H)
room.with_colors({
"Ceiling": [200, 200, 200],
"Floor": [151, 134, 122],
"Walls": [255, 255, 255],
'Ceiling': [200, 200, 200],
'Floor': [151, 134, 122],
'Walls': [255, 255, 255],
})

room.add_source("S1", source)
room.add_receiver("R1", list(mics[1-1]/2+[0.5, 0.5, 0.5]))
room.add_receiver("R2", list(mics[2-1]/2+[0.5, 0.5, 0.5]))
room.add_receiver("R3", list(mics[3-1]/2+[0.5, 0.5, 0.5]))
room.add_receiver("R4", list(mics[4-1]/2+[0.5, 0.5, 0.5]))
room.add_source('S1', source)
room.add_receiver('R1', list(mics[1-1]/2+[0.5, 0.5, 0.5]))
room.add_receiver('R2', list(mics[2-1]/2+[0.5, 0.5, 0.5]))
room.add_receiver('R3', list(mics[3-1]/2+[0.5, 0.5, 0.5]))
room.add_receiver('R4', list(mics[4-1]/2+[0.5, 0.5, 0.5]))
room.build(self.model_file)
10 changes: 5 additions & 5 deletions data/models/Modes/Modes.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ def generate_model(self, constants):

room = RoomModelBuilder(length, width, height)
room.with_colors({
"Ceiling": [200, 200, 200],
"Floor": [151, 134, 122],
"Walls": [255, 255, 255],
'Ceiling': [200, 200, 200],
'Floor': [151, 134, 122],
'Walls': [255, 255, 255],
})
room.add_source("S1", [offset, offset, offset])
room.add_receiver("R1", [width-offset, length-offset, height-offset])
room.add_source('S1', [offset, offset, offset])
room.add_receiver('R1', [width-offset, length-offset, height-offset])
room.build(self.model_file)
48 changes: 24 additions & 24 deletions data/models/ProStudio/ProStudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class ProStudio(Setup3D):
rot_az_el = [0, 0]

def generate_model(self, constants):
print("--PRO-STUDIO: Build model")
dir = pathlib.Path(".")
obj = dir/"obj"
print('--PRO-STUDIO: Build model')
dir = pathlib.Path('.')
obj = dir/'obj'

mul = 4.0 if self.fcc else 2.0
offset = constants.h * mul
Expand Down Expand Up @@ -84,29 +84,29 @@ def generate_model(self, constants):
# r6 = with_x_offset(r2, +0.73*1.5)

m = MeshModelBuilder()
m.add("ATC Left", obj / 'atc_left.obj', [5, 5, 5], reverse=True)
m.add("ATC Right", obj / 'atc_right.obj', [5, 5, 5], reverse=True)
m.add("Ceiling", obj / 'ceiling.obj', [60, 60, 60])
m.add("Console", obj / 'console.obj', [60, 60, 60], reverse=True)
m.add("Couch", obj / 'couch.obj', [5, 5, 48], reverse=True)
m.add('ATC Left', obj / 'atc_left.obj', [5, 5, 5], reverse=True)
m.add('ATC Right', obj / 'atc_right.obj', [5, 5, 5], reverse=True)
m.add('Ceiling', obj / 'ceiling.obj', [60, 60, 60])
m.add('Console', obj / 'console.obj', [60, 60, 60], reverse=True)
m.add('Couch', obj / 'couch.obj', [5, 5, 48], reverse=True)
# m.add("Diffusor", obj / 'diffusor.obj', [53, 33, 0], reverse=True)
m.add("Floor", obj / 'floor.obj', [53, 33, 0])
m.add("Outboard", obj / 'outboard.obj', [0, 0, 0], reverse=True)
m.add("Rack", obj / 'rack.obj', [25, 25, 25], reverse=True)
m.add("Raised Floor", obj / 'raised_floor.obj', [25, 25, 25], reverse=True)
m.add("Walls Back", obj / 'walls_back.obj', [100, 100, 100])
m.add("Walls Front", obj / 'walls_front.obj', [100, 100, 100])
m.add("Walls Side", obj / 'walls_side.obj', [180, 180, 180])
m.add("Windows", obj / 'windows.obj', [137, 207, 240], reverse=True)
m.add_source("S1", s1)
m.add_source("S2", s2)
m.add('Floor', obj / 'floor.obj', [53, 33, 0])
m.add('Outboard', obj / 'outboard.obj', [0, 0, 0], reverse=True)
m.add('Rack', obj / 'rack.obj', [25, 25, 25], reverse=True)
m.add('Raised Floor', obj / 'raised_floor.obj', [25, 25, 25], reverse=True)
m.add('Walls Back', obj / 'walls_back.obj', [100, 100, 100])
m.add('Walls Front', obj / 'walls_front.obj', [100, 100, 100])
m.add('Walls Side', obj / 'walls_side.obj', [180, 180, 180])
m.add('Windows', obj / 'windows.obj', [137, 207, 240], reverse=True)
m.add_source('S1', s1)
m.add_source('S2', s2)
# m.add_source("S3", s3)
# m.add_source("SUB1", sub1)
# m.add_source("SUB2", sub2)
m.add_receiver("R1", r1)
m.add_receiver("R2", r2)
m.add_receiver("R3", r3)
m.add_receiver("R4", r4)
m.add_receiver("R5", r5)
m.add_receiver("R6", r6)
m.add_receiver('R1', r1)
m.add_receiver('R2', r2)
m.add_receiver('R3', r3)
m.add_receiver('R4', r4)
m.add_receiver('R5', r5)
m.add_receiver('R6', r6)
m.write(self.model_file)
50 changes: 25 additions & 25 deletions data/models/Studio/Studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,43 +62,43 @@ def generate_model(self, constants):

room = RoomModelBuilder(L, W, H)
room.with_colors({
"Absorber M": [111, 55, 10],
"Absorber L": [111, 55, 10],
"Ceiling": [200, 200, 200],
"Diffusor": [140, 80, 35],
"Floor": [151, 134, 122],
"Table": [130, 75, 25],
"Sofa": [25, 25, 25],
"Speaker_Cabinet": [15, 15, 15],
"Walls": [255, 255, 255],
'Absorber M': [111, 55, 10],
'Absorber L': [111, 55, 10],
'Ceiling': [200, 200, 200],
'Diffusor': [140, 80, 35],
'Floor': [151, 134, 122],
'Table': [130, 75, 25],
'Sofa': [25, 25, 25],
'Speaker_Cabinet': [15, 15, 15],
'Walls': [255, 255, 255],
})

room.add_box("Absorber M", [0.1, 2.5, 1.5], [0.2, L-2.5-0.75, 0.75])
room.add_box("Absorber M", [0.1, 2.5, 1.5], [W-0.1-0.2, L-2.5-0.75, 0.75])
room.add_box('Absorber M', [0.1, 2.5, 1.5], [0.2, L-2.5-0.75, 0.75])
room.add_box('Absorber M', [0.1, 2.5, 1.5], [W-0.1-0.2, L-2.5-0.75, 0.75])

room.add_box("Absorber L", [1.0, 0.2, 2.5], [src_left[0]-1.0/2, L-0.2-0.1, 0.25])
room.add_box("Absorber L", [1.0, 0.2, 2.5], [src_right[0]-1.0/2, L-0.2-0.1, 0.25])
room.add_box('Absorber L', [1.0, 0.2, 2.5], [src_left[0]-1.0/2, L-0.2-0.1, 0.25])
room.add_box('Absorber L', [1.0, 0.2, 2.5], [src_right[0]-1.0/2, L-0.2-0.1, 0.25])

room.add_box("Absorber L", [2.5, 2.0, 0.2], [W/2-2.5/2, L-2-0.5, H-0.3])
room.add_box("Absorber L", [2.5, 2.0, 0.2], [W/2-2.5/2, L-2-2.5-0.5, H-0.3])
room.add_box('Absorber L', [2.5, 2.0, 0.2], [W/2-2.5/2, L-2-0.5, H-0.3])
room.add_box('Absorber L', [2.5, 2.0, 0.2], [W/2-2.5/2, L-2-2.5-0.5, H-0.3])

room.add_diffusor_1d([2, 15*0.0254, 1.5], [W/2-1, 0.05, 0.7], 3*0.0254)
room.add_box("Absorber L", [1.0, 0.2, 2.5], [0.1, 0.1, 0.25])
room.add_box("Absorber L", [1.0, 0.2, 2.5], [W-1.0-0.1, 0.1, 0.25])
room.add_box('Absorber L', [1.0, 0.2, 2.5], [0.1, 0.1, 0.25])
room.add_box('Absorber L', [1.0, 0.2, 2.5], [W-1.0-0.1, 0.1, 0.25])

room.add_box("Sofa", [2.52, 0.98, 0.48], [W/2-2.52/2, 0.4, 0.05])
room.add_box("Table", [1.8, 0.8, 0.02], [W/2-1.8/2, listener[1]+0.4, 0.7])
room.add_box('Sofa', [2.52, 0.98, 0.48], [W/2-2.52/2, 0.4, 0.05])
room.add_box('Table', [1.8, 0.8, 0.02], [W/2-1.8/2, listener[1]+0.4, 0.7])

speaker_box = [0.435, 0.490, 0.650]
speaker_mid = [0.217, -0.075, 0.520]
room.add_cabinet_speaker("Speaker Left", src_left, speaker_box, speaker_mid)
room.add_cabinet_speaker("Speaker Right", src_right, speaker_box, speaker_mid)
room.add_cabinet_speaker('Speaker Left', src_left, speaker_box, speaker_mid)
room.add_cabinet_speaker('Speaker Right', src_right, speaker_box, speaker_mid)
# room.add_cabinet_speaker("Speaker Left", src_left)
# room.add_cabinet_speaker("Speaker Right", src_right)
# room.add_source("Speaker Left", src_left)
# room.add_source("Speaker Right", src_right)
room.add_receiver("Engineer", listener.tolist())
room.add_receiver("P1", p1.tolist())
room.add_receiver("P2", p2.tolist())
room.add_receiver("P3", p3.tolist())
room.add_receiver('Engineer', listener.tolist())
room.add_receiver('P1', p1.tolist())
room.add_receiver('P2', p2.tolist())
room.add_receiver('P3', p3.tolist())
room.build(self.model_file)
2 changes: 1 addition & 1 deletion src/python/pffdtd/analysis/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pffdtd.analysis.waterfall import main as waterfall


@click.group(help="Analysis.")
@click.group(help='Analysis.')
def analysis():
pass

Expand Down
6 changes: 3 additions & 3 deletions src/python/pffdtd/analysis/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ def fractional_octave_smoothing(magnitudes, fs, nfft, fraction=3):
return smoothed


@click.command(name="response", help="Plot frequency response.")
@click.command(name='response', help='Plot frequency response.')
@click.argument('filename', nargs=2, type=click.Path(exists=True))
@click.option('--fmin', default=1.0)
@click.option('--fmax', default=1000.0)
@click.option('--label_a', default="A")
@click.option('--label_b', default="B")
@click.option('--label_a', default='A')
@click.option('--label_b', default='B')
@click.option('--smoothing', default=0.0)
@click.option('--target', default=0.0)
def main(filename, fmin, fmax, label_a, label_b, smoothing, target):
Expand Down
Loading

0 comments on commit d9247ca

Please sign in to comment.