Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DBernardes committed May 21, 2024
1 parent 0188725 commit 25b8ad5
Show file tree
Hide file tree
Showing 34 changed files with 177 additions and 170 deletions.
2 changes: 1 addition & 1 deletion SPARC4_ACS/ACS files/Initialization/ACS_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.47.0
v1.47.1
Binary file modified SPARC4_ACS/ACS files/Python/__pycache__/main.cpython-36.pyc
Binary file not shown.
Binary file modified SPARC4_ACS/ACS files/Python/__pycache__/utils.cpython-36.pyc
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion SPARC4_ACS/ACS files/Python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def main(night_dir, file, data, header_json):
obj = cls(header_json, night_dir)
obj.fix_keywords()
hdr = obj.hdr
# obj.reset_header()
try:
data = fix_image_orientation(hdr['CHANNEL'], hdr['EMMODE'], data)
except Exception as e:
Expand Down
4 changes: 2 additions & 2 deletions SPARC4_ACS/Channel/Channel.lvclass
Original file line number Diff line number Diff line change
Expand Up @@ -378,13 +378,13 @@
<Property Name="NI.ClassItem.State" Type="Int">1107821072</Property>
</Item>
<Item Name="Log message.vi" Type="VI" URL="../Log message.vi">
<Property Name="NI.ClassItem.ConnectorPane" Type="Bin">'!#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!%]!!!!#Q!-1#%'=X2B&gt;(6T!!!,1!-!"'.P:'5!!""!-0````]'=W^V=G.F!!!71&amp;!!!Q!!!!%!!AFF=H*P=C"P&gt;81!"!!!!#:!=!!?!!!2$U.I97ZO:7QO&lt;(:D&lt;'&amp;T=Q!,1WBB&lt;GZF&lt;#"P&gt;81!)%"1!!-!!!!"!!)4:8*S&lt;X)A;7YA+'ZP)'6S=G^S+1!71$$`````$'VF=X.B:W5A&gt;(FQ:1!!%%!Q`````Q:4&gt;(*J&lt;G=!!#:!=!!?!!!2$U.I97ZO:7QO&lt;(:D&lt;'&amp;T=Q!+1WBB&lt;GZF&lt;#"J&lt;A!!91$Q!!Q!!Q!%!!1!"1!%!!1!"!!%!!9!"Q!)!!E$!!"Y!!!.#!!!!!!!!!!!!!!.#Q!!!!!!!!!!!!!!!!!!!!!!!!I!!!%+!!!##!!!!")!!!U!!!!-!!!!!!!!!!!!!!%!#A!!!!!</Property>
<Property Name="NI.ClassItem.ConnectorPane" Type="Bin">'!#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!%]!!!!#Q!-1#%'=X2B&gt;(6T!!!,1!-!"'.P:'5!!""!-0````]'=W^V=G.F!!!71&amp;!!!Q!!!!%!!AFF=H*P=C"P&gt;81!"!!!!#:!=!!?!!!2$U.I97ZO:7QO&lt;(:D&lt;'&amp;T=Q!,1WBB&lt;GZF&lt;#"P&gt;81!)%"1!!-!!!!"!!)4:8*S&lt;X)A;7YA+'ZP)'6S=G^S+1!71$$`````$'VF=X.B:W5A&gt;(FQ:1!!%%!Q`````Q:4&gt;(*J&lt;G=!!#:!=!!?!!!2$U.I97ZO:7QO&lt;(:D&lt;'&amp;T=Q!+1WBB&lt;GZF&lt;#"J&lt;A!!91$Q!!Q!!Q!%!!1!"1!%!!1!"!!%!!9!"Q!)!!E$!!"Y!!!.#!!!!!!!!!!!!!!.#Q!!!!!!!!!!!!!!!!!!!!!!!!I!!!))!!!##!!!!")!!!U!!!!-!!!!!!!!!!!!!!%!#A!!!!!</Property>
<Property Name="NI.ClassItem.ExecutionSystem" Type="Int">-1</Property>
<Property Name="NI.ClassItem.Flags" Type="Int">0</Property>
<Property Name="NI.ClassItem.IsStaticMethod" Type="Bool">true</Property>
<Property Name="NI.ClassItem.MethodScope" Type="UInt">1</Property>
<Property Name="NI.ClassItem.Priority" Type="Int">1</Property>
<Property Name="NI.ClassItem.State" Type="Int">1107821072</Property>
<Property Name="NI.ClassItem.State" Type="Int">1115685392</Property>
</Item>
<Item Name="Manager Camera Communication.vi" Type="VI" URL="../Manager Camera Communication.vi">
<Property Name="NI.ClassItem.ConnectorPane" Type="Bin">'!#!!!!!!!)!"1!&amp;!!!-!%!!!@````]!!!!"!!%!!!%7!!!!#1!-1#%'=X2B&gt;(6T!!!,1!-!"'.P:'5!!""!-0````]'=W^V=G.F!!!71&amp;!!!Q!!!!%!!AFF=H*P=C"P&gt;81!"!!!!#:!=!!?!!!2$U.I97ZO:7QO&lt;(:D&lt;'&amp;T=Q!,1WBB&lt;GZF&lt;#"P&gt;81!)%"1!!-!!!!"!!)4:8*S&lt;X)A;7YA+'ZP)'6S=G^S+1!G1(!!(A!!%1^$;'&amp;O&lt;G6M,GRW9WRB=X-!#E.I97ZO:7QA;7Y!!'%!]!!-!!-!"!!%!!5!"!!%!!1!"!!'!!1!"!!(!Q!!?!!!$1A!!!!!!!!!!!!!$1M!!!!!!!!!!!!!!!!!!!!!!!!+!!!!!!!!!!!!!!!3!!!.!!!!$!!!!!!!!!!!!!!"!!A!!!!!</Property>
Expand Down
Binary file modified SPARC4_ACS/Channel/Get Commd.vi
Binary file not shown.
Binary file modified SPARC4_ACS/Channel/Log message.vi
Binary file not shown.
Binary file modified SPARC4_ACS/Channel/Treat Command.vi
Binary file not shown.
Binary file modified SPARC4_ACS/Channel/verify parameters.vi
Binary file not shown.
Binary file modified SPARC4_ACS/Channel/write command into SM.vi
Binary file not shown.
Binary file modified SPARC4_ACS/Error log/log message.vi
Binary file not shown.
310 changes: 157 additions & 153 deletions SPARC4_ACS/Log File/Log File.lvclass

Large diffs are not rendered by default.

Binary file modified SPARC4_ACS/Log File/get time stamp.vi
Binary file not shown.
Binary file modified SPARC4_ACS/Log File/log message.vi
Binary file not shown.
2 changes: 1 addition & 1 deletion SPARC4_ACS/S4ACS.lvlps
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[ProjectWindow_Data]
ProjectExplorer.ClassicPosition[String] = "52,363,806,741"
ProjectExplorer.ClassicPosition[String] = "63,85,817,463"

[AB_Cache_{EBD3E9D1-87EC-4D07-9D0E-E12F7D672B36}]
Cache_Path[Path] Line0001 = "/C/Users/observer/AppData/Local/Temp/AB_Cache_{EBD"
Expand Down
2 changes: 1 addition & 1 deletion SPARC4_ACS/S4ACS.lvproj
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@
<Property Name="Bld_localDestDirType" Type="Str">relativeToCommon</Property>
<Property Name="Bld_modifyLibraryFile" Type="Bool">true</Property>
<Property Name="Bld_previewCacheID" Type="Str">{77B8811B-88C5-4D06-B0B4-2511D9D9BCC5}</Property>
<Property Name="Bld_version.build" Type="Int">163</Property>
<Property Name="Bld_version.build" Type="Int">165</Property>
<Property Name="Bld_version.major" Type="Int">1</Property>
<Property Name="Destination[0].destName" Type="Str">ACS.exe</Property>
<Property Name="Destination[0].path" Type="Path">../builds/ACS/ACS.exe</Property>
Expand Down
Binary file modified SPARC4_ACS/Save Image/Prepare header content.vi
Binary file not shown.
Binary file modified builds/ACS.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion builds/ACS/ACS files/Initialization/ACS_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.47.0
v1.47.1
Binary file modified builds/ACS/ACS files/Python/__pycache__/main.cpython-36.pyc
Binary file not shown.
Binary file modified builds/ACS/ACS files/Python/__pycache__/utils.cpython-36.pyc
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion builds/ACS/ACS files/Python/header/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def _initialize_kw_dataclass(self):
("ASEL_MODE", "ANMODE", bool),
("GMIR", "GMIR", float),
("GMIR_MODE", "GMIRMODE", bool),
("GFOC", "GFOC", bool),
("GFOC", "GFOC", float),
("GFOC_MODE", "GFOCMODE", bool),
("ICSVRSN", "ICSVRSN", str),
]
Expand Down
8 changes: 3 additions & 5 deletions builds/ACS/ACS files/Python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ def main(night_dir, file, data, header_json):
obj = cls(header_json, night_dir)
obj.fix_keywords()
hdr = obj.hdr
# obj.reset_header()
try:
data = fix_image_orientation(hdr['CHANNEL'], data)
except:
error_str = '[WARNNING] The "CHANNEL" keyword was not found.'
write_error_log(error_str, night_dir)
data = fix_image_orientation(hdr['CHANNEL'], hdr['EMMODE'], data)
except Exception as e:
write_error_log(repr(e), night_dir)

file = verify_file_already_exists(file)
fits.writeto(file, data, hdr, output_verify='ignore')
Expand Down
14 changes: 10 additions & 4 deletions builds/ACS/ACS files/Python/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,18 @@ def load_json(header_json):
return None


def fix_image_orientation(channel, data):
setup = {1: [False, True, 2],
def fix_image_orientation(channel, em_mode, data):
setup = {'Conventional':
{1: [False, True, 2],
2: [False, False, 0],
3: [True, False, -1],
4: [False, False, -1]}
invert_x, invert_y, nrot = setup[channel]
4: [False, False, -1]},
'Electron Multiplying':
{1: [True, True, 2],
2: [True, False, 0],
3: [True, True, -1],
4: [False, True, -1]}}
invert_x, invert_y, nrot = setup[em_mode][channel]
return rotate_image(data, invert_x, invert_y, nrot)


Expand Down
Binary file modified builds/ACS/ACS.exe
Binary file not shown.
Binary file modified builds/ACS/data/zmq_bind_random.vi
Binary file not shown.
Binary file modified builds/ACS/data/zmq_config_curve.vi
Binary file not shown.
Binary file modified builds/ACS/data/zmq_ctx_check.vi
Binary file not shown.
Binary file modified builds/ACS/data/zmq_poll_scalar.vi
Binary file not shown.
Binary file modified builds/ACS/data/zmq_socket.vi
Binary file not shown.
Binary file modified builds/ACS/data/zmq_socket_check.vi
Binary file not shown.
Binary file modified builds/ACS/data/zmq_socket_set.vi
Binary file not shown.

0 comments on commit 25b8ad5

Please sign in to comment.