Skip to content

Commit ab834d9

Browse files
Upload
1 parent e36b2d3 commit ab834d9

27 files changed

+5430
-15
lines changed

.idea/.name

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/INDIForJava_template_Jar.xml renamed to .idea/runConfigurations/INDIForJava_CCD_Jar.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<img src="res/logo.png" width="100" style="margin-bottom: 8px" alt="INDIForJava logo"/>
22

3-
## INDIForJava template module
4-
5-
INDIForJava template module (for development purposes only!).
6-
7-
<hr>
3+
## INDIForJava CCD module
84

95
INDIForJava is a set of libraries (written in the Java programming language) to implement clients (graphical and not
106
graphical ones), drivers and servers that follow the [INDI distributed control protocol](https://www.indilib.org/), a

build.gradle.kts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ plugins {
55
}
66

77
group = "org.indilib.i4j"
8-
description = "INDIForJava-template"
9-
version = "x.x.x"
8+
description = "INDIForJava-CCD"
9+
version = "2.0.5"
1010

1111
repositories {
1212
mavenCentral()
@@ -21,7 +21,8 @@ java {
2121
}
2222

2323
dependencies {
24-
api("com.github.INDIForJava:INDIForJava-core:2.0.5")
24+
api("com.github.INDIForJava:INDIForJava-driver:2.0.6")
25+
api("gov.nasa.gsfc.heasarc:nom-tam-fits:1.15.2")
2526
}
2627

2728
tasks.jar {
@@ -58,7 +59,7 @@ publishing {
5859
pom {
5960
name.set(project.name)
6061
description.set("INDIForJava is a set of libraries to implement clients and servers that follow the INDI protocol, designed to operate astronomical instrumentation.")
61-
url.set("https://github.com/INDIForJava/INDIForJava-template")
62+
url.set("https://github.com/INDIForJava/INDIForJava-CCD")
6263
licenses {
6364
license {
6465
name.set("GNU Lesser General Public License")
@@ -73,9 +74,9 @@ publishing {
7374
}
7475
}
7576
scm {
76-
connection.set("scm:git:git://github.com/INDIForJava/INDIForJava-template.git")
77-
developerConnection.set("scm:git:ssh://github.com/INDIForJava/INDIForJava-template.git")
78-
url.set("https://github.com/INDIForJava/INDIForJava-template")
77+
connection.set("scm:git:git://github.com/INDIForJava/INDIForJava-CCD.git")
78+
developerConnection.set("scm:git:ssh://github.com/INDIForJava/INDIForJava-CCD.git")
79+
url.set("https://github.com/INDIForJava/INDIForJava-CCD")
7980
}
8081
}
8182
}

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rootProject.name = "INDIForJava-template"
1+
rootProject.name = "INDIForJava-ccd"
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
package org.indilib.i4j.driver.ccd;
2+
3+
/*
4+
* #%L
5+
* INDI for Java Abstract CCD Driver
6+
* %%
7+
* Copyright (C) 2013 - 2014 indiforjava
8+
* %%
9+
* This program is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Lesser General Public License as
11+
* published by the Free Software Foundation, either version 3 of the
12+
* License, or (at your option) any later version.
13+
*
14+
* This program is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU General Lesser Public License for more details.
18+
*
19+
* You should have received a copy of the GNU General Lesser Public
20+
* License along with this program. If not, see
21+
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
22+
* #L%
23+
*/
24+
25+
/**
26+
* This class collects the different capabilities of the current ccd driver. It
27+
* consists of a list of booleans that can be set with the "builder" paradigm.
28+
*
29+
* @author Richard van Nieuwenhoven
30+
*/
31+
public class Capability {
32+
33+
/**
34+
* Can this driver abort a running exposure?
35+
*/
36+
private boolean canAbort = false;
37+
38+
/**
39+
* Can this driver bin pixel together?
40+
*/
41+
private boolean canBin = false;
42+
43+
/**
44+
* can this driver do expose a subframe?
45+
*/
46+
private boolean canSubFrame = false;
47+
48+
/**
49+
* Does this driver have a cooler (and a temperature sensor)?
50+
*/
51+
private boolean hasCooler = false;
52+
53+
/**
54+
* Does this ccd have a second ccd chip as a guider?
55+
*/
56+
private boolean hasGuideHead = false;
57+
58+
/**
59+
* does this ccd have an shutter (that the driver can operate)?
60+
*/
61+
private boolean hasShutter = false;
62+
63+
/**
64+
* @return True if CCD can abort exposure. False otherwise.
65+
*/
66+
public boolean canAbort() {
67+
return canAbort;
68+
}
69+
70+
/**
71+
* set the can abort value.
72+
*
73+
* @param canAbortValue
74+
* the new value
75+
* @return this to specify more capabilities
76+
*/
77+
public Capability canAbort(boolean canAbortValue) {
78+
canAbort = canAbortValue;
79+
return this;
80+
}
81+
82+
/**
83+
* @return True if CCD supports binning. False otherwise.
84+
*/
85+
public boolean canBin() {
86+
return canBin;
87+
}
88+
89+
/**
90+
* set the can bin value.
91+
*
92+
* @param canBinValue
93+
* the new value
94+
* @return this to specify more capabilities
95+
*/
96+
public Capability canBin(boolean canBinValue) {
97+
canBin = canBinValue;
98+
return this;
99+
}
100+
101+
/**
102+
* @return True if CCD supports subframing. False otherwise.
103+
*/
104+
public boolean canSubFrame() {
105+
return canSubFrame;
106+
}
107+
108+
/**
109+
* set the can subframe value.
110+
*
111+
* @param canSubFrameValue
112+
* the new value
113+
* @return this to specify more capabilities
114+
*/
115+
public Capability canSubFrame(boolean canSubFrameValue) {
116+
canSubFrame = canSubFrameValue;
117+
return this;
118+
}
119+
120+
/**
121+
* @return True if CCD has cooler and temperature can be controlled. False
122+
* otherwise.
123+
*/
124+
public boolean hasCooler() {
125+
return hasCooler;
126+
}
127+
128+
/**
129+
* set the has cooler value.
130+
*
131+
* @param hasCoolerValue
132+
* the new value
133+
* @return this to specify more capabilities
134+
*/
135+
public Capability hasCooler(boolean hasCoolerValue) {
136+
hasCooler = hasCoolerValue;
137+
return this;
138+
}
139+
140+
/**
141+
* @return True if CCD has guide head. False otherwise.
142+
*/
143+
public boolean hasGuideHead() {
144+
return hasGuideHead;
145+
}
146+
147+
/**
148+
* set the has guider head value.
149+
*
150+
* @param hasGuideHeadValue
151+
* the new value
152+
* @return this to specify more capabilities
153+
*/
154+
public Capability hasGuideHead(boolean hasGuideHeadValue) {
155+
hasGuideHead = hasGuideHeadValue;
156+
return this;
157+
}
158+
159+
/**
160+
* @return True if CCD has mechanical or electronic shutter. False
161+
* otherwise.
162+
*/
163+
public boolean hasShutter() {
164+
return hasShutter;
165+
}
166+
167+
/**
168+
* set the has shutter value.
169+
*
170+
* @param hasShutterValue
171+
* the new value
172+
* @return this to specify more capabilities
173+
*/
174+
public Capability hasShutter(boolean hasShutterValue) {
175+
hasShutter = hasShutterValue;
176+
return this;
177+
}
178+
179+
}
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
package org.indilib.i4j.driver.ccd;
2+
3+
/*
4+
* #%L
5+
* INDI for Java Abstract CCD Driver
6+
* %%
7+
* Copyright (C) 2013 - 2014 indiforjava
8+
* %%
9+
* This program is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Lesser General Public License as
11+
* published by the Free Software Foundation, either version 3 of the
12+
* License, or (at your option) any later version.
13+
*
14+
* This program is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU General Lesser Public License for more details.
18+
*
19+
* You should have received a copy of the GNU General Lesser Public
20+
* License along with this program. If not, see
21+
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
22+
* #L%
23+
*/
24+
25+
/**
26+
* The frame type of the ccd image.
27+
*
28+
* @author Richard van Nieuwenhoven
29+
*/
30+
public enum CcdFrame {
31+
32+
/**
33+
* This is a normal ccd image, when the ccd is a color model the result will
34+
* be a raw image that must be debayered.
35+
*/
36+
LIGHT_FRAME("Light Frame"),
37+
/**
38+
* This is a normal ccd rgb color image.
39+
*/
40+
TRI_COLOR_FRAME("Tricolor Image"),
41+
/**
42+
* This is a bias frame with is an image obtained from an opto-electronic
43+
* image sensor, with no actual exposure time. The image so obtained only
44+
* contains noise due to the electronics that elaborate the sensor data, and
45+
* not noise from charge accumulation (e.g. from dark current) within the
46+
* sensor itself.
47+
*/
48+
BIAS_FRAME("Bias Frame"),
49+
/**
50+
* This is a dark frame. A dark frame is an image captured with the sensor
51+
* in the dark, essentially just an image of noise in an image sensor. A
52+
* dark frame, or an average of several dark frames, can then be subtracted
53+
* from subsequent images to correct for fixed-pattern noise such as that
54+
* caused by dark current. Dark-frame subtraction has been done for some
55+
* time in scientific imaging; many newer consumer digital cameras offer it
56+
* as an option, or may do it automatically for exposures beyond a certain
57+
* time.
58+
*/
59+
DARK_FRAME("Dark Frame"),
60+
/**
61+
* This is a flat field frame. In order for an astrophotographer to capture
62+
* a light frame, he or she must place a light source over the imaging
63+
* instrument's objective lens such that the light source emanates evenly
64+
* through the users optics. The photographer must then adjust the exposure
65+
* of their imaging device (CCD or DSLR camera) so that when the histogram
66+
* of the image is viewed, a peak reaching about 40–70% of the dynamic range
67+
* (Maximum range of values for a changeable quantity. In this case its
68+
* pixel value) of the imaging device is seen.
69+
*/
70+
FLAT_FRAME("Flat Frame");
71+
72+
/**
73+
* The fits attribute name for this frame type.
74+
*/
75+
private final String fitsName;
76+
77+
/**
78+
* internal constructor.
79+
*
80+
* @param fitsName
81+
* the fits attribute name for this frame type.
82+
*/
83+
private CcdFrame(String fitsName) {
84+
this.fitsName = fitsName;
85+
}
86+
87+
/**
88+
* @return The fits attribute name for this frame type.
89+
*/
90+
public String fitsValue() {
91+
return fitsName;
92+
}
93+
94+
}

0 commit comments

Comments
 (0)