Skip to content

Commit

Permalink
adding communication with S4ICS, fixing img orientation of ch4
Browse files Browse the repository at this point in the history
  • Loading branch information
DBernardes committed Apr 17, 2024
1 parent 5aa8886 commit d07970e
Show file tree
Hide file tree
Showing 21 changed files with 13 additions and 11 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.45.6
v1.46.0
Binary file modified SPARC4_ACS/ACS files/Python/__pycache__/main.cpython-36.pyc
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions SPARC4_ACS/ACS files/Python/header/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ def _search_unwanted_kw(self, kw, _str):
f'An unwanted string was found in keyword value: {_str}', kw)



class Focuser(Header):

keywords = [('position', 'telfocus')]
Expand All @@ -148,8 +147,9 @@ class ICS(Header):

keywords = [("gfoc", 'gfoc'), ("gmir", 'gmir'),
('guidera', 'guidera'), ('guidedec', 'guidedec'),
('wpsel', 'wpsel'), ('wppos', 'wppos'), ('calw', 'calw'), ('asel', 'asel')]
# TODO: ICS manda o modo de cada componentes polarimetrico
('wpsel', 'wpsel'), ('wprot', 'wppos'), ('calw', 'calw'), ('asel', 'asel'), ('wprot_mode', 'WPROMODE'), ('wpsel_mode',
'WPSEMODE'), ('asel_mode', 'ANMODE'), ('calw_mode', 'CALWMODE'), ('gmir_mode', 'GMIRMODE'), ('gfoc_mode', 'GFOCMODE')]

replace_unknow_kws = {'WPSEL': 'NONE', 'CALW': 'NONE'}
boolean_kws = ['ASEL']

Expand Down
2 changes: 1 addition & 1 deletion SPARC4_ACS/ACS files/Python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def main(night_dir, file, data, header_json):
obj = cls(header_json, hdr, night_dir)
obj.fix_keywords()
hdr = obj.hdr
data = fix_image_orientation(hdr['CHANNEL'], data)
data = fix_image_orientation(hdr['CHANNEL'], data)

file = verify_file_already_exists(file)
fits.writeto(file, data, hdr, output_verify='fix')
Expand Down
Binary file modified SPARC4_ACS/Header content/init RxTx.vi
Binary file not shown.
4 changes: 3 additions & 1 deletion SPARC4_ACS/S4ACS.lvproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
<Item Name="ZEROMQ_S4GUI.vi" Type="VI" URL="../ZEROMQ_S4GUI.vi"/>
<Item Name="ZEROMQ_TCS.vi" Type="VI" URL="../ZEROMQ_TCS.vi"/>
<Item Name="ZEROMQ_WS.vi" Type="VI" URL="../ZEROMQ_WS.vi"/>
<Item Name="fix_ICS_msg.vi" Type="VI" URL="../fix_ICS_msg.vi"/>
<Item Name="ZEROMQ_ICS_2.vi" Type="VI" URL="../ZEROMQ_ICS_2.vi"/>
</Item>
<Item Name="zeroqmq" Type="Folder">
<Item Name="zeromq.lvlib" Type="Library" URL="/&lt;vilib&gt;/addons/zeromq/zeromq.lvlib"/>
Expand Down Expand Up @@ -262,7 +264,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">151</Property>
<Property Name="Bld_version.build" Type="Int">152</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/S4ACS.vi
Binary file not shown.
Binary file modified SPARC4_ACS/TESTE.vi
Binary file not shown.
Binary file modified SPARC4_ACS/ZEROMQ_ICS.vi
Binary file not shown.
Binary file added SPARC4_ACS/ZEROMQ_ICS_2.vi
Binary file not shown.
Binary file added SPARC4_ACS/fix_ICS_msg.vi
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.45.6
v1.46.0
Binary file modified builds/ACS/ACS files/Python/__pycache__/main.cpython-36.pyc
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions builds/ACS/ACS files/Python/header/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ def _search_unwanted_kw(self, kw, _str):
f'An unwanted string was found in keyword value: {_str}', kw)



class Focuser(Header):

keywords = [('position', 'telfocus')]
Expand All @@ -148,8 +147,9 @@ class ICS(Header):

keywords = [("gfoc", 'gfoc'), ("gmir", 'gmir'),
('guidera', 'guidera'), ('guidedec', 'guidedec'),
('wpsel', 'wpsel'), ('wppos', 'wppos'), ('calw', 'calw'), ('asel', 'asel')]
# TODO: ICS manda o modo de cada componentes polarimetrico
('wpsel', 'wpsel'), ('wprot', 'wppos'), ('calw', 'calw'), ('asel', 'asel'), ('wprot_mode', 'WPROMODE'), ('wpsel_mode',
'WPSEMODE'), ('asel_mode', 'ANMODE'), ('calw_mode', 'CALWMODE'), ('gmir_mode', 'GMIRMODE'), ('gfoc_mode', 'GFOCMODE')]

replace_unknow_kws = {'WPSEL': 'NONE', 'CALW': 'NONE'}
boolean_kws = ['ASEL']

Expand Down
2 changes: 1 addition & 1 deletion builds/ACS/ACS files/Python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def main(night_dir, file, data, header_json):
obj = cls(header_json, hdr, night_dir)
obj.fix_keywords()
hdr = obj.hdr
data = fix_image_orientation(hdr['CHANNEL'], data)
data = fix_image_orientation(hdr['CHANNEL'], data)

file = verify_file_already_exists(file)
fits.writeto(file, data, hdr, output_verify='fix')
Expand Down
Binary file modified builds/ACS/ACS.exe
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_check.vi
Binary file not shown.

0 comments on commit d07970e

Please sign in to comment.