提交代码

This commit is contained in:
ldh
2026-11-19 16:42:26 +08:00
parent dd6edce089
commit 4929d5dcd5
209 changed files with 158631 additions and 1311 deletions
+82
View File
@@ -0,0 +1,82 @@
/**
* 设备连接状态接口封装。
* 后端实现见 HardwareWeb/Controllers/DeviceController.cs:
* GET /api/devices/status -> { allConnected, devices, updatedAt }
* POST /api/devices/retry -> 同上
*/
export interface DeviceStatusItem {
key: string
name: string
connected: boolean
status: string
message: string | null
updatedAt: string
}
export interface DeviceStatus {
allConnected: boolean
devices: DeviceStatusItem[]
updatedAt: string
}
const API_BASE = (import.meta.env.VITE_API_BASE ?? '').replace(/\/$/, '')
const REQUEST_TIMEOUT = 30000
export class DeviceApiError extends Error {
readonly status: number
constructor(message: string, status = 0) {
super(message)
this.name = 'DeviceApiError'
this.status = status
}
}
async function request<T>(path: string, init?: RequestInit): Promise<T> {
const controller = new AbortController()
const timer = window.setTimeout(() => controller.abort(), REQUEST_TIMEOUT)
try {
const response = await fetch(`${API_BASE}${path}`, {
...init,
cache: 'no-store',
signal: controller.signal,
headers: {
Accept: 'application/json',
...(init?.headers ?? {}),
},
})
if (!response.ok) {
let detail = `HTTP ${response.status}`
try {
const body = (await response.json()) as { message?: string; error?: string }
detail = body.message ?? body.error ?? detail
} catch {
// 非 JSON 响应时保留状态码
}
throw new DeviceApiError(detail, response.status)
}
return (await response.json()) as T
} catch (error) {
if (error instanceof DeviceApiError) throw error
if (error instanceof DOMException && error.name === 'AbortError') {
throw new DeviceApiError('设备服务响应超时')
}
throw new DeviceApiError(
error instanceof Error ? error.message : '无法连接设备服务',
)
} finally {
window.clearTimeout(timer)
}
}
export function getDeviceStatus(): Promise<DeviceStatus> {
return request<DeviceStatus>('/api/devices/status')
}
export function retryDevices(): Promise<DeviceStatus> {
return request<DeviceStatus>('/api/devices/retry', { method: 'POST' })
}
+197
View File
@@ -0,0 +1,197 @@
/**
* 扫描流程接口封装。
* 后端实现见 HardwareWeb/Controllers/ScanController.cs:
* POST /api/scan/start -> { scanId, totalPoints }
* POST /api/scan/abort -> { aborted }
* GET /api/scan/current -> ScanProgress
* GET /api/scan/latest -> ScanRun
* GET /api/scan/{scanId} -> ScanRun
*/
export interface ScanProgress {
scanId: string
phase: string
pointIndex: number
totalPoints: number
completedPoints: number
percent: number
message: string
stageX: number
stageY: number
stageMoving: boolean
updatedAt: string
}
export interface ScanSegment {
deviceIndex: number
serialNumber: string
wavelengthStart: number
wavelengthEnd: number
pointCount: number
}
export interface ScanElement {
symbol: string
name: string
intensityLevel: string
abundance: number
rawAbundance: number
verdict: string
maxIntensity: number
matchedWavelength: number
matchedLines: number
}
export interface ScanPointResult {
index: number
pixelX: number
pixelY: number
stageX: number
stageY: number
succeeded: boolean
error: string | null
wavelengths: number[]
spectrum: number[]
segments: ScanSegment[]
elements: ScanElement[]
temperature: number
electronDensity: number
acquiredAt: string
}
export interface ScanRun {
scanId: string
status: string
startedAt: string
finishedAt: string | null
error: string | null
totalPoints: number
completedPoints: number
imageWidth: number
imageHeight: number
imageMimeType: string | null
imageBase64: string | null
points: ScanPointResult[]
}
export interface ScanStartResult {
scanId: string
totalPoints: number
}
/** 历史列表中的一条扫描记录(不含图片与光谱数据)。 */
export interface ScanHistoryItem {
scanId: string
status: string
startedAt: string
finishedAt: string | null
totalPoints: number
completedPoints: number
error: string | null
}
const API_BASE = (import.meta.env.VITE_API_BASE ?? '').replace(/\/$/, '')
const DEFAULT_TIMEOUT = 15000
const START_TIMEOUT = 60000
const RESULT_TIMEOUT = 30000
export class ScanApiError extends Error {
readonly status: number
constructor(message: string, status = 0) {
super(message)
this.name = 'ScanApiError'
this.status = status
}
}
async function request<T>(
path: string,
init?: RequestInit,
timeout = DEFAULT_TIMEOUT,
): Promise<T> {
const controller = new AbortController()
const timer = window.setTimeout(() => controller.abort(), timeout)
try {
const response = await fetch(`${API_BASE}${path}`, {
...init,
cache: 'no-store',
signal: controller.signal,
headers: {
Accept: 'application/json',
...(init?.headers ?? {}),
},
})
if (!response.ok) {
let detail = `HTTP ${response.status}`
try {
const body = (await response.json()) as { message?: string; error?: string }
detail = body.message ?? body.error ?? detail
} catch {
// 非 JSON 响应时保留状态码
}
throw new ScanApiError(detail, response.status)
}
return (await response.json()) as T
} catch (error) {
if (error instanceof ScanApiError) throw error
if (error instanceof DOMException && error.name === 'AbortError') {
throw new ScanApiError('扫描服务响应超时')
}
throw new ScanApiError(
error instanceof Error ? error.message : '无法连接扫描服务',
)
} finally {
window.clearTimeout(timer)
}
}
/** 开始一次扫描(后台任务,立即返回)。 */
export function startScan(): Promise<ScanStartResult> {
return request<ScanStartResult>(
'/api/scan/start',
{ method: 'POST' },
START_TIMEOUT,
)
}
/** 中止当前扫描:停止流程、丢弃数据并回零。 */
export function abortScan(): Promise<{ aborted: boolean }> {
return request<{ aborted: boolean }>('/api/scan/abort', { method: 'POST' })
}
export function getCurrentScan(): Promise<ScanProgress> {
return request<ScanProgress>('/api/scan/current')
}
export function getScan(scanId: string): Promise<ScanRun> {
return request<ScanRun>(
`/api/scan/${encodeURIComponent(scanId)}`,
undefined,
RESULT_TIMEOUT,
)
}
export function getLatestScan(): Promise<ScanRun> {
return request<ScanRun>('/api/scan/latest', undefined, RESULT_TIMEOUT)
}
/** 历史扫描记录列表(按开始时间倒序)。 */
export function getScanHistory(limit = 100): Promise<ScanHistoryItem[]> {
return request<ScanHistoryItem[]>(`/api/scan/history?limit=${limit}`)
}
/** 删除一条历史扫描记录及其采样点。 */
export function deleteScan(scanId: string): Promise<{ deleted: boolean }> {
return request<{ deleted: boolean }>(
`/api/scan/${encodeURIComponent(scanId)}`,
{ method: 'DELETE' },
)
}
export function getStageHubUrl(): string {
return `${API_BASE}/stageHub`
}
@@ -9,6 +9,7 @@ const emit = defineEmits<{
close: []
'system-config': []
ruler: []
history: []
}>()
const firstButton = ref<HTMLButtonElement | null>(null)
@@ -115,6 +116,35 @@ onBeforeUnmount(() => {
<span class="function-card__label">标尺设定</span>
<span class="function-card__desc">配置标尺与校准参数</span>
</button>
<button
class="function-card"
type="button"
@click="emit('history')"
>
<span class="function-card__icon" aria-hidden="true">
<svg viewBox="0 0 64 64">
<circle
cx="32"
cy="32"
r="22"
fill="none"
stroke="currentColor"
stroke-width="3"
/>
<path
d="M32 19v14l9 5"
fill="none"
stroke="currentColor"
stroke-width="3"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</span>
<span class="function-card__label">查看历史</span>
<span class="function-card__desc">浏览历史检测记录</span>
</button>
</div>
<button class="panel-card__close" type="button" @click="close">
@@ -134,57 +164,111 @@ onBeforeUnmount(() => {
display: grid;
place-items: center;
padding: 24px;
background: rgba(18, 33, 54, 0.44);
backdrop-filter: blur(5px);
background: rgba(3, 8, 18, 0.68);
backdrop-filter: blur(8px);
}
.panel-card {
width: 820px;
position: relative;
width: 980px;
padding: 42px 46px 34px;
border: 1px solid rgba(255, 255, 255, 0.65);
border-radius: 24px;
background: #fff;
box-shadow: 0 30px 80px rgba(12, 30, 55, 0.3);
overflow: hidden;
border: 1px solid rgba(130, 175, 255, 0.2);
border-radius: 26px;
background: linear-gradient(158deg, rgba(22, 42, 78, 0.98) 0%, rgba(8, 16, 32, 0.99) 100%);
box-shadow:
0 40px 90px rgba(0, 6, 20, 0.6),
0 0 50px rgba(48, 118, 255, 0.12),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
text-align: center;
}
.panel-card::before {
content: '';
position: absolute;
top: 0;
right: 48px;
left: 48px;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(130, 214, 255, 0.55), transparent);
pointer-events: none;
}
.panel-card__header h2 {
color: #1f2937;
color: #eef5ff;
font-size: 32px;
font-weight: 600;
letter-spacing: 2px;
text-shadow: 0 0 26px rgba(80, 150, 255, 0.28);
}
.panel-card__header p {
margin-top: 12px;
color: #778394;
color: rgba(158, 190, 226, 0.7);
font-size: 19px;
letter-spacing: 1px;
}
.panel-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 24px;
margin-top: 32px;
}
.function-card {
--accent-1: #6fb0ff;
--accent-2: #2f6fd0;
--accent-glow: rgba(70, 140, 255, 0.28);
--accent-line: rgba(111, 176, 255, 0.5);
position: relative;
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
padding: 30px 24px 28px;
border: 2px solid var(--line);
border-radius: 18px;
background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
overflow: hidden;
border: 1px solid rgba(255, 255, 255, 0.09);
border-radius: 20px;
background:
radial-gradient(135% 105% at 106% -6%, var(--accent-glow) 0%, transparent 52%),
linear-gradient(
158deg,
rgba(255, 255, 255, 0.08) 0%,
rgba(255, 255, 255, 0.02) 58%,
rgba(255, 255, 255, 0.045) 100%
);
box-shadow:
0 18px 40px rgba(1, 8, 24, 0.42),
inset 0 1px 0 rgba(255, 255, 255, 0.1);
transition:
transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
border-color 0.25s ease,
box-shadow 0.25s ease;
}
.function-card:nth-child(2) {
--accent-1: #5ce3d6;
--accent-2: #109c91;
--accent-glow: rgba(40, 200, 188, 0.24);
--accent-line: rgba(92, 227, 214, 0.5);
}
.function-card:nth-child(3) {
--accent-1: #ffd166;
--accent-2: #e08f00;
--accent-glow: rgba(255, 176, 32, 0.24);
--accent-line: rgba(255, 203, 92, 0.5);
}
.function-card:hover {
border-color: #b9d1f3;
box-shadow: 0 16px 34px rgba(47, 111, 208, 0.16);
transform: translateY(-3px);
border-color: var(--accent-line);
box-shadow:
0 26px 52px rgba(1, 8, 24, 0.55),
0 0 0 1px var(--accent-glow),
0 0 34px var(--accent-glow),
inset 0 1px 0 rgba(255, 255, 255, 0.14);
transform: translateY(-4px);
}
.function-card__icon {
@@ -192,26 +276,34 @@ onBeforeUnmount(() => {
place-items: center;
width: 88px;
height: 88px;
border-radius: 50%;
color: var(--blue);
background: linear-gradient(145deg, #f1f7ff, #dfeaff);
box-shadow: inset 0 1px 0 #fff, 0 8px 22px rgba(47, 111, 208, 0.14);
border-radius: 24px;
background: linear-gradient(150deg, var(--accent-1) 0%, var(--accent-2) 100%);
box-shadow:
0 14px 28px var(--accent-glow),
inset 0 1px 0 rgba(255, 255, 255, 0.4);
color: #f4f9ff;
transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.function-card__icon svg {
width: 48px;
height: 48px;
filter: drop-shadow(0 2px 6px rgba(4, 16, 40, 0.35));
}
.function-card:hover .function-card__icon {
transform: scale(1.06);
}
.function-card__label {
color: #1f2937;
color: #f3f8ff;
font-size: 26px;
font-weight: 600;
letter-spacing: 2px;
}
.function-card__desc {
color: var(--muted);
color: rgba(158, 190, 226, 0.6);
font-size: 17px;
letter-spacing: 0.5px;
}
@@ -220,18 +312,19 @@ onBeforeUnmount(() => {
width: 180px;
height: 54px;
margin-top: 30px;
border: 2px solid var(--line-strong);
border: 1px solid rgba(130, 175, 255, 0.28);
border-radius: 12px;
color: var(--ink-soft);
background: rgba(18, 40, 78, 0.5);
color: #bcd9ff;
font-size: 19px;
font-weight: 600;
letter-spacing: 3px;
background: #fff;
transition: background 0.2s ease;
transition: background 0.2s ease, border-color 0.2s ease;
}
.panel-card__close:hover {
background: var(--surface-soft);
border-color: rgba(150, 205, 255, 0.5);
background: rgba(30, 66, 128, 0.6);
}
.function-panel-enter-active,
@@ -11,7 +11,10 @@ const emit = defineEmits<{
success: []
}>()
const password = ref('')
/** 默认填入测试密码,开发与正式环境均生效;上线前需改回空字符串 */
const DEFAULT_PASSWORD = '123456'
const password = ref(DEFAULT_PASSWORD)
const error = ref('')
const submitting = ref(false)
const inputElement = ref<HTMLInputElement | null>(null)
@@ -51,7 +54,7 @@ watch(
() => props.open,
async (open) => {
if (open) {
password.value = ''
password.value = DEFAULT_PASSWORD
error.value = ''
window.addEventListener('keydown', onKeydown)
await nextTick()
@@ -142,17 +145,21 @@ onBeforeUnmount(() => {
display: grid;
place-items: center;
padding: 24px;
background: rgba(18, 33, 54, 0.44);
backdrop-filter: blur(5px);
background: rgba(3, 8, 18, 0.68);
backdrop-filter: blur(8px);
}
.auth-card {
width: 560px;
padding: 42px 44px 38px;
border: 1px solid rgba(255, 255, 255, 0.65);
border-radius: 24px;
background: #fff;
box-shadow: 0 30px 80px rgba(12, 30, 55, 0.3);
border: 1px solid rgba(130, 175, 255, 0.2);
border-radius: 26px;
background: linear-gradient(158deg, rgba(22, 42, 78, 0.98) 0%, rgba(8, 16, 32, 0.99) 100%);
box-shadow:
0 40px 90px rgba(0, 6, 20, 0.6),
0 0 50px rgba(48, 118, 255, 0.12),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
color-scheme: dark;
text-align: center;
}
@@ -162,10 +169,13 @@ onBeforeUnmount(() => {
width: 86px;
height: 86px;
margin: 0 auto 24px;
border: 1px solid rgba(120, 200, 255, 0.3);
border-radius: 50%;
color: var(--blue);
background: linear-gradient(145deg, #f1f7ff, #dfeaff);
box-shadow: inset 0 1px 0 #fff, 0 8px 22px rgba(47, 111, 208, 0.14);
background: rgba(70, 140, 255, 0.14);
box-shadow:
0 0 32px rgba(70, 140, 255, 0.22),
inset 0 1px 0 rgba(255, 255, 255, 0.1);
color: #7fe0ff;
}
.auth-card__icon svg {
@@ -174,15 +184,16 @@ onBeforeUnmount(() => {
}
.auth-card h2 {
color: #1f2937;
color: #eef5ff;
font-size: 30px;
font-weight: 600;
letter-spacing: 1px;
text-shadow: 0 0 24px rgba(80, 150, 255, 0.28);
}
.auth-card p {
margin-top: 14px;
color: #778394;
color: rgba(158, 190, 226, 0.7);
font-size: 19px;
letter-spacing: 0.5px;
}
@@ -195,9 +206,11 @@ onBeforeUnmount(() => {
width: 100%;
height: 62px;
padding: 0 22px;
border: 2px solid var(--line-strong);
border: 1px solid rgba(130, 175, 255, 0.22);
border-radius: 12px;
color: var(--ink);
background: rgba(6, 14, 28, 0.7);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
color: #e8f2ff;
font-family: inherit;
font-size: 22px;
letter-spacing: 2px;
@@ -205,18 +218,24 @@ onBeforeUnmount(() => {
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-card__input::placeholder {
color: rgba(158, 190, 226, 0.4);
}
.auth-card__input:focus {
border-color: var(--blue);
box-shadow: 0 0 0 4px rgba(47, 111, 208, 0.14);
border-color: rgba(120, 200, 255, 0.55);
box-shadow:
0 0 0 4px rgba(70, 140, 255, 0.15),
0 0 24px rgba(70, 140, 255, 0.12);
}
.auth-card__input:disabled {
background: #f4f6f9;
background: rgba(4, 10, 22, 0.8);
}
.auth-card__error {
margin-top: 12px;
color: var(--red);
color: #ff9d9d;
font-size: 17px;
letter-spacing: 0.5px;
}
@@ -234,33 +253,45 @@ onBeforeUnmount(() => {
font-size: 20px;
font-weight: 600;
letter-spacing: 3px;
transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
transition:
transform 0.2s ease,
box-shadow 0.2s ease,
background 0.2s ease,
border-color 0.2s ease;
}
.auth-card__button:disabled {
cursor: default;
opacity: 0.65;
opacity: 0.5;
}
.auth-card__button--ghost {
border: 2px solid var(--line-strong);
color: var(--ink-soft);
background: #fff;
border: 1px solid rgba(130, 175, 255, 0.28);
background: rgba(18, 40, 78, 0.5);
color: #bcd9ff;
}
.auth-card__button--ghost:hover:not(:disabled) {
background: var(--surface-soft);
border-color: rgba(150, 205, 255, 0.5);
background: rgba(30, 66, 128, 0.6);
}
.auth-card__button--primary {
color: #fff;
background: linear-gradient(180deg, #4b89e4 0%, #2f6fd0 100%);
box-shadow: 0 10px 22px rgba(47, 111, 208, 0.28);
background: linear-gradient(180deg, #ffd166 0%, #f0ac0b 100%);
box-shadow:
0 14px 30px rgba(240, 172, 11, 0.28),
0 0 26px rgba(255, 190, 60, 0.16),
inset 0 1px 0 rgba(255, 255, 255, 0.6);
color: #241500;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.25);
}
.auth-card__button--primary:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 14px 28px rgba(47, 111, 208, 0.36);
box-shadow:
0 18px 38px rgba(240, 172, 11, 0.36),
0 0 34px rgba(255, 190, 60, 0.26),
inset 0 1px 0 rgba(255, 255, 255, 0.6);
transform: translateY(-2px);
}
.auth-modal-enter-active,
+43 -13
View File
@@ -128,14 +128,30 @@ onMounted(async () => {
<style scoped>
.camera-card {
position: relative;
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
border: 1px solid #d8e0e9;
border-radius: 18px;
background: #fff;
box-shadow: var(--shadow-card);
border: 1px solid rgba(130, 175, 255, 0.16);
border-radius: 26px;
background: linear-gradient(160deg, rgba(20, 38, 70, 0.55) 0%, rgba(7, 14, 30, 0.75) 100%);
box-shadow:
0 30px 70px rgba(0, 10, 32, 0.5),
inset 0 1px 0 rgba(255, 255, 255, 0.07);
backdrop-filter: blur(16px);
}
.camera-card::before {
content: '';
position: absolute;
top: 0;
right: 40px;
left: 40px;
z-index: 2;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(130, 214, 255, 0.6), transparent);
pointer-events: none;
}
.camera-card__header {
@@ -143,28 +159,41 @@ onMounted(async () => {
flex: none;
align-items: center;
justify-content: space-between;
height: 76px;
height: 80px;
padding: 0 28px;
background: linear-gradient(180deg, #3d80e2 0%, #2f6fd0 100%);
border-bottom: 1px solid rgba(130, 175, 255, 0.12);
background: linear-gradient(120deg, rgba(26, 58, 112, 0.85) 0%, rgba(10, 24, 52, 0.8) 100%);
}
.camera-card__header h2 {
color: #fff;
display: flex;
align-items: center;
gap: 12px;
color: #eef5ff;
font-size: 30px;
font-weight: 600;
letter-spacing: 3px;
text-shadow: 0 1px 3px rgba(16, 49, 101, 0.22);
text-shadow: 0 0 22px rgba(80, 150, 255, 0.3);
}
.camera-card__header h2::before {
content: '';
width: 4px;
height: 26px;
border-radius: 4px;
background: linear-gradient(180deg, #7fe0ff, #4d8bf0);
box-shadow: 0 0 14px rgba(90, 170, 255, 0.7);
}
.camera-card__status {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 5px 12px;
border: 1px solid rgba(255, 255, 255, 0.24);
padding: 5px 14px;
border: 1px solid rgba(130, 195, 255, 0.28);
border-radius: 30px;
background: rgba(255, 255, 255, 0.12);
color: rgba(255, 255, 255, 0.92);
background: rgba(16, 40, 80, 0.5);
color: rgba(216, 236, 255, 0.9);
font-size: 15px;
letter-spacing: 1px;
}
@@ -196,7 +225,8 @@ onMounted(async () => {
position: relative;
flex: 1;
overflow: hidden;
background: #080d14;
background: #04070e;
box-shadow: inset 0 0 50px rgba(0, 4, 14, 0.6);
}
.camera-card__image {
+146 -57
View File
@@ -6,6 +6,8 @@ withDefaults(
title: string
tone: 'blue' | 'orange' | 'green' | 'teal'
icon: 'detect' | 'metal' | 'soil' | 'water'
caption?: string
index?: string
}>(),
{},
)
@@ -25,108 +27,195 @@ defineEmits<{
<span class="module-button__icon">
<ModuleIcon :name="icon" />
</span>
<span class="module-button__label">{{ title }}</span>
<span v-if="index" class="module-button__index">{{ index }}</span>
<span class="module-button__body">
<span class="module-button__label">{{ title }}</span>
<span v-if="caption" class="module-button__caption">{{ caption }}</span>
</span>
<span class="module-button__bar" aria-hidden="true"></span>
</button>
</template>
<style scoped>
.module-button {
--tone-1: #6fb0ff;
--tone-2: #2f6fd0;
--tone-glow: rgba(70, 140, 255, 0.28);
--tone-line: rgba(111, 176, 255, 0.55);
position: relative;
display: block;
height: 252px;
overflow: hidden;
border-radius: 18px;
border: 1px solid rgba(255, 255, 255, 0.09);
border-radius: 20px;
text-align: left;
background:
radial-gradient(135% 105% at 106% -6%, var(--tone-glow) 0%, transparent 52%),
linear-gradient(
158deg,
rgba(255, 255, 255, 0.08) 0%,
rgba(255, 255, 255, 0.02) 58%,
rgba(255, 255, 255, 0.045) 100%
);
box-shadow:
0 16px 30px var(--module-shadow),
inset 0 2px 0 rgba(255, 255, 255, 0.55),
inset 0 -10px 24px rgba(0, 0, 0, 0.08);
transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
box-shadow 0.25s ease;
0 18px 40px rgba(1, 8, 24, 0.42),
inset 0 1px 0 rgba(255, 255, 255, 0.1);
transition:
transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
border-color 0.3s ease,
box-shadow 0.3s ease;
}
/* 悬停时从左上扫过的高光 */
.module-button::before {
content: '';
position: absolute;
inset: 0;
background:
radial-gradient(ellipse 85% 65% at 18% 6%, rgba(255, 255, 255, 0.34) 0%, transparent 58%),
linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 36%);
inset: -40% -70%;
background: linear-gradient(
115deg,
transparent 42%,
rgba(255, 255, 255, 0.14) 50%,
transparent 58%
);
transform: translateX(-62%);
transition: transform 0.85s ease;
pointer-events: none;
}
.module-button::after {
content: '';
position: absolute;
right: 18px;
bottom: 14px;
left: 18px;
height: 1px;
background: rgba(255, 255, 255, 0.2);
opacity: 0.8;
.module-button:hover {
border-color: var(--tone-line);
box-shadow:
0 26px 52px rgba(1, 8, 24, 0.55),
0 0 0 1px var(--tone-glow),
0 0 34px var(--tone-glow),
inset 0 1px 0 rgba(255, 255, 255, 0.14);
transform: translateY(-6px);
}
.module-button:hover {
transform: translateY(-4px);
box-shadow:
0 22px 38px var(--module-shadow-strong),
inset 0 2px 0 rgba(255, 255, 255, 0.6),
inset 0 -10px 24px rgba(0, 0, 0, 0.08);
.module-button:hover::before {
transform: translateX(62%);
}
.module-button:active {
transform: translateY(-1px) scale(0.995);
transform: translateY(-2px) scale(0.995);
}
.module-button--blue {
--module-shadow: rgba(47, 111, 208, 0.26);
--module-shadow-strong: rgba(47, 111, 208, 0.38);
background: linear-gradient(145deg, #4b8ae8 0%, #3778d9 48%, #2f6fd0 100%);
--tone-1: #6fb0ff;
--tone-2: #2f6fd0;
--tone-glow: rgba(70, 140, 255, 0.28);
--tone-line: rgba(111, 176, 255, 0.55);
}
.module-button--orange {
--module-shadow: rgba(238, 166, 11, 0.28);
--module-shadow-strong: rgba(238, 166, 11, 0.4);
background: linear-gradient(145deg, #ffc845 0%, #f8b526 50%, #eea50b 100%);
--tone-1: #ffd166;
--tone-2: #e08f00;
--tone-glow: rgba(255, 176, 32, 0.24);
--tone-line: rgba(255, 203, 92, 0.5);
}
.module-button--green {
--module-shadow: rgba(107, 171, 49, 0.28);
--module-shadow-strong: rgba(107, 171, 49, 0.4);
background: linear-gradient(145deg, #91d258 0%, #7cc242 50%, #67ad2f 100%);
--tone-1: #a4e56f;
--tone-2: #4f9a26;
--tone-glow: rgba(118, 200, 60, 0.22);
--tone-line: rgba(164, 229, 111, 0.5);
}
.module-button--teal {
--module-shadow: rgba(38, 174, 163, 0.28);
--module-shadow-strong: rgba(38, 174, 163, 0.4);
background: linear-gradient(145deg, #46cec2 0%, #2fb8ac 50%, #22a99e 100%);
--tone-1: #5ce3d6;
--tone-2: #109c91;
--tone-glow: rgba(40, 200, 188, 0.24);
--tone-line: rgba(92, 227, 214, 0.5);
}
.module-button__icon {
position: absolute;
top: 24px;
left: 24px;
top: 26px;
left: 28px;
display: grid;
place-items: center;
width: 92px;
height: 92px;
padding: 10px;
border: 1px solid rgba(255, 255, 255, 0.36);
border-radius: 16px;
background: rgba(255, 255, 255, 0.14);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
width: 86px;
height: 86px;
border-radius: 22px;
color: #f4f9ff;
background: linear-gradient(150deg, var(--tone-1) 0%, var(--tone-2) 100%);
box-shadow:
0 14px 28px var(--tone-glow),
inset 0 1px 0 rgba(255, 255, 255, 0.4);
transition:
transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
box-shadow 0.3s ease;
}
.module-button__icon :deep(svg) {
width: 52px;
height: 52px;
filter: drop-shadow(0 2px 6px rgba(4, 16, 40, 0.35));
}
.module-button:hover .module-button__icon {
box-shadow:
0 18px 34px var(--tone-glow),
inset 0 1px 0 rgba(255, 255, 255, 0.45);
transform: scale(1.06);
}
.module-button__index {
position: absolute;
top: 24px;
right: 28px;
color: rgba(255, 255, 255, 0.1);
font-size: 46px;
font-variant-numeric: tabular-nums;
font-weight: 700;
letter-spacing: 2px;
line-height: 1;
}
.module-button__body {
position: absolute;
right: 28px;
bottom: 32px;
left: 28px;
display: flex;
flex-direction: column;
gap: 8px;
}
.module-button__label {
position: absolute;
right: 18px;
bottom: 44px;
left: 18px;
color: #fff;
font-size: 31px;
color: #f3f8ff;
font-size: 30px;
font-weight: 600;
letter-spacing: 4px;
text-align: center;
text-shadow: 0 2px 5px rgba(33, 49, 79, 0.24);
letter-spacing: 3px;
line-height: 1.25;
text-shadow: 0 2px 12px rgba(2, 10, 30, 0.45);
}
.module-button__caption {
color: var(--tone-1);
font-size: 12px;
font-weight: 600;
letter-spacing: 2.6px;
opacity: 0.85;
text-transform: uppercase;
}
.module-button__bar {
position: absolute;
bottom: 0;
left: 0;
width: 42%;
height: 3px;
border-radius: 0 3px 3px 0;
background: linear-gradient(90deg, var(--tone-1), transparent);
opacity: 0.55;
transition: width 0.4s ease, opacity 0.3s ease;
}
.module-button:hover .module-button__bar {
width: 100%;
opacity: 1;
}
</style>
+22 -2
View File
@@ -4,13 +4,17 @@ withDefaults(
title: string
subtitle?: string
variant?: 'default' | 'process' | 'result'
theme?: 'light' | 'dark'
}>(),
{ variant: 'default' },
{ variant: 'default', theme: 'light' },
)
</script>
<template>
<header class="page-header" :class="`page-header--${variant}`">
<header
class="page-header"
:class="[`page-header--${variant}`, { 'page-header--dark': theme === 'dark' }]"
>
<div class="page-header__side">
<slot name="left" />
</div>
@@ -47,6 +51,22 @@ withDefaults(
height: 118px;
}
.page-header--dark {
border-bottom: 1px solid rgba(130, 175, 255, 0.12);
background: linear-gradient(180deg, rgba(8, 16, 34, 0.94) 0%, rgba(8, 16, 34, 0.6) 100%);
box-shadow: 0 14px 40px rgba(0, 6, 20, 0.32);
backdrop-filter: blur(18px);
}
.page-header--dark .page-header__center h1 {
color: #eef5ff;
text-shadow: 0 0 28px rgba(80, 150, 255, 0.3);
}
.page-header--dark .page-header__center p {
color: rgba(158, 190, 226, 0.7);
}
.page-header__side {
display: flex;
align-items: center;
@@ -227,14 +227,16 @@ onMounted(() => {
height: 100%;
padding: 24px 24px 18px;
overflow: hidden;
border-radius: 20px;
border: 1px solid rgba(130, 180, 255, 0.2);
border-radius: 26px;
touch-action: none;
background:
radial-gradient(ellipse 80% 60% at 82% 8%, rgba(120, 174, 255, 0.35), transparent 62%),
linear-gradient(145deg, #3c7fdd 0%, #2f6fd0 48%, #2559ad 100%);
radial-gradient(ellipse 80% 60% at 82% 8%, rgba(106, 168, 255, 0.4), transparent 62%),
linear-gradient(150deg, #1f4fa8 0%, #173c86 48%, #0f2a5e 100%);
box-shadow:
0 18px 46px rgba(37, 89, 173, 0.28),
inset 0 1px 0 rgba(255, 255, 255, 0.24);
0 24px 60px rgba(3, 12, 34, 0.55),
0 0 40px rgba(48, 118, 255, 0.18),
inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.principle::before {
@@ -291,8 +293,10 @@ onMounted(() => {
position: relative;
flex: 1;
overflow: hidden;
border-radius: 14px;
background: #255bb3;
border-radius: 16px;
border: 1px solid rgba(130, 180, 255, 0.16);
background: #0b1f45;
box-shadow: inset 0 0 40px rgba(3, 12, 34, 0.55);
touch-action: none;
cursor: grab;
user-select: none;
+42 -6
View File
@@ -1,11 +1,15 @@
<script setup lang="ts">
import { computed } from 'vue'
const props = defineProps<{
progress: number
label: string
note?: string
}>()
const props = withDefaults(
defineProps<{
progress: number
label: string
note?: string
theme?: 'light' | 'dark'
}>(),
{ theme: 'light' },
)
const clamped = computed(() => Math.max(0, Math.min(100, props.progress)))
</script>
@@ -14,6 +18,7 @@ const clamped = computed(() => Math.max(0, Math.min(100, props.progress)))
<div class="progress-strip">
<div
class="progress-strip__track"
:class="{ 'progress-strip__track--dark': theme === 'dark' }"
role="progressbar"
:aria-valuenow="Math.round(clamped)"
aria-valuemin="0"
@@ -29,7 +34,11 @@ const clamped = computed(() => Math.max(0, Math.min(100, props.progress)))
</span>
</div>
<span v-if="note" class="progress-strip__note">{{ note }}</span>
<span
v-if="note"
class="progress-strip__note"
:class="{ 'progress-strip__note--dark': theme === 'dark' }"
>{{ note }}</span>
</div>
</template>
@@ -89,4 +98,31 @@ const clamped = computed(() => Math.max(0, Math.min(100, props.progress)))
letter-spacing: 1px;
text-align: right;
}
.progress-strip__track--dark {
border-color: rgba(130, 175, 255, 0.18);
background: rgba(7, 16, 34, 0.75);
box-shadow: inset 0 2px 10px rgba(0, 4, 16, 0.6);
}
.progress-strip__track--dark .progress-strip__fill {
border-radius: 9px;
background:
linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 24%),
linear-gradient(180deg, #6fc6ff 0%, #3f86f0 55%, #2c63c9 100%);
box-shadow: 0 0 22px rgba(80, 170, 255, 0.45);
}
.progress-strip__track--dark .progress-strip__label {
color: rgba(170, 205, 240, 0.75);
}
.progress-strip__track--dark .progress-strip__label--on-fill {
color: #f2fbff;
text-shadow: 0 2px 8px rgba(4, 24, 60, 0.6);
}
.progress-strip__note--dark {
color: rgba(158, 190, 226, 0.72);
}
</style>
+31 -11
View File
@@ -201,19 +201,34 @@ const markers = [
<style scoped>
.scan-visual {
position: relative;
display: flex;
flex-direction: column;
height: 100%;
padding: 10px 16px 16px;
overflow: hidden;
border: 1px solid #1e55a4;
border-radius: 18px;
border: 1px solid rgba(130, 175, 255, 0.18);
border-radius: 26px;
background:
radial-gradient(ellipse 70% 50% at 50% 0%, rgba(120, 180, 255, 0.22), transparent 70%),
linear-gradient(150deg, #3b7edd 0%, #2f6fd0 46%, #2559ac 100%);
radial-gradient(ellipse 70% 55% at 50% 0%, rgba(70, 140, 255, 0.18), transparent 70%),
linear-gradient(158deg, rgba(20, 40, 78, 0.7) 0%, rgba(6, 14, 30, 0.85) 100%);
box-shadow:
0 18px 44px rgba(31, 77, 147, 0.28),
inset 0 1px 0 rgba(255, 255, 255, 0.22);
0 30px 70px rgba(0, 10, 32, 0.5),
0 0 40px rgba(48, 118, 255, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
backdrop-filter: blur(16px);
}
.scan-visual::before {
content: '';
position: absolute;
top: 0;
right: 40px;
left: 40px;
z-index: 2;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(130, 214, 255, 0.55), transparent);
pointer-events: none;
}
.scan-visual__bar {
@@ -255,9 +270,12 @@ const markers = [
position: relative;
flex: 1;
overflow: hidden;
border: 1px solid rgba(255, 255, 255, 0.58);
border-radius: 8px;
background: rgba(24, 72, 148, 0.16);
border: 1px solid rgba(130, 195, 255, 0.26);
border-radius: 16px;
background:
radial-gradient(circle at 50% 42%, rgba(40, 90, 160, 0.32), transparent 68%),
rgba(4, 10, 22, 0.62);
box-shadow: inset 0 0 60px rgba(0, 4, 14, 0.7);
}
.scan-visual__stage svg {
@@ -280,7 +298,8 @@ const markers = [
z-index: 3;
width: 30px;
height: 30px;
border: 2px solid rgba(255, 255, 255, 0.9);
border: 2px solid rgba(150, 225, 255, 0.78);
filter: drop-shadow(0 0 6px rgba(90, 200, 255, 0.35));
}
.scan-visual__corner--tl {
@@ -318,7 +337,8 @@ const markers = [
width: 5px;
height: 54px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.82);
background: rgba(150, 225, 255, 0.72);
box-shadow: 0 0 12px rgba(90, 200, 255, 0.4);
transform: translateY(-50%);
}
+281 -123
View File
@@ -1,100 +1,216 @@
<script setup lang="ts">
import { computed } from 'vue'
import type { ScanSegment } from '@/api/scan'
interface ChartLabel {
element: string
wavelength: number
}
const props = withDefaults(
defineProps<{
wavelengths?: number[]
spectrum?: number[]
segments?: ScanSegment[]
labels?: ChartLabel[]
statusText?: string
/** 紧凑模式:在较小的容器中放大字号,保证刻度与标注可读。 */
compact?: boolean
}>(),
{
wavelengths: () => [],
spectrum: () => [],
segments: () => [],
labels: () => [],
statusText: '',
compact: false,
},
)
const fontScale = computed(() => (props.compact ? 1.55 : 1))
const fs = (size: number) => Math.round(size * fontScale.value)
const width = 1360
const height = 720
const pad = { left: 112, right: 44, top: 74, bottom: 88 }
const MAX_POINTS = 900
const DEFAULT_RANGE = { min: 380, max: 700 }
const xMin = 380
const xMax = 700
const yMin = 0
const yMax = 36
const hasData = computed(
() =>
props.wavelengths.length > 1 &&
props.spectrum.length === props.wavelengths.length,
)
const peaks = [
{ center: 421, amplitude: 4.4, width: 2.2 },
{ center: 438.4, amplitude: 26.5, width: 2.0 },
{ center: 447.5, amplitude: 10.5, width: 2.6 },
{ center: 468, amplitude: 5.5, width: 2.2 },
{ center: 492, amplitude: 13.5, width: 2.4 },
{ center: 505, amplitude: 7.2, width: 2.0 },
{ center: 510.6, amplitude: 23.5, width: 2.5 },
{ center: 518.4, amplitude: 30.5, width: 2.1 },
{ center: 540, amplitude: 10.5, width: 2.4 },
{ center: 557, amplitude: 7.4, width: 2.1 },
{ center: 574, amplitude: 4.6, width: 2.0 },
{ center: 590, amplitude: 13.4, width: 2.2 },
{ center: 606, amplitude: 6.2, width: 2.1 },
{ center: 614.5, amplitude: 26.5, width: 2.4 },
{ center: 634, amplitude: 6.8, width: 2.2 },
{ center: 653, amplitude: 12.2, width: 2.3 },
{ center: 672, amplitude: 8.4, width: 2.2 },
{ center: 686, amplitude: 10.8, width: 2.0 },
]
const range = computed(() => {
if (!hasData.value) return DEFAULT_RANGE
const labels = [
{ center: 438.4, element: 'Fe', wavelength: '438.4 nm', lift: 56, dx: 0 },
{ center: 510.6, element: 'Cu', wavelength: '510.6 nm', lift: 100, dx: -94 },
{ center: 518.4, element: 'Mg', wavelength: '518.4 nm', lift: 54, dx: 96 },
{ center: 614.5, element: 'Si', wavelength: '614.5 nm', lift: 58, dx: 0 },
]
const toX = (lambda: number) =>
pad.left + ((lambda - xMin) / (xMax - xMin)) * (width - pad.left - pad.right)
const toY = (intensity: number) =>
height - pad.bottom - ((intensity - yMin) / (yMax - yMin)) * (height - pad.top - pad.bottom)
function intensityAt(lambda: number, index: number) {
let value = 0.72
value += 0.34 * Math.sin(index * 0.37)
value += 0.22 * Math.sin(index * 1.19 + 1.2)
value += 0.14 * Math.cos(index * 2.23)
value += 0.08 * Math.sin(index * 3.7)
for (const peak of peaks) {
const distance = (lambda - peak.center) / peak.width
value += peak.amplitude * Math.exp(-0.5 * distance * distance)
let min = Number.POSITIVE_INFINITY
let max = Number.NEGATIVE_INFINITY
for (const value of props.wavelengths) {
if (value < min) min = value
if (value > max) max = value
}
return Math.max(0.2, value)
}
if (!Number.isFinite(min) || !Number.isFinite(max) || max <= min) {
return DEFAULT_RANGE
}
const curve = computed(() => {
const count = 620
const points: Array<{ x: number; y: number }> = []
const margin = (max - min) * 0.01
return { min: min - margin, max: max + margin }
})
for (let index = 0; index < count; index += 1) {
const ratio = index / (count - 1)
const lambda = xMin + ratio * (xMax - xMin)
points.push({ x: toX(lambda), y: toY(intensityAt(lambda, index)) })
const maxIntensity = computed(() => {
let max = 0
for (const value of props.spectrum) {
if (value > max) max = value
}
return max > 0 ? max : 1
})
/** 按桶取最大值降采样,保留谱峰形状。 */
const sampled = computed(() => {
if (!hasData.value) return []
const wavelengths = props.wavelengths
const spectrum = props.spectrum
const step = Math.max(1, Math.ceil(wavelengths.length / MAX_POINTS))
const points: Array<{ wavelength: number; intensity: number }> = []
for (let start = 0; start < wavelengths.length; start += step) {
const end = Math.min(start + step, wavelengths.length)
let best = start
for (let index = start + 1; index < end; index += 1) {
if (spectrum[index] > spectrum[best]) best = index
}
points.push({
wavelength: wavelengths[best],
intensity: spectrum[best],
})
}
return points
})
function toX(wavelength: number) {
const { min, max } = range.value
return (
pad.left +
((wavelength - min) / (max - min)) * (width - pad.left - pad.right)
)
}
function toY(intensity: number) {
const ratio = Math.max(0, intensity) / maxIntensity.value
return height - pad.bottom - ratio * (height - pad.top - pad.bottom)
}
const linePath = computed(() =>
curve.value
.map((point, index) => `${index === 0 ? 'M' : 'L'}${point.x.toFixed(2)} ${point.y.toFixed(2)}`)
sampled.value
.map(
(point, index) =>
`${index === 0 ? 'M' : 'L'}${toX(point.wavelength).toFixed(2)} ${toY(point.intensity).toFixed(2)}`,
)
.join(' '),
)
const areaPath = computed(() => {
if (sampled.value.length < 2) return ''
const first = sampled.value[0]
const last = sampled.value[sampled.value.length - 1]
const bottom = height - pad.bottom
return `${linePath.value} L${toX(xMax).toFixed(2)} ${bottom} L${toX(xMin).toFixed(2)} ${bottom} Z`
return `${linePath.value} L${toX(last.wavelength).toFixed(2)} ${bottom} L${toX(first.wavelength).toFixed(2)} ${bottom} Z`
})
const yTicks = [0, 10, 20, 30]
const xTicks = [400, 450, 500, 550, 600, 650]
function niceStep(rangeValue: number, count: number) {
const rough = rangeValue / Math.max(1, count)
if (!Number.isFinite(rough) || rough <= 0) return 1
const power = 10 ** Math.floor(Math.log10(rough))
const fraction = rough / power
const nice = fraction <= 1 ? 1 : fraction <= 2 ? 2 : fraction <= 5 ? 5 : 10
return nice * power
}
const xTicks = computed(() => {
const step = niceStep(range.value.max - range.value.min, 6)
const start = Math.ceil(range.value.min / step) * step
const ticks: number[] = []
for (let value = start; value <= range.value.max + step * 1e-6; value += step) {
ticks.push(Number(value.toFixed(6)))
}
return ticks
})
const yTicks = computed(() => {
const step = niceStep(maxIntensity.value, 4)
const ticks: number[] = []
for (let value = 0; value <= maxIntensity.value + step * 1e-6; value += step) {
ticks.push(value)
}
return ticks
})
function formatNumber(value: number) {
if (Math.abs(value) >= 100) return value.toFixed(0)
if (Math.abs(value) >= 10) return value.toFixed(0)
if (Math.abs(value) >= 1) return value.toFixed(1)
return value.toFixed(2)
}
function intensityAt(wavelength: number) {
const wavelengths = props.wavelengths
if (wavelengths.length === 0) return 0
let low = 0
let high = wavelengths.length - 1
while (low < high) {
const mid = (low + high) >> 1
if (wavelengths[mid] < wavelength) low = mid + 1
else high = mid
}
const index = low
const previous = Math.max(0, index - 1)
return Math.max(props.spectrum[previous] ?? 0, props.spectrum[index] ?? 0)
}
const peakLabels = computed(() =>
labels.map((label) => {
const peak = peaks.find((item) => item.center === label.center)
const peakValue = peak ? peak.amplitude + 1.4 : 10
const x = toX(label.center)
const y = toY(peakValue)
const labelY = Math.max(pad.top + 22, y - label.lift)
return { ...label, x, y, labelX: x + label.dx, labelY }
}),
props.labels
.filter(
(label) =>
label.wavelength >= range.value.min &&
label.wavelength <= range.value.max,
)
.map((label, index) => {
const x = toX(label.wavelength)
const y = toY(intensityAt(label.wavelength))
const lift = fs(48) + (index % 2) * fs(58)
const labelX = Math.min(
Math.max(x, pad.left + fs(44)),
width - pad.right - fs(44),
)
return {
...label,
x,
y,
labelX,
labelY: Math.max(pad.top + fs(26), y - lift),
}
}),
)
/** 拼接光谱的段边界,用虚线提示换段位置。 */
const boundaryXs = computed(() =>
props.segments
.slice(1)
.map((segment) => toX(segment.wavelengthStart))
.filter((x) => x > pad.left && x < width - pad.right),
)
</script>
@@ -105,7 +221,7 @@ const peakLabels = computed(() =>
:viewBox="`0 0 ${width} ${height}`"
preserveAspectRatio="xMidYMid meet"
role="img"
aria-label="光谱采集图表"
aria-label="光谱图表"
>
<defs>
<linearGradient id="spectrumStroke" x1="0" y1="0" x2="1" y2="0">
@@ -115,15 +231,15 @@ const peakLabels = computed(() =>
<stop offset="1" stop-color="#ff8ad8" />
</linearGradient>
<linearGradient id="spectrumArea" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#a7d5ff" stop-opacity="0.22" />
<stop offset="0" stop-color="#4d8dff" stop-opacity="0.16" />
<stop offset="1" stop-color="#2f6fd0" stop-opacity="0" />
</linearGradient>
</defs>
<rect width="1360" height="720" fill="#2f6fd0" />
<rect width="1360" height="720" fill="url(#spectrumArea)" opacity="0.35" />
<rect width="1360" height="720" fill="#050c1a" />
<rect width="1360" height="720" fill="url(#spectrumArea)" />
<g stroke="rgba(255,255,255,0.24)" stroke-width="1">
<g stroke="rgba(130, 175, 255, 0.16)" stroke-width="1">
<line
v-for="tick in yTicks"
:key="`grid-y-${tick}`"
@@ -131,7 +247,7 @@ const peakLabels = computed(() =>
:x2="width - pad.right"
:y1="toY(tick)"
:y2="toY(tick)"
stroke-dasharray="3 5"
stroke-dasharray="3 6"
/>
<line
v-for="tick in xTicks"
@@ -140,33 +256,33 @@ const peakLabels = computed(() =>
:x2="toX(tick)"
:y1="pad.top"
:y2="height - pad.bottom"
opacity="0.55"
opacity="0.6"
/>
</g>
<g fill="rgba(255,255,255,0.72)" font-size="21" text-anchor="end">
<g fill="rgba(158, 190, 226, 0.72)" :font-size="fs(21)" text-anchor="end">
<text
v-for="tick in yTicks"
:key="`label-y-${tick}`"
:x="pad.left - 20"
:y="toY(tick) + 7"
>
{{ tick }}
{{ formatNumber(tick) }}
</text>
</g>
<g fill="rgba(255,255,255,0.74)" font-size="19" text-anchor="middle">
<g fill="rgba(158, 190, 226, 0.72)" :font-size="fs(19)" text-anchor="middle">
<text
v-for="tick in xTicks"
:key="`label-x-${tick}`"
:x="toX(tick)"
:y="height - pad.bottom + 34"
>
{{ tick }}
{{ formatNumber(tick) }}
</text>
</g>
<g stroke="rgba(255,255,255,0.8)" stroke-width="1.6">
<g stroke="rgba(130, 195, 255, 0.4)" stroke-width="1.6">
<line :x1="pad.left" :x2="pad.left" :y1="pad.top" :y2="height - pad.bottom" />
<line
:x1="pad.left"
@@ -176,7 +292,7 @@ const peakLabels = computed(() =>
/>
</g>
<g fill="rgba(255,255,255,0.85)" font-size="22">
<g fill="rgba(158, 190, 226, 0.65)" :font-size="fs(22)">
<text x="24" y="58">a.u.</text>
<text
x="34"
@@ -190,53 +306,80 @@ const peakLabels = computed(() =>
<text :x="width - 70" :y="height - 24" text-anchor="end">波长 nm</text>
</g>
<path :d="areaPath" fill="url(#spectrumArea)" />
<path
:d="linePath"
fill="none"
stroke="url(#spectrumStroke)"
stroke-width="2.6"
stroke-linejoin="round"
stroke-linecap="round"
filter="drop-shadow(0 0 5px rgba(146, 228, 255, 0.45))"
/>
<g v-if="hasData">
<path :d="areaPath" fill="url(#spectrumArea)" />
<path
:d="linePath"
fill="none"
stroke="url(#spectrumStroke)"
stroke-width="2.6"
stroke-linejoin="round"
stroke-linecap="round"
filter="drop-shadow(0 0 5px rgba(146, 228, 255, 0.45))"
/>
</g>
<g v-for="label in peakLabels" :key="label.element">
<g v-if="hasData" stroke="rgba(255, 214, 120, 0.5)" stroke-width="1.2">
<line
v-for="x in boundaryXs"
:key="`boundary-${x}`"
:x1="x"
:x2="x"
:y1="pad.top"
:y2="height - pad.bottom"
stroke-dasharray="6 8"
/>
</g>
<g v-for="label in peakLabels" :key="`${label.element}-${label.wavelength}`">
<line
:x1="label.labelX"
:x2="label.x"
:y1="label.labelY + 33"
:y1="label.labelY + fs(33)"
:y2="label.y - 8"
stroke="rgba(255,255,255,0.62)"
stroke="rgba(150, 210, 255, 0.5)"
stroke-width="1.3"
stroke-dasharray="3 4"
/>
<circle :cx="label.x" :cy="label.y - 8" r="3.4" fill="#ffffff" opacity="0.92" />
<circle :cx="label.x" :cy="label.y - 8" r="3.4" fill="#bff3ff" />
<text
:x="label.labelX"
:y="label.labelY"
fill="#ffffff"
font-size="34"
fill="#eaf6ff"
:font-size="fs(34)"
font-weight="500"
text-anchor="middle"
filter="drop-shadow(0 0 8px rgba(110, 200, 255, 0.5))"
>
{{ label.element }}
</text>
<text
:x="label.labelX"
:y="label.labelY + 33"
fill="#ffffff"
font-size="24"
:y="label.labelY + fs(33)"
fill="rgba(180, 220, 255, 0.85)"
:font-size="fs(24)"
text-anchor="middle"
>
{{ label.wavelength }}
{{ label.wavelength.toFixed(2) }} nm
</text>
</g>
<text
v-if="!hasData && statusText"
:x="width / 2"
:y="height / 2"
fill="rgba(180, 210, 240, 0.8)"
:font-size="fs(36)"
font-weight="500"
text-anchor="middle"
>
{{ statusText }}
</text>
</svg>
<div class="spectrum-chart__status">
<div v-if="hasData && statusText" class="spectrum-chart__status">
<span class="spectrum-chart__pulse"></span>
光谱采集进行中
{{ statusText }}
</div>
</div>
</template>
@@ -246,14 +389,28 @@ const peakLabels = computed(() =>
position: relative;
height: 100%;
overflow: hidden;
border: 1px solid #1e55a4;
border-radius: 16px;
border: 1px solid rgba(130, 175, 255, 0.18);
border-radius: 26px;
background:
radial-gradient(ellipse 70% 55% at 72% 10%, rgba(119, 182, 255, 0.24), transparent 68%),
linear-gradient(150deg, #3b7edd 0%, #2f6fd0 48%, #2559ac 100%);
radial-gradient(ellipse 70% 55% at 72% 8%, rgba(70, 140, 255, 0.16), transparent 68%),
linear-gradient(158deg, rgba(20, 40, 78, 0.7) 0%, rgba(5, 12, 26, 0.88) 100%);
box-shadow:
0 18px 44px rgba(31, 77, 147, 0.24),
inset 0 1px 0 rgba(255, 255, 255, 0.18);
0 30px 70px rgba(0, 10, 32, 0.5),
0 0 40px rgba(48, 118, 255, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
backdrop-filter: blur(16px);
}
.spectrum-chart::before {
content: '';
position: absolute;
top: 0;
right: 40px;
left: 40px;
z-index: 2;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(130, 214, 255, 0.55), transparent);
pointer-events: none;
}
.spectrum-chart__svg {
@@ -263,26 +420,27 @@ const peakLabels = computed(() =>
.spectrum-chart__status {
position: absolute;
top: 49%;
left: 50%;
right: 32px;
bottom: 26px;
display: flex;
align-items: center;
gap: 14px;
color: #fff;
font-size: 36px;
font-weight: 500;
letter-spacing: 5px;
text-shadow: 0 3px 14px rgba(11, 48, 108, 0.5);
transform: translate(-50%, -50%);
white-space: nowrap;
gap: 10px;
padding: 8px 16px;
border: 1px solid rgba(130, 195, 255, 0.26);
border-radius: 30px;
background: rgba(10, 26, 52, 0.6);
color: rgba(220, 238, 255, 0.92);
font-size: 18px;
letter-spacing: 1px;
backdrop-filter: blur(8px);
}
.spectrum-chart__pulse {
width: 10px;
height: 10px;
width: 9px;
height: 9px;
border-radius: 50%;
background: #8df6ff;
box-shadow: 0 0 14px rgba(141, 246, 255, 0.85);
box-shadow: 0 0 12px rgba(141, 246, 255, 0.85);
animation: chart-pulse 1.8s ease-in-out infinite;
}
+18 -2
View File
@@ -3,13 +3,14 @@ withDefaults(
defineProps<{
items: string[]
icon?: 'laser' | 'info'
theme?: 'light' | 'dark'
}>(),
{ icon: undefined },
{ icon: undefined, theme: 'light' },
)
</script>
<template>
<footer class="status-footer">
<footer class="status-footer" :class="{ 'status-footer--dark': theme === 'dark' }">
<span v-if="icon" class="status-footer__icon" aria-hidden="true">
<svg v-if="icon === 'laser'" viewBox="0 0 24 24">
<path d="M4 17.5h8.5l2-3H22" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" />
@@ -71,4 +72,19 @@ withDefaults(
.status-footer__sep {
color: #c5cdd8;
}
.status-footer--dark {
border-top: 1px solid rgba(130, 175, 255, 0.12);
background: linear-gradient(180deg, rgba(8, 16, 34, 0.55) 0%, rgba(5, 10, 22, 0.94) 100%);
color: rgba(178, 202, 232, 0.72);
backdrop-filter: blur(14px);
}
.status-footer--dark .status-footer__icon {
color: rgba(120, 190, 255, 0.8);
}
.status-footer--dark .status-footer__sep {
color: rgba(120, 160, 210, 0.35);
}
</style>
+8 -2
View File
@@ -1,13 +1,19 @@
import { onBeforeUnmount, onMounted, ref } from 'vue'
/** 秒级倒计时,归零时只触发一次回调。 */
export function useCountdown(seconds: number, onComplete: () => void) {
/** 秒级倒计时,归零时只触发一次回调;enabled 为 false 时不启动计时。 */
export function useCountdown(
seconds: number,
onComplete: () => void,
enabled = true,
) {
const remaining = ref(seconds)
let timer: number | undefined
let finished = false
onMounted(() => {
if (!enabled) return
timer = window.setInterval(() => {
remaining.value = Math.max(0, remaining.value - 1)
+162
View File
@@ -0,0 +1,162 @@
import { onBeforeUnmount, ref } from 'vue'
import {
HubConnectionBuilder,
HubConnectionState,
LogLevel,
type HubConnection,
} from '@microsoft/signalr'
import {
getStageHubUrl,
type ScanProgress,
type ScanSegment,
} from '@/api/scan'
import type { DeviceStatus } from '@/api/device'
export interface StagePosition {
x: number
y: number
z: number
moving: boolean
updatedAt: string
}
export interface ScanSpectrum {
scanId: string
pointIndex: number
totalPoints: number
wavelengths: number[]
spectrum: number[]
segments: ScanSegment[]
}
export interface ScanFinished {
scanId: string
status: string
error: string | null
}
export type StageHubState = 'idle' | 'connecting' | 'connected' | 'offline'
/**
* 扫描实时通道(/stageHub)。
* 事件契约见 HardwareWeb/Services/StageBroadcastService.cs:
* StagePosition -> { x, y, z, moving, updatedAt }
* ScanProgress -> ScanProgress
* ScanSpectrum -> { scanId, pointIndex, wavelengths, spectrum, segments }
* ScanFinished -> { scanId, status, error }
* DeviceStatus -> DeviceStatus
*/
export function useStageHub() {
const state = ref<StageHubState>('idle')
const position = ref<StagePosition | null>(null)
const progress = ref<ScanProgress | null>(null)
const spectrum = ref<ScanSpectrum | null>(null)
const finished = ref<ScanFinished | null>(null)
const deviceStatus = ref<DeviceStatus | null>(null)
const errorMessage = ref('')
let connection: HubConnection | null = null
let stoppedByUser = false
async function connect() {
if (connection && connection.state !== HubConnectionState.Disconnected) {
return
}
stoppedByUser = false
state.value = 'connecting'
errorMessage.value = ''
const hub = new HubConnectionBuilder()
.withUrl(getStageHubUrl(), { withCredentials: false })
.withAutomaticReconnect({
nextRetryDelayInMilliseconds: (context) =>
Math.min(1000 * 2 ** context.previousRetryCount, 10000),
})
.configureLogging(LogLevel.Warning)
.build()
hub.on('StagePosition', (payload: StagePosition) => {
position.value = payload
})
hub.on('ScanProgress', (payload: ScanProgress) => {
progress.value = payload
})
hub.on('ScanSpectrum', (payload: ScanSpectrum) => {
spectrum.value = payload
})
hub.on('ScanFinished', (payload: ScanFinished) => {
finished.value = payload
})
hub.on('DeviceStatus', (payload: DeviceStatus) => {
deviceStatus.value = payload
})
hub.onreconnecting(() => {
state.value = 'connecting'
})
hub.onreconnected(async () => {
state.value = 'connected'
await syncSnapshot(hub)
})
hub.onclose(() => {
if (stoppedByUser) return
state.value = 'offline'
})
connection = hub
try {
await hub.start()
state.value = 'connected'
await syncSnapshot(hub)
} catch (error) {
state.value = 'offline'
errorMessage.value =
error instanceof Error ? error.message : '实时通道连接失败'
connection = null
await hub.stop().catch(() => undefined)
}
}
async function syncSnapshot(hub: HubConnection) {
try {
const current = await hub.invoke<ScanProgress>('GetScanProgress')
progress.value = current
} catch {
// 快照失败不影响实时事件
}
try {
const current = await hub.invoke<StagePosition | null>('GetStagePosition')
if (current) position.value = current
} catch {
// 位移台未连接时返回 null
}
}
async function disconnect() {
stoppedByUser = true
const hub = connection
connection = null
state.value = 'idle'
if (hub) {
await hub.stop().catch(() => undefined)
}
}
onBeforeUnmount(() => {
void disconnect()
})
return {
state,
position,
progress,
spectrum,
finished,
deviceStatus,
errorMessage,
connect,
disconnect,
}
}
+12
View File
@@ -35,6 +35,18 @@ const router = createRouter({
component: () => import('@/views/ResultView.vue'),
meta: { title: '检测完成' },
},
{
path: '/history',
name: 'history',
component: () => import('@/views/HistoryView.vue'),
meta: { title: '检测历史', requiresAdmin: true },
},
{
path: '/history/:scanId',
name: 'historyDetail',
component: () => import('@/views/ResultView.vue'),
meta: { title: '历史检测详情', requiresAdmin: true },
},
{
path: '/pay',
redirect: { name: 'sample' },
+841
View File
@@ -0,0 +1,841 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
import AppStage from '@/components/AppStage.vue'
import PageHeader from '@/components/PageHeader.vue'
import { getScanHistory, deleteScan, type ScanHistoryItem } from '@/api/scan'
import { showToast } from '@/composables/useToast'
const router = useRouter()
const items = ref<ScanHistoryItem[]>([])
const loading = ref(true)
const error = ref('')
const deleteTarget = ref<ScanHistoryItem | null>(null)
const removing = ref(false)
function goHome() {
void router.replace({ name: 'home' })
}
function openDetail(item: ScanHistoryItem) {
void router.push({ name: 'historyDetail', params: { scanId: item.scanId } })
}
function askDelete(item: ScanHistoryItem) {
if (removing.value) return
deleteTarget.value = item
}
function cancelDelete() {
if (removing.value) return
deleteTarget.value = null
}
async function confirmDelete() {
const target = deleteTarget.value
if (!target || removing.value) return
removing.value = true
try {
await deleteScan(target.scanId)
items.value = items.value.filter((item) => item.scanId !== target.scanId)
deleteTarget.value = null
showToast('检测记录已删除')
} catch (err) {
showToast(err instanceof Error ? err.message : '删除检测记录失败')
} finally {
removing.value = false
}
}
async function load() {
loading.value = true
error.value = ''
try {
items.value = await getScanHistory()
} catch (err) {
error.value = err instanceof Error ? err.message : '读取历史记录失败'
showToast(error.value)
} finally {
loading.value = false
}
}
function statusLabel(status: string) {
switch (status) {
case 'Completed':
return '已完成'
case 'Failed':
return '失败'
case 'Aborted':
return '已中止'
default:
return '进行中'
}
}
function statusTone(status: string) {
switch (status) {
case 'Completed':
return 'is-completed'
case 'Failed':
return 'is-failed'
case 'Aborted':
return 'is-aborted'
default:
return ''
}
}
function formatTime(value: string | null) {
if (!value) return '—'
const date = new Date(value)
if (Number.isNaN(date.getTime())) return '—'
return date.toLocaleString('zh-CN', { hour12: false }).replace(/\//g, '-')
}
function formatDuration(item: ScanHistoryItem) {
if (!item.finishedAt) return '—'
const start = new Date(item.startedAt).getTime()
const end = new Date(item.finishedAt).getTime()
if (!Number.isFinite(start) || !Number.isFinite(end) || end < start) return '—'
const seconds = Math.round((end - start) / 1000)
if (seconds < 60) return `${seconds} 秒`
const minutes = Math.floor(seconds / 60)
const rest = seconds % 60
return rest === 0 ? `${minutes} 分` : `${minutes} 分 ${rest} 秒`
}
onMounted(() => {
void load()
})
</script>
<template>
<AppStage>
<div class="history-bg" aria-hidden="true">
<span class="history-bg__orb history-bg__orb--blue"></span>
<span class="history-bg__orb history-bg__orb--cyan"></span>
<span class="history-bg__orb history-bg__orb--violet"></span>
</div>
<PageHeader
title="检测历史"
subtitle="查看已保存的扫描记录与检测结果"
theme="dark"
>
<template #left>
<button class="admin-back" type="button" @click="goHome">
返回
</button>
</template>
</PageHeader>
<main class="history-main">
<section class="history-card">
<header class="history-card__header">
<div class="history-card__heading">
<span class="history-card__eyebrow">Scan History</span>
<h2>检测记录</h2>
</div>
<div class="history-card__actions">
<span class="history-card__count">共 {{ items.length }} 条</span>
<button
class="history-refresh"
type="button"
:disabled="loading"
@click="load"
>
{{ loading ? '加载中...' : '刷新' }}
</button>
</div>
</header>
<div class="history-table">
<div class="history-table__head">
<span>检测时间</span>
<span>状态</span>
<span>采样点</span>
<span>耗时</span>
<span>记录编号</span>
<span>操作</span>
</div>
<div class="history-table__body">
<div
v-for="item in items"
:key="item.scanId"
class="history-row"
@click="openDetail(item)"
>
<span class="history-row__time">{{ formatTime(item.startedAt) }}</span>
<span>
<span class="history-status" :class="statusTone(item.status)">
{{ statusLabel(item.status) }}
</span>
</span>
<span class="history-row__points">
{{ item.completedPoints }} / {{ item.totalPoints }}
</span>
<span class="history-row__duration">{{ formatDuration(item) }}</span>
<span class="history-row__id" :title="item.scanId">{{ item.scanId }}</span>
<span class="history-row__actions">
<button
class="row-action row-action--view"
type="button"
@click.stop="openDetail(item)"
>
查看
</button>
<button
class="row-action row-action--danger"
type="button"
@click.stop="askDelete(item)"
>
删除
</button>
</span>
</div>
<div v-if="!items.length" class="history-empty">
<template v-if="error">
<p>{{ error }}</p>
<button class="history-empty__retry" type="button" @click="load">
重新加载
</button>
</template>
<p v-else-if="loading">正在读取历史记录...</p>
<p v-else>暂无历史检测记录</p>
</div>
</div>
</div>
<footer class="history-footer">
按开始时间倒序显示,最多 100 条记录 · 点击任意记录查看靶面图与光谱分析结果
</footer>
</section>
</main>
<Teleport to="body">
<Transition name="delete-modal">
<div v-if="deleteTarget" class="delete-backdrop" @click.self="cancelDelete">
<section
class="delete-card"
role="dialog"
aria-modal="true"
aria-label="删除检测记录"
>
<div class="delete-card__icon" aria-hidden="true">
<svg viewBox="0 0 64 64">
<path
d="M20 22h24M26 22v-4h12v4M24 22l2 28h12l2-28"
fill="none"
stroke="currentColor"
stroke-width="3"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M29 30v12M35 30v12"
fill="none"
stroke="currentColor"
stroke-width="3"
stroke-linecap="round"
/>
</svg>
</div>
<h2>删除检测记录</h2>
<p>
确定删除 <strong>{{ formatTime(deleteTarget.startedAt) }}</strong> 的检测记录吗?
</p>
<p class="delete-card__hint">
靶面图、光谱数据与元素分析结果将一并删除,删除后无法恢复。
</p>
<div class="delete-card__actions">
<button
class="delete-button delete-button--ghost"
type="button"
:disabled="removing"
@click="cancelDelete"
>
取消
</button>
<button
class="delete-button delete-button--danger"
type="button"
:disabled="removing"
@click="confirmDelete"
>
{{ removing ? '删除中...' : '删除' }}
</button>
</div>
</section>
</div>
</Transition>
</Teleport>
</AppStage>
</template>
<style scoped>
.history-bg {
position: absolute;
inset: 0;
overflow: hidden;
pointer-events: none;
background:
radial-gradient(1000px 600px at 8% -16%, rgba(48, 112, 255, 0.28), transparent 62%),
radial-gradient(820px 520px at 98% 4%, rgba(0, 209, 255, 0.14), transparent 60%),
radial-gradient(900px 680px at 58% 116%, rgba(122, 84, 255, 0.18), transparent 62%),
linear-gradient(156deg, #050a16 0%, #081226 46%, #0a1730 100%);
}
.history-bg::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(130, 175, 255, 0.05) 1px, transparent 1px),
linear-gradient(90deg, rgba(130, 175, 255, 0.05) 1px, transparent 1px);
background-size: 64px 64px;
mask-image: radial-gradient(ellipse 78% 72% at 50% 32%, #000 20%, transparent 78%);
}
.history-bg__orb {
position: absolute;
border-radius: 50%;
filter: blur(100px);
animation: history-orb-drift 16s ease-in-out infinite alternate;
}
.history-bg__orb--blue {
top: -340px;
left: -160px;
width: 760px;
height: 760px;
background: rgba(48, 118, 255, 0.3);
}
.history-bg__orb--cyan {
top: -200px;
right: -220px;
width: 640px;
height: 640px;
background: rgba(0, 214, 255, 0.18);
animation-delay: -5s;
}
.history-bg__orb--violet {
bottom: -360px;
left: 36%;
width: 700px;
height: 700px;
background: rgba(124, 92, 255, 0.18);
animation-delay: -10s;
}
@keyframes history-orb-drift {
from {
transform: translate3d(0, 0, 0) scale(1);
}
to {
transform: translate3d(42px, 30px, 0) scale(1.08);
}
}
.admin-back {
width: 132px;
height: 60px;
border: 1px solid rgba(130, 190, 255, 0.35);
border-radius: 12px;
background: rgba(18, 40, 78, 0.5);
color: #bcd9ff;
font-size: 24px;
font-weight: 600;
letter-spacing: 3px;
backdrop-filter: blur(10px);
transition:
transform 0.2s ease,
border-color 0.2s ease,
background 0.2s ease;
}
.admin-back:hover {
border-color: rgba(150, 205, 255, 0.55);
background: rgba(30, 66, 128, 0.65);
transform: translateY(-1px);
}
.history-main {
position: absolute;
top: 176px;
right: 44px;
bottom: 40px;
left: 44px;
}
.history-card {
position: relative;
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
border: 1px solid rgba(130, 175, 255, 0.18);
border-radius: 26px;
background: linear-gradient(158deg, rgba(20, 40, 78, 0.7) 0%, rgba(6, 14, 30, 0.85) 100%);
box-shadow:
0 30px 70px rgba(0, 10, 32, 0.5),
0 0 40px rgba(48, 118, 255, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
backdrop-filter: blur(16px);
}
.history-card::before {
content: '';
position: absolute;
top: 0;
right: 40px;
left: 40px;
z-index: 2;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(130, 214, 255, 0.55), transparent);
pointer-events: none;
}
.history-card__header {
display: flex;
flex: none;
align-items: center;
justify-content: space-between;
height: 110px;
padding: 0 32px;
border-bottom: 1px solid rgba(130, 175, 255, 0.12);
background: linear-gradient(120deg, rgba(26, 58, 112, 0.24) 0%, transparent 70%);
}
.history-card__heading {
display: flex;
flex-direction: column;
gap: 6px;
}
.history-card__eyebrow {
color: #5aa2ff;
font-size: 12px;
font-weight: 600;
letter-spacing: 2.6px;
text-transform: uppercase;
}
.history-card__header h2 {
display: flex;
align-items: center;
gap: 12px;
color: #eaf3ff;
font-size: 30px;
font-weight: 600;
letter-spacing: 3px;
}
.history-card__header h2::before {
content: '';
width: 4px;
height: 26px;
border-radius: 4px;
background: linear-gradient(180deg, #7fe0ff, #4d8bf0);
box-shadow: 0 0 14px rgba(90, 170, 255, 0.7);
}
.history-card__actions {
display: flex;
align-items: center;
gap: 14px;
}
.history-card__count {
padding: 6px 16px;
border: 1px solid rgba(130, 195, 255, 0.28);
border-radius: 30px;
background: rgba(16, 40, 80, 0.5);
color: #9fe8ff;
font-size: 16px;
letter-spacing: 1px;
}
.history-refresh {
height: 48px;
padding: 0 24px;
border: 1px solid rgba(130, 175, 255, 0.28);
border-radius: 12px;
background: rgba(18, 40, 78, 0.5);
color: #bcd9ff;
font-size: 18px;
font-weight: 600;
letter-spacing: 2px;
transition:
transform 0.2s ease,
border-color 0.2s ease,
background 0.2s ease;
}
.history-refresh:hover:not(:disabled) {
border-color: rgba(150, 205, 255, 0.5);
background: rgba(30, 66, 128, 0.6);
transform: translateY(-1px);
}
.history-refresh:disabled {
cursor: default;
opacity: 0.55;
}
.history-table {
display: flex;
flex: 1;
flex-direction: column;
min-height: 0;
padding: 0 32px;
}
.history-table__head,
.history-row {
display: grid;
grid-template-columns: 320px 150px 150px 160px minmax(0, 1fr) 200px;
align-items: center;
gap: 20px;
padding: 0 22px;
}
.history-table__head {
flex: none;
height: 62px;
margin-top: 18px;
border: 1px solid rgba(130, 175, 255, 0.12);
border-radius: 14px;
background: rgba(255, 255, 255, 0.04);
color: rgba(158, 190, 226, 0.65);
font-size: 18px;
font-weight: 600;
letter-spacing: 1px;
}
.history-table__body {
flex: 1;
min-height: 0;
overflow-y: auto;
margin-right: -6px;
padding-right: 6px;
}
.history-table__body::-webkit-scrollbar {
width: 6px;
}
.history-table__body::-webkit-scrollbar-thumb {
border-radius: 3px;
background: rgba(130, 175, 255, 0.25);
}
.history-row {
width: 100%;
min-height: 78px;
border-bottom: 1px solid rgba(130, 175, 255, 0.08);
color: rgba(210, 228, 250, 0.82);
font-size: 19px;
text-align: left;
cursor: pointer;
transition: background 0.18s ease;
}
.history-row:hover {
background: rgba(70, 140, 255, 0.08);
}
.history-row__time {
color: rgba(226, 240, 255, 0.9);
font-variant-numeric: tabular-nums;
}
.history-row__points {
font-variant-numeric: tabular-nums;
}
.history-row__duration {
color: rgba(158, 190, 226, 0.7);
}
.history-row__id {
overflow: hidden;
color: rgba(158, 190, 226, 0.5);
font-size: 16px;
letter-spacing: 0.5px;
text-overflow: ellipsis;
white-space: nowrap;
}
.history-row__actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 10px;
}
.row-action {
height: 40px;
padding: 0 16px;
border: 1px solid rgba(120, 190, 255, 0.28);
border-radius: 10px;
background: rgba(70, 140, 255, 0.12);
color: #8fd0ff;
font-family: inherit;
font-size: 16px;
font-weight: 600;
letter-spacing: 1px;
cursor: pointer;
transition:
background 0.18s ease,
border-color 0.18s ease,
color 0.18s ease;
}
.row-action:hover {
border-color: rgba(150, 205, 255, 0.5);
background: rgba(70, 140, 255, 0.22);
}
.row-action--danger {
border-color: rgba(255, 120, 120, 0.28);
background: rgba(255, 84, 84, 0.1);
color: #ff9d9d;
}
.row-action--danger:hover {
border-color: rgba(255, 150, 150, 0.5);
background: rgba(255, 84, 84, 0.18);
}
.history-status {
display: inline-block;
min-width: 86px;
padding: 4px 12px;
border: 1px solid rgba(130, 195, 255, 0.28);
border-radius: 20px;
background: rgba(16, 40, 80, 0.5);
color: #9fe8ff;
font-size: 16px;
text-align: center;
}
.history-status.is-completed {
border-color: rgba(116, 244, 197, 0.32);
background: rgba(14, 60, 56, 0.45);
color: #8ff5e7;
}
.history-status.is-failed {
border-color: rgba(255, 120, 120, 0.32);
background: rgba(60, 20, 26, 0.45);
color: #ff9d9d;
}
.history-status.is-aborted {
border-color: rgba(255, 216, 106, 0.3);
background: rgba(60, 46, 12, 0.45);
color: #ffd98a;
}
.history-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 18px;
padding: 120px 0;
color: rgba(158, 190, 226, 0.55);
font-size: 20px;
letter-spacing: 1px;
text-align: center;
}
.history-empty__retry {
height: 46px;
padding: 0 26px;
border: 1px solid rgba(130, 175, 255, 0.28);
border-radius: 12px;
background: rgba(18, 40, 78, 0.5);
color: #bcd9ff;
font-family: inherit;
font-size: 18px;
letter-spacing: 2px;
}
.history-empty__retry:hover {
border-color: rgba(150, 205, 255, 0.5);
}
.history-footer {
display: flex;
flex: none;
align-items: center;
height: 64px;
padding: 0 54px;
border-top: 1px solid rgba(130, 175, 255, 0.12);
background: rgba(8, 18, 38, 0.55);
color: rgba(158, 190, 226, 0.6);
font-size: 16px;
letter-spacing: 1px;
}
.delete-backdrop {
position: fixed;
inset: 0;
z-index: 70;
display: grid;
place-items: center;
padding: 24px;
background: rgba(3, 8, 18, 0.68);
backdrop-filter: blur(8px);
}
.delete-card {
width: 600px;
padding: 38px 44px 34px;
border: 1px solid rgba(130, 175, 255, 0.2);
border-radius: 26px;
background: linear-gradient(158deg, rgba(22, 42, 78, 0.98) 0%, rgba(8, 16, 32, 0.99) 100%);
box-shadow:
0 40px 90px rgba(0, 6, 20, 0.6),
0 0 50px rgba(48, 118, 255, 0.12),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
color-scheme: dark;
text-align: center;
}
.delete-card__icon {
display: grid;
place-items: center;
width: 86px;
height: 86px;
margin: 0 auto 22px;
border: 1px solid rgba(255, 120, 120, 0.3);
border-radius: 50%;
background: rgba(255, 84, 84, 0.12);
box-shadow:
0 0 32px rgba(255, 84, 84, 0.18),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
color: #ff9d9d;
}
.delete-card__icon svg {
width: 44px;
height: 44px;
}
.delete-card h2 {
color: #eef5ff;
font-size: 30px;
font-weight: 600;
letter-spacing: 2px;
text-shadow: 0 0 24px rgba(80, 150, 255, 0.28);
}
.delete-card p {
margin-top: 14px;
color: rgba(158, 190, 226, 0.72);
font-size: 19px;
line-height: 1.6;
letter-spacing: 0.5px;
}
.delete-card p strong {
color: #ffd166;
font-weight: 600;
}
.delete-card__hint {
font-size: 16px;
color: rgba(158, 190, 226, 0.55);
}
.delete-card__actions {
display: flex;
justify-content: center;
gap: 20px;
margin-top: 28px;
}
.delete-button {
width: 180px;
height: 56px;
border-radius: 12px;
font-family: inherit;
font-size: 20px;
font-weight: 600;
letter-spacing: 3px;
transition:
transform 0.2s ease,
box-shadow 0.2s ease,
background 0.2s ease,
border-color 0.2s ease;
}
.delete-button:disabled {
cursor: default;
opacity: 0.5;
}
.delete-button--ghost {
border: 1px solid rgba(130, 175, 255, 0.28);
background: rgba(18, 40, 78, 0.5);
color: #bcd9ff;
}
.delete-button--ghost:hover:not(:disabled) {
border-color: rgba(150, 205, 255, 0.5);
background: rgba(30, 66, 128, 0.6);
}
.delete-button--danger {
background: linear-gradient(180deg, #ff8b84 0%, #e15b55 100%);
box-shadow:
0 14px 30px rgba(225, 91, 85, 0.28),
0 0 26px rgba(255, 110, 100, 0.16),
inset 0 1px 0 rgba(255, 255, 255, 0.4);
color: #2a0806;
}
.delete-button--danger:hover:not(:disabled) {
box-shadow:
0 18px 38px rgba(225, 91, 85, 0.36),
0 0 34px rgba(255, 110, 100, 0.26),
inset 0 1px 0 rgba(255, 255, 255, 0.45);
transform: translateY(-2px);
}
.delete-modal-enter-active,
.delete-modal-leave-active {
transition: opacity 0.24s ease;
}
.delete-modal-enter-active .delete-card,
.delete-modal-leave-active .delete-card {
transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
}
.delete-modal-enter-from,
.delete-modal-leave-to {
opacity: 0;
}
.delete-modal-enter-from .delete-card,
.delete-modal-leave-to .delete-card {
opacity: 0;
transform: translateY(16px) scale(0.97);
}
</style>
+518 -32
View File
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { onBeforeUnmount, ref } from 'vue'
import { computed, onBeforeUnmount, onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
import AdminFunctionPanel from '@/components/AdminFunctionPanel.vue'
import AdminPasswordModal from '@/components/AdminPasswordModal.vue'
@@ -7,6 +7,8 @@ import AppStage from '@/components/AppStage.vue'
import ModuleButton from '@/components/ModuleButton.vue'
import PrinciplePlayer from '@/components/PrinciplePlayer.vue'
import UnderDevelopmentModal from '@/components/UnderDevelopmentModal.vue'
import { getDeviceStatus, retryDevices, type DeviceStatus } from '@/api/device'
import { showToast } from '@/composables/useToast'
import logo from '@/assets/logo.png'
type ModuleTone = 'blue' | 'orange' | 'green' | 'teal'
@@ -15,23 +17,99 @@ type ModuleIconName = 'detect' | 'metal' | 'soil' | 'water'
interface HomeModule {
key: string
title: string
caption: string
tone: ModuleTone
icon: ModuleIconName
}
const modules: HomeModule[] = [
{ key: 'element', title: '元素检测', tone: 'blue', icon: 'detect' },
{ key: 'metal', title: '金属鉴别', tone: 'orange', icon: 'metal' },
{ key: 'soil', title: '土壤与沉积物筛查', tone: 'green', icon: 'soil' },
{ key: 'water', title: '水体液体分析', tone: 'teal', icon: 'water' },
{
key: 'element',
title: '元素检测',
caption: 'Elemental Analysis',
tone: 'blue',
icon: 'detect',
},
{
key: 'metal',
title: '金属鉴别',
caption: 'Metal Identification',
tone: 'orange',
icon: 'metal',
},
{
key: 'soil',
title: '土壤与沉积物筛查',
caption: 'Soil & Sediment',
tone: 'green',
icon: 'soil',
},
{
key: 'water',
title: '水体液体分析',
caption: 'Water & Liquid',
tone: 'teal',
icon: 'water',
},
]
// 顶部装饰频谱条,仅用于视觉点缀
const spectrumBars = [22, 40, 64, 34, 52, 72, 44, 60, 30, 50, 66, 38, 56, 26]
const router = useRouter()
const modalOpen = ref(false)
const modalModule = ref('')
const adminModalOpen = ref(false)
const adminPanelOpen = ref(false)
// 设备连接状态:启动连接失败时在首页提示,并允许手动重试。
const deviceStatus = ref<DeviceStatus | null>(null)
const deviceRetrying = ref(false)
let deviceTimer: number | undefined
const failedDevices = computed(() =>
(deviceStatus.value?.devices ?? []).filter((item) => item.status === 'failed'),
)
const connectingDevices = computed(() =>
(deviceStatus.value?.devices ?? []).filter(
(item) => item.status === 'connecting',
),
)
const showDeviceBanner = computed(
() =>
failedDevices.value.length > 0 || connectingDevices.value.length > 0,
)
async function refreshDevices() {
try {
deviceStatus.value = await getDeviceStatus()
} catch {
// 后端未启动或不可达时保持静默,避免打扰首页演示
}
}
async function retryDeviceConnections() {
if (deviceRetrying.value) return
deviceRetrying.value = true
try {
deviceStatus.value = await retryDevices()
if (deviceStatus.value.allConnected) {
showToast('所有设备已连接')
} else {
showToast('仍有设备连接失败,请检查硬件连接')
}
} catch (error) {
showToast(
error instanceof Error ? error.message : '重试设备连接失败',
)
} finally {
deviceRetrying.value = false
}
}
// 隐藏入口:800ms 内连续点击 Logo 三次,打开管理员密码框。
const LOGO_CLICK_WINDOW = 800
let logoClickCount = 0
@@ -62,6 +140,43 @@ function onAdminSuccess() {
adminPanelOpen.value = true
}
// 隐藏入口:800ms 内连续点击标题中的“素”字三次,切换/退出浏览器全屏。
const FULLSCREEN_CLICK_WINDOW = 800
let fullscreenClickCount = 0
let fullscreenTimer: number | undefined
async function toggleFullscreen() {
try {
if (document.fullscreenElement) {
await document.exitFullscreen()
} else {
await document.documentElement.requestFullscreen()
}
} catch {
showToast('当前浏览器无法切换全屏')
}
}
function onTitleCharClick() {
if (fullscreenTimer !== undefined) {
window.clearTimeout(fullscreenTimer)
}
fullscreenClickCount += 1
if (fullscreenClickCount >= 3) {
fullscreenClickCount = 0
fullscreenTimer = undefined
void toggleFullscreen()
return
}
fullscreenTimer = window.setTimeout(() => {
fullscreenClickCount = 0
fullscreenTimer = undefined
}, FULLSCREEN_CLICK_WINDOW)
}
function openSystemConfig() {
adminPanelOpen.value = false
void router.push({ name: 'systemConfig' })
@@ -72,10 +187,30 @@ function openRulerSetting() {
void router.push({ name: 'ruler' })
}
function openHistory() {
adminPanelOpen.value = false
void router.push({ name: 'history' })
}
onMounted(() => {
void refreshDevices()
deviceTimer = window.setInterval(refreshDevices, 5000)
})
onBeforeUnmount(() => {
if (logoTimer !== undefined) {
window.clearTimeout(logoTimer)
}
if (fullscreenTimer !== undefined) {
window.clearTimeout(fullscreenTimer)
fullscreenTimer = undefined
}
if (deviceTimer !== undefined) {
window.clearInterval(deviceTimer)
deviceTimer = undefined
}
})
function openModule(module: HomeModule) {
@@ -92,30 +227,91 @@ function openModule(module: HomeModule) {
<template>
<AppStage>
<div class="home">
<div class="home-bg" aria-hidden="true">
<span class="home-bg__orb home-bg__orb--blue"></span>
<span class="home-bg__orb home-bg__orb--cyan"></span>
<span class="home-bg__orb home-bg__orb--violet"></span>
</div>
<header class="home-header">
<div class="brand">
<img :src="logo" alt="泽科技 LIBS 标识" @click="onLogoClick" />
<span>LIBS</span>
<span class="brand__mark" @click="onLogoClick">
<img :src="logo" alt="泽科技 LIBS 标识" />
</span>
<span class="brand__text">
<span class="brand__name">LIBS</span>
<span class="brand__sub">Laser Induced Breakdown Spectroscopy</span>
</span>
</div>
<div class="headline">
<h1>激光诱导击穿光谱 元素分析系统</h1>
<p>开放 · 共享 · 自助式元素检测平台</p>
<h1>
激光诱导击穿光谱
<em>元<span class="headline__hotspot" @click="onTitleCharClick">素</span>分析系统</em>
</h1>
<p>开放 <i>·</i> 共享 <i>·</i> 自助式元素检测平台</p>
</div>
<div class="spectrum-deco" aria-hidden="true">
<span
v-for="(height, index) in spectrumBars"
:key="index"
:style="{ height: `${height}px`, animationDelay: `${index * 0.09}s` }"
></span>
</div>
</header>
<div
v-if="showDeviceBanner"
class="device-banner"
:class="{ 'device-banner--error': failedDevices.length > 0 }"
>
<span class="device-banner__dot"></span>
<span class="device-banner__text">
<template v-if="failedDevices.length">
设备连接失败:{{ failedDevices.map((item) => item.name).join('、') }}
<small v-if="failedDevices[0].message">
({{ failedDevices[0].message }})
</small>
</template>
<template v-else>
正在连接设备:{{ connectingDevices.map((item) => item.name).join('、') }}
</template>
</span>
<button
v-if="failedDevices.length"
class="device-banner__retry"
type="button"
:disabled="deviceRetrying"
@click="retryDeviceConnections"
>
{{ deviceRetrying ? '重试中...' : '重试连接' }}
</button>
</div>
<main class="home-main">
<section class="modules-panel">
<div class="modules-panel__head">
<span class="modules-panel__eyebrow">Analysis Modules</span>
<h2>选择检测模式</h2>
</div>
<div class="modules-grid">
<ModuleButton
v-for="module in modules"
v-for="(module, index) in modules"
:key="module.key"
:title="module.title"
:caption="module.caption"
:index="String(index + 1).padStart(2, '0')"
:tone="module.tone"
:icon="module.icon"
@click="openModule(module)"
/>
</div>
<p class="modules-panel__foot">
点击卡片进入对应检测流程 · 更多场景持续扩展
</p>
</section>
<PrinciplePlayer class="home-player" />
@@ -139,6 +335,7 @@ function openModule(module: HomeModule) {
@close="adminPanelOpen = false"
@system-config="openSystemConfig"
@ruler="openRulerSetting"
@history="openHistory"
/>
</AppStage>
</template>
@@ -147,7 +344,74 @@ function openModule(module: HomeModule) {
.home {
position: absolute;
inset: 0;
background: #f0f2f5;
overflow: hidden;
background:
radial-gradient(1100px 640px at 10% -18%, rgba(48, 112, 255, 0.32), transparent 62%),
radial-gradient(860px 560px at 96% 2%, rgba(0, 209, 255, 0.16), transparent 60%),
radial-gradient(900px 680px at 62% 118%, rgba(122, 84, 255, 0.2), transparent 62%),
linear-gradient(156deg, #050a16 0%, #081226 46%, #0a1730 100%);
}
.home-bg {
position: absolute;
inset: 0;
overflow: hidden;
pointer-events: none;
}
.home-bg::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(130, 175, 255, 0.055) 1px, transparent 1px),
linear-gradient(90deg, rgba(130, 175, 255, 0.055) 1px, transparent 1px);
background-size: 64px 64px;
mask-image: radial-gradient(ellipse 75% 70% at 50% 30%, #000 20%, transparent 78%);
pointer-events: none;
}
.home-bg__orb {
position: absolute;
border-radius: 50%;
filter: blur(100px);
animation: orb-drift 16s ease-in-out infinite alternate;
}
.home-bg__orb--blue {
top: -340px;
left: -160px;
width: 780px;
height: 780px;
background: rgba(48, 118, 255, 0.34);
}
.home-bg__orb--cyan {
top: -220px;
right: -200px;
width: 660px;
height: 660px;
background: rgba(0, 214, 255, 0.2);
animation-delay: -5s;
}
.home-bg__orb--violet {
bottom: -360px;
left: 34%;
width: 720px;
height: 720px;
background: rgba(124, 92, 255, 0.22);
animation-delay: -10s;
}
@keyframes orb-drift {
from {
transform: translate3d(0, 0, 0) scale(1);
}
to {
transform: translate3d(42px, 30px, 0) scale(1.08);
}
}
.home-header {
@@ -157,32 +421,69 @@ function openModule(module: HomeModule) {
left: 0;
height: 180px;
padding: 24px 44px;
background: #f4f5f7;
}
.brand {
display: flex;
align-items: center;
gap: 14px;
gap: 16px;
}
.brand img {
width: 100px;
height: 100px;
.brand__mark {
display: grid;
place-items: center;
width: 92px;
height: 92px;
padding: 6px;
border-radius: 24px;
background: #fff;
box-shadow:
0 14px 34px rgba(0, 18, 52, 0.55),
0 0 0 1px rgba(255, 255, 255, 0.18);
cursor: pointer;
transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.brand__mark:hover {
transform: translateY(-2px);
box-shadow:
0 18px 40px rgba(0, 18, 52, 0.6),
0 0 26px rgba(90, 160, 255, 0.35);
}
.brand__mark img {
width: 100%;
height: 100%;
object-fit: contain;
mix-blend-mode: multiply;
}
.brand span {
color: #253243;
font-size: 32px;
.brand__text {
display: flex;
flex-direction: column;
gap: 3px;
}
.brand__name {
color: transparent;
background: linear-gradient(120deg, #eef6ff 0%, #9cc6ff 55%, #4d8bf0 100%);
-webkit-background-clip: text;
background-clip: text;
font-size: 40px;
font-weight: 700;
letter-spacing: 2px;
letter-spacing: 5px;
line-height: 1;
}
.brand__sub {
color: rgba(150, 182, 222, 0.6);
font-size: 11px;
letter-spacing: 2.2px;
text-transform: uppercase;
}
.headline {
position: absolute;
top: 40px;
top: 32px;
left: 50%;
text-align: center;
transform: translateX(-50%);
@@ -190,18 +491,140 @@ function openModule(module: HomeModule) {
}
.headline h1 {
color: #1f2937;
font-size: 44px;
color: #eef5ff;
font-size: 46px;
font-weight: 600;
letter-spacing: 6px;
letter-spacing: 7px;
line-height: 1.2;
text-shadow: 0 0 32px rgba(80, 150, 255, 0.32);
}
.headline h1 em {
color: transparent;
background: linear-gradient(100deg, #7fe0ff 0%, #5aa2ff 52%, #9b86ff 100%);
-webkit-background-clip: text;
background-clip: text;
font-style: normal;
filter: drop-shadow(0 0 18px rgba(90, 160, 255, 0.35));
}
.headline h1 em .headline__hotspot {
cursor: pointer;
user-select: none;
}
.headline p {
margin-top: 16px;
color: #4d5969;
font-size: 20px;
letter-spacing: 4px;
color: rgba(158, 190, 226, 0.72);
font-size: 18px;
letter-spacing: 5px;
}
.headline p i {
margin: 0 12px;
color: rgba(90, 160, 255, 0.85);
font-style: normal;
}
.spectrum-deco {
position: absolute;
top: 46px;
right: 44px;
display: flex;
align-items: flex-end;
gap: 5px;
height: 76px;
opacity: 0.5;
}
.spectrum-deco span {
width: 4px;
border-radius: 3px;
background: linear-gradient(180deg, rgba(130, 214, 255, 0.95), rgba(70, 130, 255, 0.15));
transform-origin: bottom center;
animation: bar-pulse 2.6s ease-in-out infinite alternate;
}
@keyframes bar-pulse {
from {
opacity: 0.45;
transform: scaleY(0.45);
}
to {
opacity: 0.95;
transform: scaleY(1);
}
}
.device-banner {
position: absolute;
top: 142px;
right: 44px;
left: 44px;
z-index: 5;
display: flex;
align-items: center;
gap: 12px;
height: 44px;
padding: 0 18px;
border: 1px solid rgba(255, 196, 80, 0.35);
border-radius: 12px;
background: linear-gradient(120deg, rgba(255, 180, 40, 0.16), rgba(255, 180, 40, 0.06));
color: #ffd98a;
font-size: 17px;
letter-spacing: 0.5px;
backdrop-filter: blur(12px);
}
.device-banner--error {
border-color: rgba(255, 107, 107, 0.4);
background: linear-gradient(120deg, rgba(255, 84, 84, 0.18), rgba(255, 84, 84, 0.06));
color: #ff9d9d;
}
.device-banner__dot {
flex: none;
width: 10px;
height: 10px;
border-radius: 50%;
background: currentColor;
box-shadow: 0 0 10px currentColor;
}
.device-banner__text {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.device-banner__text small {
color: inherit;
opacity: 0.72;
}
.device-banner__retry {
flex: none;
height: 32px;
padding: 0 18px;
border: 1px solid rgba(255, 255, 255, 0.32);
border-radius: 8px;
background: rgba(255, 255, 255, 0.08);
color: inherit;
font-size: 16px;
cursor: pointer;
transition: background 0.2s ease;
}
.device-banner__retry:hover {
background: rgba(255, 255, 255, 0.16);
}
.device-banner__retry:disabled {
cursor: default;
opacity: 0.6;
}
.home-main {
@@ -216,12 +639,75 @@ function openModule(module: HomeModule) {
}
.modules-panel {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
gap: 30px;
padding: 34px;
overflow: hidden;
border: 1px solid rgba(140, 182, 255, 0.14);
border-radius: 26px;
background: linear-gradient(
155deg,
rgba(255, 255, 255, 0.07) 0%,
rgba(255, 255, 255, 0.025) 55%,
rgba(255, 255, 255, 0.05) 100%
);
box-shadow:
0 30px 70px rgba(0, 10, 32, 0.5),
inset 0 1px 0 rgba(255, 255, 255, 0.09);
backdrop-filter: blur(16px);
}
.modules-panel::before {
content: '';
position: absolute;
top: 0;
right: 40px;
left: 40px;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(120, 180, 255, 0.6), transparent);
}
.modules-panel__head {
display: flex;
flex-direction: column;
gap: 10px;
}
.modules-panel__eyebrow {
color: #5aa2ff;
font-size: 13px;
font-weight: 600;
letter-spacing: 3.4px;
text-transform: uppercase;
}
.modules-panel__head h2 {
display: flex;
align-items: center;
padding: 34px;
border-radius: 20px;
background: #fff;
box-shadow: var(--shadow-card);
gap: 12px;
color: #eaf3ff;
font-size: 30px;
font-weight: 600;
letter-spacing: 3px;
}
.modules-panel__head h2::before {
content: '';
width: 4px;
height: 26px;
border-radius: 4px;
background: linear-gradient(180deg, #7fe0ff, #4d8bf0);
box-shadow: 0 0 14px rgba(90, 170, 255, 0.7);
}
.modules-panel__foot {
color: rgba(140, 172, 208, 0.55);
font-size: 14px;
letter-spacing: 1.4px;
text-align: center;
}
.modules-grid {
File diff suppressed because it is too large Load Diff
+208 -51
View File
@@ -296,9 +296,19 @@ onBeforeUnmount(() => {
<template>
<AppStage>
<PageHeader title="标尺设定" subtitle="在相机画面中拖动画线,输入实际距离完成标定">
<div class="ruler-bg" aria-hidden="true">
<span class="ruler-bg__orb ruler-bg__orb--blue"></span>
<span class="ruler-bg__orb ruler-bg__orb--cyan"></span>
<span class="ruler-bg__orb ruler-bg__orb--violet"></span>
</div>
<PageHeader
title="标尺设定"
subtitle="在相机画面中拖动画线,输入实际距离完成标定"
theme="dark"
>
<template #left>
<button class="header-button header-button--outline" type="button" @click="goHome">
<button class="admin-back" type="button" @click="goHome">
返回
</button>
</template>
@@ -426,6 +436,95 @@ onBeforeUnmount(() => {
</template>
<style scoped>
.ruler-bg {
position: absolute;
inset: 0;
overflow: hidden;
pointer-events: none;
background:
radial-gradient(1000px 600px at 8% -16%, rgba(48, 112, 255, 0.28), transparent 62%),
radial-gradient(820px 520px at 98% 4%, rgba(0, 209, 255, 0.14), transparent 60%),
radial-gradient(900px 680px at 58% 116%, rgba(122, 84, 255, 0.18), transparent 62%),
linear-gradient(156deg, #050a16 0%, #081226 46%, #0a1730 100%);
}
.ruler-bg::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(130, 175, 255, 0.05) 1px, transparent 1px),
linear-gradient(90deg, rgba(130, 175, 255, 0.05) 1px, transparent 1px);
background-size: 64px 64px;
mask-image: radial-gradient(ellipse 78% 72% at 50% 32%, #000 20%, transparent 78%);
}
.ruler-bg__orb {
position: absolute;
border-radius: 50%;
filter: blur(100px);
animation: ruler-orb-drift 16s ease-in-out infinite alternate;
}
.ruler-bg__orb--blue {
top: -340px;
left: -160px;
width: 760px;
height: 760px;
background: rgba(48, 118, 255, 0.3);
}
.ruler-bg__orb--cyan {
top: -200px;
right: -220px;
width: 640px;
height: 640px;
background: rgba(0, 214, 255, 0.18);
animation-delay: -5s;
}
.ruler-bg__orb--violet {
bottom: -360px;
left: 36%;
width: 700px;
height: 700px;
background: rgba(124, 92, 255, 0.18);
animation-delay: -10s;
}
@keyframes ruler-orb-drift {
from {
transform: translate3d(0, 0, 0) scale(1);
}
to {
transform: translate3d(42px, 30px, 0) scale(1.08);
}
}
.admin-back {
width: 132px;
height: 60px;
border: 1px solid rgba(130, 190, 255, 0.35);
border-radius: 12px;
background: rgba(18, 40, 78, 0.5);
color: #bcd9ff;
font-size: 24px;
font-weight: 600;
letter-spacing: 3px;
backdrop-filter: blur(10px);
transition:
transform 0.2s ease,
border-color 0.2s ease,
background 0.2s ease;
}
.admin-back:hover {
border-color: rgba(150, 205, 255, 0.55);
background: rgba(30, 66, 128, 0.65);
transform: translateY(-1px);
}
.ruler-main {
position: absolute;
top: 176px;
@@ -437,16 +536,33 @@ onBeforeUnmount(() => {
}
.ruler-card {
position: relative;
display: flex;
flex-direction: column;
width: 1400px;
max-width: 100%;
height: 100%;
overflow: hidden;
border: 1px solid #d8e0e9;
border-radius: 18px;
background: #fff;
box-shadow: var(--shadow-card);
border: 1px solid rgba(130, 175, 255, 0.18);
border-radius: 26px;
background: linear-gradient(158deg, rgba(20, 40, 78, 0.7) 0%, rgba(6, 14, 30, 0.85) 100%);
box-shadow:
0 30px 70px rgba(0, 10, 32, 0.5),
0 0 40px rgba(48, 118, 255, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
backdrop-filter: blur(16px);
}
.ruler-card::before {
content: '';
position: absolute;
top: 0;
right: 40px;
left: 40px;
z-index: 2;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(130, 214, 255, 0.55), transparent);
pointer-events: none;
}
.ruler-card__header {
@@ -454,28 +570,41 @@ onBeforeUnmount(() => {
flex: none;
align-items: center;
justify-content: space-between;
height: 76px;
height: 80px;
padding: 0 28px;
background: linear-gradient(180deg, #3d80e2 0%, #2f6fd0 100%);
border-bottom: 1px solid rgba(130, 175, 255, 0.12);
background: linear-gradient(120deg, rgba(26, 58, 112, 0.85) 0%, rgba(10, 24, 52, 0.8) 100%);
}
.ruler-card__header h2 {
color: #fff;
display: flex;
align-items: center;
gap: 12px;
color: #eef5ff;
font-size: 30px;
font-weight: 600;
letter-spacing: 3px;
text-shadow: 0 1px 3px rgba(16, 49, 101, 0.22);
text-shadow: 0 0 22px rgba(80, 150, 255, 0.3);
}
.ruler-card__header h2::before {
content: '';
width: 4px;
height: 26px;
border-radius: 4px;
background: linear-gradient(180deg, #7fe0ff, #4d8bf0);
box-shadow: 0 0 14px rgba(90, 170, 255, 0.7);
}
.ruler-card__status {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 5px 12px;
border: 1px solid rgba(255, 255, 255, 0.24);
padding: 5px 14px;
border: 1px solid rgba(130, 195, 255, 0.28);
border-radius: 30px;
background: rgba(255, 255, 255, 0.12);
color: rgba(255, 255, 255, 0.92);
background: rgba(16, 40, 80, 0.5);
color: rgba(216, 236, 255, 0.9);
font-size: 15px;
letter-spacing: 1px;
}
@@ -497,7 +626,8 @@ onBeforeUnmount(() => {
flex: 1;
min-height: 0;
overflow: hidden;
background: #080d14;
background: #040810;
box-shadow: inset 0 0 50px rgba(0, 4, 14, 0.6);
}
.ruler-viewport__image {
@@ -530,7 +660,7 @@ onBeforeUnmount(() => {
position: absolute;
top: 50%;
left: 50%;
color: rgba(216, 228, 243, 0.7);
color: rgba(180, 210, 240, 0.7);
font-size: 20px;
letter-spacing: 2px;
transform: translate(-50%, -50%);
@@ -541,10 +671,11 @@ onBeforeUnmount(() => {
flex: none;
align-items: center;
gap: 12px;
height: 72px;
height: 78px;
padding: 0 30px;
border-top: 1px solid var(--line);
color: var(--muted);
border-top: 1px solid rgba(130, 175, 255, 0.12);
background: rgba(8, 18, 38, 0.55);
color: rgba(158, 190, 226, 0.68);
font-size: 18px;
letter-spacing: 0.5px;
}
@@ -554,9 +685,10 @@ onBeforeUnmount(() => {
place-items: center;
width: 28px;
height: 28px;
border: 1px solid rgba(120, 190, 255, 0.25);
border-radius: 50%;
background: var(--blue-soft);
color: var(--blue);
background: rgba(70, 140, 255, 0.16);
color: #8fd0ff;
font-size: 16px;
font-weight: 600;
}
@@ -565,7 +697,7 @@ onBeforeUnmount(() => {
width: 1px;
height: 22px;
margin: 0 8px;
background: var(--line-strong);
background: rgba(130, 175, 255, 0.2);
}
.distance-backdrop {
@@ -575,36 +707,41 @@ onBeforeUnmount(() => {
display: grid;
place-items: center;
padding: 24px;
background: rgba(18, 33, 54, 0.44);
backdrop-filter: blur(5px);
background: rgba(3, 8, 18, 0.68);
backdrop-filter: blur(8px);
}
.distance-card {
width: 600px;
padding: 38px 44px 34px;
border: 1px solid rgba(255, 255, 255, 0.65);
border-radius: 24px;
background: #fff;
box-shadow: 0 30px 80px rgba(12, 30, 55, 0.3);
border: 1px solid rgba(130, 175, 255, 0.2);
border-radius: 26px;
background: linear-gradient(158deg, rgba(22, 42, 78, 0.98) 0%, rgba(8, 16, 32, 0.99) 100%);
box-shadow:
0 40px 90px rgba(0, 6, 20, 0.6),
0 0 50px rgba(48, 118, 255, 0.12),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
color-scheme: dark;
text-align: center;
}
.distance-card h2 {
color: #1f2937;
color: #eef5ff;
font-size: 30px;
font-weight: 600;
letter-spacing: 2px;
text-shadow: 0 0 24px rgba(80, 150, 255, 0.28);
}
.distance-card > p {
margin-top: 12px;
color: var(--muted);
color: rgba(158, 190, 226, 0.7);
font-size: 18px;
letter-spacing: 0.5px;
}
.distance-card > p strong {
color: var(--blue);
color: #7fe0ff;
font-weight: 600;
}
@@ -616,23 +753,26 @@ onBeforeUnmount(() => {
display: flex;
flex-direction: column;
gap: 10px;
text-align: left;
color: var(--ink-soft);
color: rgba(158, 190, 226, 0.72);
font-size: 18px;
text-align: left;
}
.distance-field__control {
display: flex;
align-items: center;
overflow: hidden;
border: 2px solid var(--line-strong);
border-radius: 10px;
border: 1px solid rgba(130, 175, 255, 0.22);
border-radius: 12px;
background: rgba(6, 14, 28, 0.7);
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.distance-field__control:focus-within {
border-color: var(--blue);
box-shadow: 0 0 0 4px rgba(47, 111, 208, 0.12);
border-color: rgba(120, 200, 255, 0.55);
box-shadow:
0 0 0 4px rgba(70, 140, 255, 0.15),
0 0 24px rgba(70, 140, 255, 0.12);
}
.distance-field input {
@@ -640,23 +780,28 @@ onBeforeUnmount(() => {
height: 58px;
padding: 0 18px;
border: 0;
color: var(--ink);
background: transparent;
color: #e8f2ff;
font-family: inherit;
font-size: 22px;
outline: none;
}
.distance-field input::placeholder {
color: rgba(158, 190, 226, 0.4);
}
.distance-field__unit {
flex: none;
padding: 0 20px;
color: var(--muted);
color: rgba(158, 190, 226, 0.6);
font-size: 19px;
letter-spacing: 1px;
}
.distance-error {
margin-top: 14px;
color: var(--red);
color: #ff9d9d;
font-size: 17px;
letter-spacing: 0.5px;
text-align: center;
@@ -676,33 +821,45 @@ onBeforeUnmount(() => {
font-size: 20px;
font-weight: 600;
letter-spacing: 3px;
transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
transition:
transform 0.2s ease,
box-shadow 0.2s ease,
background 0.2s ease,
border-color 0.2s ease;
}
.distance-button:disabled {
cursor: default;
opacity: 0.65;
opacity: 0.5;
}
.distance-button--ghost {
border: 2px solid var(--line-strong);
color: var(--ink-soft);
background: #fff;
border: 1px solid rgba(130, 175, 255, 0.28);
background: rgba(18, 40, 78, 0.5);
color: #bcd9ff;
}
.distance-button--ghost:hover:not(:disabled) {
background: var(--surface-soft);
border-color: rgba(150, 205, 255, 0.5);
background: rgba(30, 66, 128, 0.6);
}
.distance-button--primary {
color: #fff;
background: linear-gradient(180deg, #4b89e4 0%, #2f6fd0 100%);
box-shadow: 0 10px 22px rgba(47, 111, 208, 0.28);
background: linear-gradient(180deg, #ffd166 0%, #f0ac0b 100%);
box-shadow:
0 14px 30px rgba(240, 172, 11, 0.28),
0 0 26px rgba(255, 190, 60, 0.16),
inset 0 1px 0 rgba(255, 255, 255, 0.6);
color: #241500;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.25);
}
.distance-button--primary:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 14px 28px rgba(47, 111, 208, 0.36);
box-shadow:
0 18px 38px rgba(240, 172, 11, 0.36),
0 0 34px rgba(255, 190, 60, 0.26),
inset 0 1px 0 rgba(255, 255, 255, 0.6);
transform: translateY(-2px);
}
.distance-modal-enter-active,
+267 -60
View File
@@ -38,6 +38,12 @@ const footerItems = computed(() => [
'环境温度 22℃',
])
const captureStatusText = computed(() => {
if (baselineReady.value) return '基准画面就绪'
if (capturingBaseline.value) return '正在采集基准画面'
return '等待相机画面'
})
function goHome() {
void router.push({ name: 'home' })
}
@@ -87,9 +93,15 @@ async function startDetection() {
<template>
<AppStage>
<PageHeader title="放置待测样品">
<div class="sample-bg" aria-hidden="true">
<span class="sample-bg__orb sample-bg__orb--blue"></span>
<span class="sample-bg__orb sample-bg__orb--cyan"></span>
<span class="sample-bg__orb sample-bg__orb--violet"></span>
</div>
<PageHeader title="放置待测样品" theme="dark">
<template #left>
<button class="header-button header-button--outline" type="button" @click="goHome">
<button class="sample-back" type="button" @click="goHome">
返回
</button>
</template>
@@ -101,7 +113,11 @@ async function startDetection() {
<aside class="guide-column">
<section class="guide-card">
<header class="guide-card__header">
<h2>样品放置操作指引</h2>
<div class="guide-card__heading">
<span class="guide-card__eyebrow">Operation Guide</span>
<h2>样品放置操作指引</h2>
</div>
<span class="guide-card__badge">Step 01</span>
</header>
<ol class="guide-steps">
@@ -142,6 +158,11 @@ async function startDetection() {
</section>
<div class="guide-actions">
<span class="capture-status" :class="{ 'is-ready': baselineReady }">
<i class="capture-status__dot"></i>
{{ captureStatusText }}
</span>
<button
class="action-button action-button--start"
type="button"
@@ -155,11 +176,100 @@ async function startDetection() {
</aside>
</main>
<StatusFooter :items="footerItems" />
<StatusFooter :items="footerItems" theme="dark" />
</AppStage>
</template>
<style scoped>
.sample-bg {
position: absolute;
inset: 0;
overflow: hidden;
pointer-events: none;
background:
radial-gradient(1000px 600px at 8% -16%, rgba(48, 112, 255, 0.28), transparent 62%),
radial-gradient(820px 520px at 98% 4%, rgba(0, 209, 255, 0.14), transparent 60%),
radial-gradient(900px 680px at 58% 116%, rgba(122, 84, 255, 0.18), transparent 62%),
linear-gradient(156deg, #050a16 0%, #081226 46%, #0a1730 100%);
}
.sample-bg::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(130, 175, 255, 0.05) 1px, transparent 1px),
linear-gradient(90deg, rgba(130, 175, 255, 0.05) 1px, transparent 1px);
background-size: 64px 64px;
mask-image: radial-gradient(ellipse 78% 72% at 50% 32%, #000 20%, transparent 78%);
}
.sample-bg__orb {
position: absolute;
border-radius: 50%;
filter: blur(100px);
animation: orb-drift 16s ease-in-out infinite alternate;
}
.sample-bg__orb--blue {
top: -340px;
left: -160px;
width: 760px;
height: 760px;
background: rgba(48, 118, 255, 0.3);
}
.sample-bg__orb--cyan {
top: -200px;
right: -220px;
width: 640px;
height: 640px;
background: rgba(0, 214, 255, 0.18);
animation-delay: -5s;
}
.sample-bg__orb--violet {
bottom: -360px;
left: 36%;
width: 700px;
height: 700px;
background: rgba(124, 92, 255, 0.18);
animation-delay: -10s;
}
@keyframes orb-drift {
from {
transform: translate3d(0, 0, 0) scale(1);
}
to {
transform: translate3d(42px, 30px, 0) scale(1.08);
}
}
.sample-back {
width: 132px;
height: 60px;
border: 1px solid rgba(130, 190, 255, 0.35);
border-radius: 12px;
background: rgba(18, 40, 78, 0.5);
color: #bcd9ff;
font-size: 24px;
font-weight: 600;
letter-spacing: 3px;
backdrop-filter: blur(10px);
transition:
transform 0.2s ease,
border-color 0.2s ease,
background 0.2s ease;
}
.sample-back:hover {
border-color: rgba(150, 205, 255, 0.55);
background: rgba(30, 66, 128, 0.65);
transform: translateY(-1px);
}
.sample-main {
position: absolute;
top: 220px;
@@ -183,31 +293,79 @@ async function startDetection() {
}
.guide-card {
position: relative;
display: flex;
flex: 1;
flex-direction: column;
overflow: hidden;
border-radius: 18px;
background: #2fb8ad;
box-shadow: 0 16px 34px rgba(31, 148, 139, 0.24);
border: 1px solid rgba(92, 227, 214, 0.2);
border-radius: 26px;
background: linear-gradient(
158deg,
rgba(30, 74, 108, 0.5) 0%,
rgba(10, 26, 52, 0.72) 60%,
rgba(12, 32, 60, 0.55) 100%
);
box-shadow:
0 30px 70px rgba(0, 10, 32, 0.5),
0 0 34px rgba(40, 200, 188, 0.08),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
backdrop-filter: blur(16px);
}
.guide-card::before {
content: '';
position: absolute;
top: 0;
right: 40px;
left: 40px;
z-index: 2;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(92, 227, 214, 0.6), transparent);
pointer-events: none;
}
.guide-card__header {
display: flex;
flex: none;
align-items: center;
justify-content: space-between;
height: 104px;
padding: 0 34px;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent);
padding: 0 32px;
border-bottom: 1px solid rgba(140, 200, 235, 0.12);
background: linear-gradient(120deg, rgba(36, 110, 128, 0.28) 0%, transparent 70%);
}
.guide-card__heading {
display: flex;
flex-direction: column;
gap: 6px;
}
.guide-card__eyebrow {
color: #5ce3d6;
font-size: 12px;
font-weight: 600;
letter-spacing: 2.6px;
text-transform: uppercase;
}
.guide-card__header h2 {
color: #fff;
font-size: 32px;
color: #effbff;
font-size: 30px;
font-weight: 600;
letter-spacing: 3px;
text-shadow: 0 1px 3px rgba(10, 94, 88, 0.2);
text-shadow: 0 0 24px rgba(60, 220, 205, 0.25);
}
.guide-card__badge {
padding: 7px 16px;
border: 1px solid rgba(92, 227, 214, 0.32);
border-radius: 30px;
background: rgba(20, 80, 90, 0.3);
color: #8ff5e7;
font-size: 14px;
letter-spacing: 2px;
}
.guide-steps {
@@ -222,8 +380,8 @@ async function startDetection() {
align-items: center;
gap: 22px;
min-height: 88px;
padding: 0 34px;
border-bottom: 1px solid rgba(255, 255, 255, 0.18);
padding: 0 32px;
border-bottom: 1px solid rgba(140, 200, 235, 0.1);
}
.guide-step:last-child {
@@ -236,20 +394,23 @@ async function startDetection() {
place-items: center;
width: 46px;
height: 46px;
border: 2px solid rgba(255, 255, 255, 0.9);
border: 1px solid rgba(92, 227, 214, 0.5);
border-radius: 50%;
color: #fff;
background: rgba(20, 80, 90, 0.35);
box-shadow:
0 0 18px rgba(40, 200, 188, 0.18),
inset 0 0 12px rgba(92, 227, 214, 0.12);
color: #9ff7ec;
font-size: 24px;
font-weight: 600;
}
.guide-step__title {
flex: 1;
color: #fff;
color: #e8f2ff;
font-size: 28px;
font-weight: 500;
letter-spacing: 1px;
text-shadow: 0 1px 3px rgba(10, 94, 88, 0.18);
}
.guide-step__icon {
@@ -258,7 +419,12 @@ async function startDetection() {
place-items: center;
width: 78px;
height: 78px;
padding: 2px;
padding: 4px;
}
.guide-step__icon :deep(.guide-icon) {
color: #8ff5e7;
filter: drop-shadow(0 0 10px rgba(92, 227, 214, 0.35));
}
.placement-requirements {
@@ -266,20 +432,20 @@ async function startDetection() {
flex: 1;
flex-direction: column;
min-height: 0;
margin: 0 24px 22px;
padding: 18px 22px;
margin: 16px 24px 22px;
padding: 16px 20px;
overflow: hidden;
border: 1px solid rgba(224, 154, 6, 0.45);
border-radius: 14px;
background: var(--orange-soft);
color: #5b4213;
border: 1px solid rgba(255, 196, 80, 0.28);
border-radius: 16px;
background: linear-gradient(155deg, rgba(255, 186, 60, 0.12) 0%, rgba(255, 150, 20, 0.04) 100%);
color: rgba(255, 228, 184, 0.9);
}
.placement-requirements h3 {
display: flex;
align-items: center;
gap: 10px;
color: #8a5b00;
color: #ffd98a;
font-size: 22px;
font-weight: 700;
letter-spacing: 1px;
@@ -292,8 +458,9 @@ async function startDetection() {
width: 28px;
height: 28px;
border-radius: 50%;
color: #fff;
background: var(--orange-dark);
background: linear-gradient(180deg, #ffd166 0%, #e08f00 100%);
box-shadow: 0 0 14px rgba(255, 190, 60, 0.35);
color: #2a1a00;
font-size: 19px;
font-weight: 700;
}
@@ -307,7 +474,7 @@ async function startDetection() {
.placement-requirements li {
display: flex;
gap: 9px;
color: #5b4213;
color: rgba(255, 228, 184, 0.82);
font-size: 18px;
line-height: 1.4;
}
@@ -320,8 +487,8 @@ async function startDetection() {
height: 21px;
margin-top: 2px;
border-radius: 50%;
background: rgba(224, 154, 6, 0.18);
color: #8a5b00;
background: rgba(255, 196, 80, 0.16);
color: #ffcf7a;
font-size: 13px;
font-weight: 700;
}
@@ -329,8 +496,8 @@ async function startDetection() {
.placement-requirements__warning {
margin-top: 10px;
padding-top: 10px;
border-top: 1px dashed rgba(138, 91, 0, 0.32);
color: var(--red);
border-top: 1px dashed rgba(255, 150, 120, 0.28);
color: #ff9d9d;
font-size: 18px;
font-weight: 600;
line-height: 1.4;
@@ -342,7 +509,7 @@ async function startDetection() {
gap: 10px;
margin-top: auto;
padding-top: 10px;
color: #5b4213;
color: rgba(255, 228, 184, 0.82);
font-size: 17px;
cursor: pointer;
user-select: none;
@@ -350,53 +517,93 @@ async function startDetection() {
.placement-confirm input {
flex: none;
width: 20px;
height: 20px;
accent-color: var(--teal-dark);
width: 22px;
height: 22px;
accent-color: #f0ac0b;
cursor: pointer;
}
.guide-actions {
display: grid;
flex: none;
grid-template-columns: 1fr;
gap: 20px;
grid-template-columns: minmax(0, 1fr) 320px;
align-items: center;
gap: 18px;
height: 78px;
}
.capture-status {
display: flex;
align-items: center;
gap: 12px;
height: 78px;
padding: 0 24px;
border: 1px solid rgba(130, 175, 255, 0.16);
border-radius: 14px;
background: rgba(10, 24, 48, 0.55);
color: rgba(178, 202, 232, 0.7);
font-size: 17px;
letter-spacing: 1px;
backdrop-filter: blur(12px);
}
.capture-status__dot {
flex: none;
width: 9px;
height: 9px;
border-radius: 50%;
background: #ffd86a;
box-shadow: 0 0 10px rgba(255, 216, 106, 0.8);
}
.capture-status.is-ready {
border-color: rgba(92, 227, 214, 0.3);
background: rgba(14, 46, 56, 0.5);
color: #8ff5e7;
}
.capture-status.is-ready .capture-status__dot {
background: #74f4c5;
box-shadow: 0 0 10px rgba(116, 244, 197, 0.9);
}
.action-button {
display: grid;
place-items: center;
height: 78px;
border-radius: 12px;
border-radius: 14px;
font-size: 30px;
font-weight: 600;
letter-spacing: 4px;
transition: transform 0.2s ease, box-shadow 0.2s ease;
transition:
transform 0.2s ease,
box-shadow 0.2s ease,
filter 0.2s ease;
}
.action-button:hover {
transform: translateY(-1px);
.action-button--start {
background: linear-gradient(180deg, #ffd166 0%, #f0ac0b 100%);
box-shadow:
0 16px 34px rgba(240, 172, 11, 0.28),
0 0 28px rgba(255, 190, 60, 0.18),
inset 0 1px 0 rgba(255, 255, 255, 0.6);
color: #241500;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.25);
}
.action-button:not(:disabled):hover {
box-shadow:
0 20px 42px rgba(240, 172, 11, 0.36),
0 0 36px rgba(255, 190, 60, 0.28),
inset 0 1px 0 rgba(255, 255, 255, 0.6);
transform: translateY(-2px);
}
.action-button:disabled {
cursor: default;
opacity: 0.7;
filter: saturate(0.35);
opacity: 0.45;
box-shadow: none;
transform: none;
}
.action-button--start {
color: #fff;
background: linear-gradient(180deg, #ffc52c 0%, #f3ae0d 100%);
box-shadow:
0 12px 24px rgba(224, 154, 6, 0.28),
inset 0 1px 0 rgba(255, 255, 255, 0.55);
text-shadow: 0 1px 2px rgba(151, 94, 0, 0.25);
}
.action-button--start:hover {
box-shadow:
0 16px 30px rgba(224, 154, 6, 0.36),
inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
</style>
+416 -79
View File
@@ -7,6 +7,9 @@ import ScanVisual from '@/components/ScanVisual.vue'
import ProgressStrip from '@/components/ProgressStrip.vue'
import StatusFooter from '@/components/StatusFooter.vue'
import { analyzeSample, type SampleAnalysisResult } from '@/api/sample'
import { startScan } from '@/api/scan'
import { useStageHub } from '@/composables/useStageHub'
import { showToast } from '@/composables/useToast'
type AnalysisStatus = 'processing' | 'done' | 'error'
@@ -16,6 +19,9 @@ const status = ref<AnalysisStatus>('processing')
const result = ref<SampleAnalysisResult | null>(null)
const errorMessage = ref('')
const progress = ref(0)
const scanStarting = ref(false)
const { position: stagePosition, connect: connectStageHub } = useStageHub()
let progressTimer: number | undefined
@@ -29,6 +35,16 @@ const samplingPointCount = computed(
() => result.value?.samplingPointCount ?? '—',
)
const stageStatusText = computed(() => {
if (!stagePosition.value) return '未连接'
return stagePosition.value.moving ? '运动中' : '就绪'
})
const stageStatusTone = computed(() => {
if (!stagePosition.value) return 'is-off'
return stagePosition.value.moving ? 'is-moving' : 'is-ready'
})
const progressLabel = computed(() => {
if (status.value === 'done') return '靶样轮廓与采样点 100%'
if (status.value === 'error') return '图像分析失败'
@@ -101,12 +117,31 @@ function retry() {
void runAnalysis()
}
function goSpectrum() {
void router.replace({ name: 'spectrum' })
async function startScanning() {
if (scanStarting.value) return
if (!result.value) {
showToast('请等待靶样分析完成')
return
}
scanStarting.value = true
try {
const started = await startScan()
await router.push({
name: 'spectrum',
query: { scanId: started.scanId },
})
} catch (error) {
showToast(error instanceof Error ? error.message : '启动扫描失败')
} finally {
scanStarting.value = false
}
}
onMounted(() => {
void runAnalysis()
void connectStageHub()
})
onBeforeUnmount(stopProgress)
@@ -114,15 +149,21 @@ onBeforeUnmount(stopProgress)
<template>
<AppStage>
<PageHeader title="样品轮廓识别与激光点位规划" variant="process">
<div class="scan-bg" aria-hidden="true">
<span class="scan-bg__orb scan-bg__orb--blue"></span>
<span class="scan-bg__orb scan-bg__orb--cyan"></span>
<span class="scan-bg__orb scan-bg__orb--violet"></span>
</div>
<PageHeader title="样品轮廓识别与激光点位规划" variant="process" theme="dark">
<template #left>
<button class="header-button header-button--warn" type="button" @click="abortProcess">
<button class="scan-abort" type="button" @click="abortProcess">
中止流程
</button>
</template>
<template #right>
<button class="icon-close" type="button" aria-label="关闭并返回首页" @click="abortProcess">
<button class="scan-close" type="button" aria-label="关闭并返回首页" @click="abortProcess">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="m6 6 12 12M18 6 6 18" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" />
</svg>
@@ -167,7 +208,10 @@ onBeforeUnmount(stopProgress)
<aside class="params-card">
<header class="params-card__header">
<h2>采样点</h2>
<div class="params-card__heading">
<span class="params-card__eyebrow">Sampling Plan</span>
<h2>采样点</h2>
</div>
</header>
<div class="params-card__body">
@@ -177,43 +221,167 @@ onBeforeUnmount(stopProgress)
</div>
<div class="param-field">
<span class="param-field__label">脉冲能量</span>
<div class="param-field__value">120 <small>mJ</small></div>
<span class="param-field__label">当前位置</span>
<div class="param-field__value param-field__value--position">
<span>X {{ stagePosition ? stagePosition.x : '—' }}</span>
<span>Y {{ stagePosition ? stagePosition.y : '—' }}</span>
</div>
</div>
<div class="param-field">
<span class="param-field__label">积分时间</span>
<div class="param-field__value">10 <small>ms</small></div>
<span class="param-field__label">位移台状态</span>
<div
class="param-field__value param-field__value--status"
:class="stageStatusTone"
>
<i class="param-field__dot"></i>
{{ stageStatusText }}
</div>
</div>
</div>
<div class="param-field">
<span class="param-field__label">预扫描</span>
<div class="param-field__value">3 <small>次</small></div>
</div>
<div class="params-card__hint">
<span class="params-card__hint-mark">i</span>
<p>确认靶样轮廓与采样点分布符合要求后,点击“开始采集”进入光谱采集流程。</p>
</div>
</aside>
</main>
<div v-if="status !== 'error'" class="scan-progress">
<div class="scan-progress__strip">
<ProgressStrip :progress="progress" :label="progressLabel" :note="progressNote" />
<ProgressStrip
:progress="progress"
:label="progressLabel"
:note="progressNote"
theme="dark"
/>
</div>
<button
v-if="status === 'done'"
class="scan-next"
type="button"
@click="goSpectrum"
:disabled="scanStarting"
@click="startScanning"
>
开始采集光谱
{{ scanStarting ? '启动中...' : '开始采集' }}
</button>
</div>
<StatusFooter icon="info" :items="footerItems" />
<StatusFooter icon="info" :items="footerItems" theme="dark" />
</AppStage>
</template>
<style scoped>
.scan-bg {
position: absolute;
inset: 0;
overflow: hidden;
pointer-events: none;
background:
radial-gradient(1000px 600px at 8% -16%, rgba(48, 112, 255, 0.28), transparent 62%),
radial-gradient(820px 520px at 98% 4%, rgba(0, 209, 255, 0.14), transparent 60%),
radial-gradient(900px 680px at 58% 116%, rgba(122, 84, 255, 0.18), transparent 62%),
linear-gradient(156deg, #050a16 0%, #081226 46%, #0a1730 100%);
}
.scan-bg::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(130, 175, 255, 0.05) 1px, transparent 1px),
linear-gradient(90deg, rgba(130, 175, 255, 0.05) 1px, transparent 1px);
background-size: 64px 64px;
mask-image: radial-gradient(ellipse 78% 72% at 50% 32%, #000 20%, transparent 78%);
}
.scan-bg__orb {
position: absolute;
border-radius: 50%;
filter: blur(100px);
animation: scan-orb-drift 16s ease-in-out infinite alternate;
}
.scan-bg__orb--blue {
top: -340px;
left: -160px;
width: 760px;
height: 760px;
background: rgba(48, 118, 255, 0.3);
}
.scan-bg__orb--cyan {
top: -200px;
right: -220px;
width: 640px;
height: 640px;
background: rgba(0, 214, 255, 0.18);
animation-delay: -5s;
}
.scan-bg__orb--violet {
bottom: -360px;
left: 36%;
width: 700px;
height: 700px;
background: rgba(124, 92, 255, 0.18);
animation-delay: -10s;
}
@keyframes scan-orb-drift {
from {
transform: translate3d(0, 0, 0) scale(1);
}
to {
transform: translate3d(42px, 30px, 0) scale(1.08);
}
}
.scan-abort {
width: 300px;
height: 68px;
border: 1px solid rgba(255, 190, 60, 0.45);
border-radius: 14px;
background: linear-gradient(120deg, rgba(255, 186, 40, 0.18), rgba(255, 150, 20, 0.06));
color: #ffd98a;
font-size: 26px;
font-weight: 600;
letter-spacing: 3px;
backdrop-filter: blur(10px);
transition:
transform 0.2s ease,
border-color 0.2s ease,
background 0.2s ease;
}
.scan-abort:hover {
border-color: rgba(255, 205, 100, 0.65);
background: linear-gradient(120deg, rgba(255, 186, 40, 0.26), rgba(255, 150, 20, 0.1));
transform: translateY(-1px);
}
.scan-close {
display: grid;
place-items: center;
width: 52px;
height: 52px;
border-radius: 50%;
color: rgba(170, 200, 235, 0.8);
transition: color 0.2s ease, background 0.2s ease;
}
.scan-close:hover {
background: rgba(255, 255, 255, 0.08);
color: #eaf3ff;
}
.scan-close svg {
width: 26px;
height: 26px;
}
.scan-main {
position: absolute;
top: 142px;
@@ -233,16 +401,21 @@ onBeforeUnmount(stopProgress)
}
.result-card {
position: relative;
display: flex;
flex-direction: column;
width: 1120px;
max-width: 100%;
height: 100%;
overflow: hidden;
border: 1px solid #1e55a4;
border-radius: 18px;
background: #0b1220;
box-shadow: 0 18px 44px rgba(31, 77, 147, 0.28);
border: 1px solid rgba(130, 175, 255, 0.18);
border-radius: 26px;
background: linear-gradient(158deg, rgba(20, 40, 78, 0.7) 0%, rgba(6, 14, 30, 0.85) 100%);
box-shadow:
0 30px 70px rgba(0, 10, 32, 0.5),
0 0 40px rgba(48, 118, 255, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
backdrop-filter: blur(16px);
justify-self: center;
}
@@ -251,25 +424,38 @@ onBeforeUnmount(stopProgress)
flex: none;
align-items: center;
justify-content: space-between;
height: 66px;
padding: 0 26px;
background: linear-gradient(180deg, #3d80e2 0%, #2f6fd0 100%);
height: 72px;
padding: 0 28px;
border-bottom: 1px solid rgba(130, 175, 255, 0.12);
background: linear-gradient(120deg, rgba(26, 58, 112, 0.85) 0%, rgba(10, 24, 52, 0.8) 100%);
}
.result-card__header h2 {
color: #fff;
display: flex;
align-items: center;
gap: 12px;
color: #eef5ff;
font-size: 28px;
font-weight: 600;
letter-spacing: 3px;
text-shadow: 0 1px 3px rgba(16, 49, 101, 0.22);
text-shadow: 0 0 22px rgba(80, 150, 255, 0.3);
}
.result-card__header h2::before {
content: '';
width: 4px;
height: 24px;
border-radius: 4px;
background: linear-gradient(180deg, #7fe0ff, #4d8bf0);
box-shadow: 0 0 14px rgba(90, 170, 255, 0.7);
}
.result-card__count {
padding: 5px 14px;
border: 1px solid rgba(255, 255, 255, 0.3);
padding: 6px 16px;
border: 1px solid rgba(130, 195, 255, 0.3);
border-radius: 30px;
background: rgba(255, 255, 255, 0.12);
color: #fff;
background: rgba(16, 40, 80, 0.5);
color: #9fe8ff;
font-size: 17px;
letter-spacing: 1px;
}
@@ -280,6 +466,7 @@ onBeforeUnmount(stopProgress)
min-height: 0;
place-items: center;
padding: 10px;
background: #040810;
}
.result-card__image {
@@ -297,10 +484,14 @@ onBeforeUnmount(stopProgress)
max-width: 100%;
height: 100%;
padding: 40px;
border: 1px solid #d9e0e8;
border-radius: 18px;
background: #fff;
box-shadow: var(--shadow-card);
border: 1px solid rgba(255, 107, 107, 0.24);
border-radius: 26px;
background: linear-gradient(158deg, rgba(64, 22, 34, 0.4) 0%, rgba(8, 14, 28, 0.88) 70%);
box-shadow:
0 30px 70px rgba(0, 10, 32, 0.5),
0 0 40px rgba(255, 84, 84, 0.08),
inset 0 1px 0 rgba(255, 255, 255, 0.06);
backdrop-filter: blur(16px);
justify-self: center;
text-align: center;
}
@@ -311,9 +502,11 @@ onBeforeUnmount(stopProgress)
width: 96px;
height: 96px;
margin-bottom: 24px;
border: 1px solid rgba(255, 120, 120, 0.3);
border-radius: 50%;
color: var(--red);
background: #fdeeee;
background: rgba(255, 84, 84, 0.12);
box-shadow: 0 0 30px rgba(255, 84, 84, 0.18);
color: #ff9d9d;
}
.error-card__icon svg {
@@ -322,16 +515,17 @@ onBeforeUnmount(stopProgress)
}
.error-card h2 {
color: #1f2937;
color: #f3f8ff;
font-size: 32px;
font-weight: 600;
letter-spacing: 2px;
text-shadow: 0 0 24px rgba(255, 100, 100, 0.2);
}
.error-card p {
margin-top: 16px;
max-width: 760px;
color: var(--muted);
color: rgba(178, 202, 232, 0.72);
font-size: 20px;
line-height: 1.6;
}
@@ -349,64 +543,119 @@ onBeforeUnmount(stopProgress)
font-size: 21px;
font-weight: 600;
letter-spacing: 3px;
transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
transition:
transform 0.2s ease,
box-shadow 0.2s ease,
background 0.2s ease,
border-color 0.2s ease;
}
.error-button--ghost {
border: 2px solid var(--line-strong);
color: var(--ink-soft);
background: #fff;
border: 1px solid rgba(130, 175, 255, 0.3);
background: rgba(18, 40, 78, 0.5);
color: #bcd9ff;
}
.error-button--ghost:hover {
background: var(--surface-soft);
border-color: rgba(150, 205, 255, 0.5);
background: rgba(30, 66, 128, 0.6);
}
.error-button--primary {
color: #fff;
background: linear-gradient(180deg, #4b89e4 0%, #2f6fd0 100%);
box-shadow: 0 10px 22px rgba(47, 111, 208, 0.28);
background: linear-gradient(180deg, #6fc6ff 0%, #3f86f0 55%, #2c63c9 100%);
box-shadow:
0 12px 26px rgba(47, 111, 208, 0.35),
inset 0 1px 0 rgba(255, 255, 255, 0.4);
color: #04101f;
}
.error-button--primary:hover {
box-shadow:
0 16px 32px rgba(47, 111, 208, 0.45),
inset 0 1px 0 rgba(255, 255, 255, 0.45);
transform: translateY(-1px);
box-shadow: 0 14px 28px rgba(47, 111, 208, 0.36);
}
.params-card {
position: relative;
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
border: 1px solid #d9e0e8;
border-radius: 10px;
background: #fff;
box-shadow: 0 8px 24px rgba(33, 53, 84, 0.05);
border: 1px solid rgba(130, 175, 255, 0.16);
border-radius: 26px;
background: linear-gradient(
158deg,
rgba(255, 255, 255, 0.07) 0%,
rgba(255, 255, 255, 0.025) 58%,
rgba(255, 255, 255, 0.04) 100%
);
box-shadow:
0 30px 70px rgba(0, 10, 32, 0.45),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
backdrop-filter: blur(16px);
}
.params-card::before {
content: '';
position: absolute;
top: 0;
right: 32px;
left: 32px;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(120, 180, 255, 0.55), transparent);
pointer-events: none;
}
.params-card__header {
display: flex;
flex: none;
align-items: center;
height: 64px;
padding: 0 22px;
border-bottom: 1px solid #e4e8ee;
background: #f3f4f6;
height: 96px;
padding: 0 26px;
border-bottom: 1px solid rgba(130, 175, 255, 0.12);
background: linear-gradient(120deg, rgba(30, 66, 128, 0.24) 0%, transparent 70%);
}
.params-card__heading {
display: flex;
flex-direction: column;
gap: 6px;
}
.params-card__eyebrow {
color: #5aa2ff;
font-size: 12px;
font-weight: 600;
letter-spacing: 2.6px;
text-transform: uppercase;
}
.params-card__header h2 {
color: #333b46;
font-size: 23px;
font-weight: 500;
letter-spacing: 1px;
display: flex;
align-items: center;
gap: 12px;
color: #eaf3ff;
font-size: 26px;
font-weight: 600;
letter-spacing: 2px;
}
.params-card__header h2::before {
content: '';
width: 4px;
height: 22px;
border-radius: 4px;
background: linear-gradient(180deg, #7fe0ff, #4d8bf0);
box-shadow: 0 0 14px rgba(90, 170, 255, 0.7);
}
.params-card__body {
padding: 26px 22px;
padding: 28px 24px;
}
.param-field {
margin-bottom: 24px;
margin-bottom: 26px;
}
.param-field:last-child {
@@ -416,9 +665,9 @@ onBeforeUnmount(stopProgress)
.param-field__label {
display: block;
margin-bottom: 10px;
color: #46505e;
font-size: 22px;
letter-spacing: 0.5px;
color: rgba(158, 190, 226, 0.7);
font-size: 20px;
letter-spacing: 1px;
}
.param-field__value {
@@ -426,20 +675,90 @@ onBeforeUnmount(stopProgress)
align-items: center;
height: 62px;
padding: 0 18px;
border: 1px solid #d8dde6;
border-radius: 7px;
background: #fff;
color: #2e3641;
border: 1px solid rgba(130, 175, 255, 0.16);
border-radius: 12px;
background: rgba(8, 18, 38, 0.6);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
color: #e8f2ff;
font-size: 24px;
box-shadow: inset 0 1px 2px rgba(30, 45, 66, 0.03);
}
.param-field__value small {
margin-left: 8px;
color: #8d97a4;
color: rgba(158, 190, 226, 0.55);
font-size: 18px;
}
.param-field__value--position {
justify-content: space-between;
gap: 12px;
}
.param-field__value--status {
gap: 10px;
}
.param-field__dot {
flex: none;
width: 9px;
height: 9px;
border-radius: 50%;
background: #c9d4e4;
}
.param-field__value--status.is-ready {
color: #8ff5e7;
}
.param-field__value--status.is-ready .param-field__dot {
background: #74f4c5;
box-shadow: 0 0 10px rgba(116, 244, 197, 0.9);
}
.param-field__value--status.is-moving {
color: #ffd98a;
}
.param-field__value--status.is-moving .param-field__dot {
background: #ffd86a;
box-shadow: 0 0 10px rgba(255, 216, 106, 0.8);
}
.param-field__value--status.is-off {
color: rgba(255, 154, 145, 0.9);
}
.param-field__value--status.is-off .param-field__dot {
background: #ff9a91;
box-shadow: 0 0 10px rgba(255, 154, 145, 0.7);
}
.params-card__hint {
display: flex;
gap: 12px;
margin: auto 24px 26px;
padding: 16px 18px;
border: 1px solid rgba(130, 175, 255, 0.14);
border-radius: 14px;
background: rgba(8, 18, 38, 0.45);
color: rgba(158, 190, 226, 0.66);
font-size: 16px;
line-height: 1.6;
}
.params-card__hint-mark {
display: grid;
flex: none;
place-items: center;
width: 24px;
height: 24px;
border: 1px solid rgba(130, 195, 255, 0.35);
border-radius: 50%;
color: #8fc6ff;
font-size: 14px;
font-weight: 700;
}
.scan-progress {
position: absolute;
top: 900px;
@@ -460,18 +779,36 @@ onBeforeUnmount(stopProgress)
flex: none;
width: 280px;
height: 54px;
border-radius: 10px;
color: #fff;
border-radius: 12px;
background: linear-gradient(180deg, #ffd166 0%, #f0ac0b 100%);
box-shadow:
0 14px 30px rgba(240, 172, 11, 0.28),
0 0 26px rgba(255, 190, 60, 0.16),
inset 0 1px 0 rgba(255, 255, 255, 0.6);
color: #241500;
font-size: 23px;
font-weight: 600;
letter-spacing: 3px;
background: linear-gradient(180deg, #4b89e4 0%, #2f6fd0 100%);
box-shadow: 0 10px 22px rgba(47, 111, 208, 0.28);
transition: transform 0.2s ease, box-shadow 0.2s ease;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.25);
transition:
transform 0.2s ease,
box-shadow 0.2s ease,
filter 0.2s ease;
}
.scan-next:hover {
transform: translateY(-1px);
box-shadow: 0 14px 28px rgba(47, 111, 208, 0.36);
.scan-next:not(:disabled):hover {
box-shadow:
0 18px 38px rgba(240, 172, 11, 0.36),
0 0 34px rgba(255, 190, 60, 0.26),
inset 0 1px 0 rgba(255, 255, 255, 0.6);
transform: translateY(-2px);
}
.scan-next:disabled {
cursor: default;
filter: saturate(0.35);
opacity: 0.45;
box-shadow: none;
transform: none;
}
</style>
+522 -70
View File
@@ -1,83 +1,322 @@
<script setup lang="ts">
import { computed } from 'vue'
import { useRouter } from 'vue-router'
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import AppStage from '@/components/AppStage.vue'
import PageHeader from '@/components/PageHeader.vue'
import SpectrumChart from '@/components/SpectrumChart.vue'
import ProgressStrip from '@/components/ProgressStrip.vue'
import StatusFooter from '@/components/StatusFooter.vue'
import { useTimedProgress } from '@/composables/useTimedProgress'
import { abortScan, getCurrentScan, type ScanProgress } from '@/api/scan'
import { useStageHub } from '@/composables/useStageHub'
import { showToast } from '@/composables/useToast'
const router = useRouter()
const route = useRoute()
const { progress } = useTimedProgress(10000, () => {
void router.replace({ name: 'result' })
const queryScanId = computed(() => {
const raw = route.query.scanId
return typeof raw === 'string' ? raw : ''
})
const progressLabel = computed(() => `光谱采集 ${Math.round(progress.value)}%`)
const sampleIndex = computed(() =>
Math.min(5, Math.max(1, Math.ceil(progress.value / 20))),
const activeScanId = ref(queryScanId.value)
const fallbackProgress = ref<ScanProgress | null>(null)
const {
position,
progress: hubProgress,
spectrum: liveSpectrum,
finished,
connect,
} = useStageHub()
const progress = computed(() => hubProgress.value ?? fallbackProgress.value)
const phaseText = computed(() => mapPhase(progress.value?.phase))
const percent = computed(() => progress.value?.percent ?? 0)
const progressLabel = computed(() => `光谱采集 ${percent.value}%`)
const progressNote = computed(
() => progress.value?.message ?? '等待扫描开始',
)
function abortProcess() {
const chartWavelengths = computed(() => liveSpectrum.value?.wavelengths ?? [])
const chartSpectrum = computed(() => liveSpectrum.value?.spectrum ?? [])
const chartSegments = computed(() => liveSpectrum.value?.segments ?? [])
const chartStatus = computed(() => {
if (progress.value?.phase === 'Acquiring') return '正在采集光谱'
if (liveSpectrum.value) {
return `第 ${liveSpectrum.value.pointIndex + 1} 点光谱`
}
return '等待光谱数据'
})
const activeStep = computed(() => {
switch (progress.value?.phase) {
case 'Homing':
case 'Moving':
case 'Returning':
return 'move'
case 'Focusing':
return 'focus'
case 'Acquiring':
return 'acquire'
case 'Analyzing':
case 'Writing':
return 'analyze'
case 'Completed':
return 'done'
default:
return ''
}
})
const stepOrder = ['move', 'focus', 'acquire', 'analyze'] as const
function stepState(key: (typeof stepOrder)[number]) {
const active = activeStep.value
if (active === 'done') return 'done'
if (!active) return ''
const activeIndex = stepOrder.indexOf(active as (typeof stepOrder)[number])
const index = stepOrder.indexOf(key)
if (index < activeIndex) return 'done'
if (index === activeIndex) return 'active'
return ''
}
const footerItems = computed(() => [
position.value
? `X ${position.value.x} mm / Y ${position.value.y} mm`
: '位移台未连接',
phaseText.value,
progress.value
? `采样点 ${Math.min(progress.value.completedPoints, progress.value.totalPoints)} / ${progress.value.totalPoints}`
: '等待开始',
])
let pollTimer: number | undefined
let navigated = false
function mapPhase(phase?: string) {
switch (phase) {
case 'Idle':
return '准备中'
case 'Homing':
return '位移台回零'
case 'Moving':
return '位移台移动'
case 'Focusing':
return '对焦中'
case 'Acquiring':
return '收光中'
case 'Returning':
return '位移台回零'
case 'Analyzing':
return 'NIST 分析中'
case 'Writing':
return '写入数据库'
case 'Completed':
return '采集完成'
case 'Aborted':
return '已中止'
case 'Failed':
return '采集失败'
default:
return '等待开始'
}
}
function goResult(scanId: string) {
if (navigated) return
navigated = true
void router.replace({
name: 'result',
query: { scanId },
})
}
function goHomeWithToast(message?: string) {
if (navigated) return
navigated = true
if (message) showToast(message)
void router.replace({ name: 'home' })
}
async function abortProcess() {
try {
await abortScan()
} catch (error) {
showToast(error instanceof Error ? error.message : '中止扫描失败')
}
goHomeWithToast()
}
async function poll() {
try {
const current = await getCurrentScan()
fallbackProgress.value = current
if (!activeScanId.value && current.scanId) {
activeScanId.value = current.scanId
}
if (!activeScanId.value && current.phase === 'Idle') {
goHomeWithToast()
return
}
if (current.phase === 'Completed' && current.scanId) {
goResult(current.scanId)
return
}
if (current.phase === 'Aborted' || current.phase === 'Failed') {
goHomeWithToast(current.message || '扫描已结束')
}
} catch {
// 轮询失败时保留 SignalR 推送的状态
}
}
watch(finished, (value) => {
if (!value) return
if (value.status === 'Completed') {
goResult(value.scanId || activeScanId.value)
return
}
goHomeWithToast(value.error ?? '扫描已中止')
})
onMounted(() => {
void connect()
void poll()
pollTimer = window.setInterval(poll, 2000)
})
onBeforeUnmount(() => {
if (pollTimer !== undefined) {
window.clearInterval(pollTimer)
pollTimer = undefined
}
})
</script>
<template>
<AppStage>
<PageHeader title="光谱数据采集与分析" variant="process">
<div class="spectrum-bg" aria-hidden="true">
<span class="spectrum-bg__orb spectrum-bg__orb--blue"></span>
<span class="spectrum-bg__orb spectrum-bg__orb--cyan"></span>
<span class="spectrum-bg__orb spectrum-bg__orb--violet"></span>
</div>
<PageHeader title="光谱数据采集与分析" variant="process" theme="dark">
<template #left>
<button class="header-button header-button--warn" type="button" @click="abortProcess">
<button class="spectrum-abort" type="button" @click="abortProcess">
中止流程
</button>
</template>
</PageHeader>
<main class="spectrum-main">
<SpectrumChart class="spectrum-chart" />
<SpectrumChart
class="spectrum-chart"
:wavelengths="chartWavelengths"
:spectrum="chartSpectrum"
:segments="chartSegments"
:status-text="chartStatus"
/>
<aside class="analysis-card">
<header class="analysis-card__header">
<h2>分析步骤</h2>
<div class="analysis-card__heading">
<span class="analysis-card__eyebrow">Scan Steps</span>
<h2>扫描步骤</h2>
</div>
</header>
<div class="analysis-card__body">
<div class="analysis-step">
<div
class="analysis-step"
:class="{
'analysis-step--active': stepState('move') === 'active',
'analysis-step--done': stepState('move') === 'done',
}"
>
<span class="analysis-step__icon analysis-step__icon--blue">
<svg viewBox="0 0 24 24" aria-hidden="true">
<circle cx="12" cy="12" r="8" fill="none" stroke="currentColor" stroke-width="1.6" />
<path d="M12 7v5l3.4 2" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" />
<path d="M4 12h16M4 12l4-4M4 12l4 4M20 12l-4-4M20 12l-4 4" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</span>
<span class="analysis-step__text">正在拟合峰值</span>
<span class="analysis-step__text">位移台移动</span>
<span class="analysis-step__chevron">›</span>
</div>
<div class="analysis-step">
<div
class="analysis-step"
:class="{
'analysis-step--active': stepState('focus') === 'active',
'analysis-step--done': stepState('focus') === 'done',
}"
>
<span class="analysis-step__icon analysis-step__icon--amber">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M5 15h14M7 15V8l5-3 5 3v7" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round" />
<path d="M9 15v3h6v-3" fill="none" stroke="currentColor" stroke-width="1.6" />
<circle cx="12" cy="12" r="7" fill="none" stroke="currentColor" stroke-width="1.6" />
<path d="M12 2v4M12 18v4M2 12h4M18 12h4" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" />
</svg>
</span>
<span class="analysis-step__text">扣除连续背景</span>
<span class="analysis-step__text">单次对焦</span>
<span class="analysis-step__chevron">›</span>
</div>
<div class="analysis-step">
<div
class="analysis-step"
:class="{
'analysis-step--active': stepState('acquire') === 'active',
'analysis-step--done': stepState('acquire') === 'done',
}"
>
<span class="analysis-step__icon analysis-step__icon--blue">
<svg viewBox="0 0 24 24" aria-hidden="true">
<path d="M3 14l3-6 3 10 3-14 3 12 3-8 3 6" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</span>
<span class="analysis-step__text">光谱仪收光</span>
<span class="analysis-step__chevron">›</span>
</div>
<div
class="analysis-step"
:class="{
'analysis-step--active': stepState('analyze') === 'active',
'analysis-step--done': stepState('analyze') === 'done',
}"
>
<span class="analysis-step__icon analysis-step__icon--amber">
<svg viewBox="0 0 24 24" aria-hidden="true">
<rect x="6" y="4" width="12" height="16" rx="2" fill="none" stroke="currentColor" stroke-width="1.6" />
<path d="M9 8h6M9 11h6M9 14h3" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" />
</svg>
</span>
<span class="analysis-step__text">计算元素浓度</span>
<span class="analysis-step__text">NIST 元素分析</span>
<span class="analysis-step__chevron">›</span>
</div>
<div class="analysis-card__track" aria-hidden="true">
<span></span>
<div class="analysis-position">
<span class="analysis-position__label">当前位置</span>
<span class="analysis-position__value">
X {{ position ? position.x : '—' }} / Y {{ position ? position.y : '—' }}
<small>mm</small>
</span>
</div>
<div class="analysis-hint">
<span class="analysis-hint__mark">i</span>
<p>扫描过程中请勿打开样品仓或触碰位移台,以免影响点位与光谱数据。</p>
</div>
</div>
</aside>
@@ -85,20 +324,107 @@ function abortProcess() {
<div class="spectrum-progress">
<ProgressStrip
:progress="progress"
:progress="percent"
:label="progressLabel"
:note="`第 ${sampleIndex} / 5 次采样`"
:note="progressNote"
theme="dark"
/>
</div>
<StatusFooter
icon="laser"
:items="['激光发射正常', '探测器积分完成', '数据保存中']"
/>
<StatusFooter icon="laser" :items="footerItems" theme="dark" />
</AppStage>
</template>
<style scoped>
.spectrum-bg {
position: absolute;
inset: 0;
overflow: hidden;
pointer-events: none;
background:
radial-gradient(1000px 600px at 8% -16%, rgba(48, 112, 255, 0.28), transparent 62%),
radial-gradient(820px 520px at 98% 4%, rgba(0, 209, 255, 0.14), transparent 60%),
radial-gradient(900px 680px at 58% 116%, rgba(122, 84, 255, 0.18), transparent 62%),
linear-gradient(156deg, #050a16 0%, #081226 46%, #0a1730 100%);
}
.spectrum-bg::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(130, 175, 255, 0.05) 1px, transparent 1px),
linear-gradient(90deg, rgba(130, 175, 255, 0.05) 1px, transparent 1px);
background-size: 64px 64px;
mask-image: radial-gradient(ellipse 78% 72% at 50% 32%, #000 20%, transparent 78%);
}
.spectrum-bg__orb {
position: absolute;
border-radius: 50%;
filter: blur(100px);
animation: spectrum-orb-drift 16s ease-in-out infinite alternate;
}
.spectrum-bg__orb--blue {
top: -340px;
left: -160px;
width: 760px;
height: 760px;
background: rgba(48, 118, 255, 0.3);
}
.spectrum-bg__orb--cyan {
top: -200px;
right: -220px;
width: 640px;
height: 640px;
background: rgba(0, 214, 255, 0.18);
animation-delay: -5s;
}
.spectrum-bg__orb--violet {
bottom: -360px;
left: 36%;
width: 700px;
height: 700px;
background: rgba(124, 92, 255, 0.18);
animation-delay: -10s;
}
@keyframes spectrum-orb-drift {
from {
transform: translate3d(0, 0, 0) scale(1);
}
to {
transform: translate3d(42px, 30px, 0) scale(1.08);
}
}
.spectrum-abort {
width: 300px;
height: 68px;
border: 1px solid rgba(255, 190, 60, 0.45);
border-radius: 14px;
background: linear-gradient(120deg, rgba(255, 186, 40, 0.18), rgba(255, 150, 20, 0.06));
color: #ffd98a;
font-size: 26px;
font-weight: 600;
letter-spacing: 3px;
backdrop-filter: blur(10px);
transition:
transform 0.2s ease,
border-color 0.2s ease,
background 0.2s ease;
}
.spectrum-abort:hover {
border-color: rgba(255, 205, 100, 0.65);
background: linear-gradient(120deg, rgba(255, 186, 40, 0.26), rgba(255, 150, 20, 0.1));
transform: translateY(-1px);
}
.spectrum-main {
position: absolute;
top: 142px;
@@ -115,36 +441,84 @@ function abortProcess() {
}
.analysis-card {
position: relative;
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
border: 1px solid #d9e0e8;
border-radius: 10px;
background: #fff;
box-shadow: 0 8px 24px rgba(33, 53, 84, 0.05);
border: 1px solid rgba(130, 175, 255, 0.16);
border-radius: 26px;
background: linear-gradient(
158deg,
rgba(255, 255, 255, 0.07) 0%,
rgba(255, 255, 255, 0.025) 58%,
rgba(255, 255, 255, 0.04) 100%
);
box-shadow:
0 30px 70px rgba(0, 10, 32, 0.45),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
backdrop-filter: blur(16px);
}
.analysis-card::before {
content: '';
position: absolute;
top: 0;
right: 32px;
left: 32px;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(120, 180, 255, 0.55), transparent);
pointer-events: none;
}
.analysis-card__header {
display: flex;
flex: none;
align-items: center;
height: 64px;
padding: 0 22px;
border-bottom: 1px solid #e4e8ee;
background: #f3f4f6;
height: 96px;
padding: 0 26px;
border-bottom: 1px solid rgba(130, 175, 255, 0.12);
background: linear-gradient(120deg, rgba(30, 66, 128, 0.24) 0%, transparent 70%);
}
.analysis-card__heading {
display: flex;
flex-direction: column;
gap: 6px;
}
.analysis-card__eyebrow {
color: #5aa2ff;
font-size: 12px;
font-weight: 600;
letter-spacing: 2.6px;
text-transform: uppercase;
}
.analysis-card__header h2 {
color: #333b46;
font-size: 23px;
font-weight: 500;
letter-spacing: 1px;
display: flex;
align-items: center;
gap: 12px;
color: #eaf3ff;
font-size: 26px;
font-weight: 600;
letter-spacing: 2px;
}
.analysis-card__header h2::before {
content: '';
width: 4px;
height: 22px;
border-radius: 4px;
background: linear-gradient(180deg, #7fe0ff, #4d8bf0);
box-shadow: 0 0 14px rgba(90, 170, 255, 0.7);
}
.analysis-card__body {
display: flex;
flex: 1;
padding: 16px 18px;
flex-direction: column;
padding: 18px;
}
.analysis-step {
@@ -152,17 +526,42 @@ function abortProcess() {
align-items: center;
gap: 16px;
height: 78px;
padding: 0 10px;
border-bottom: 1px solid #eef1f5;
padding: 0 14px;
border: 1px solid transparent;
border-radius: 14px;
opacity: 0.45;
transition:
opacity 0.2s ease,
background 0.2s ease,
border-color 0.2s ease,
box-shadow 0.2s ease;
}
.analysis-step + .analysis-step {
margin-top: 8px;
}
.analysis-step--active {
border-color: rgba(120, 200, 255, 0.35);
background: rgba(70, 140, 255, 0.14);
box-shadow:
0 0 24px rgba(70, 140, 255, 0.18),
inset 0 1px 0 rgba(255, 255, 255, 0.06);
opacity: 1;
}
.analysis-step--done {
opacity: 0.9;
}
.analysis-step__icon {
display: grid;
flex: none;
place-items: center;
width: 38px;
height: 38px;
border-radius: 50%;
width: 42px;
height: 42px;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
}
.analysis-step__icon svg {
@@ -171,45 +570,98 @@ function abortProcess() {
}
.analysis-step__icon--blue {
color: #2f6fd0;
background: #eaf2ff;
border-color: rgba(120, 190, 255, 0.25);
background: rgba(70, 140, 255, 0.16);
color: #8fd0ff;
}
.analysis-step__icon--amber {
color: #d59400;
background: #fff4d6;
border-color: rgba(255, 205, 100, 0.22);
background: rgba(255, 180, 40, 0.14);
color: #ffd166;
}
.analysis-step__text {
flex: 1;
color: #3f4b5b;
color: rgba(200, 220, 245, 0.72);
font-size: 21px;
letter-spacing: 0.5px;
}
.analysis-step--active .analysis-step__text {
color: #f2f8ff;
}
.analysis-step--done .analysis-step__text {
color: rgba(220, 238, 255, 0.9);
}
.analysis-step__chevron {
color: #b2bcc8;
color: rgba(130, 175, 255, 0.35);
font-size: 30px;
line-height: 1;
}
.analysis-card__track {
position: relative;
width: 6px;
height: 142px;
margin: 22px 0 0 auto;
border-radius: 6px;
background: #eef1f5;
.analysis-step--active .analysis-step__chevron {
color: #7fe0ff;
}
.analysis-card__track span {
position: absolute;
top: 18px;
left: 0;
width: 6px;
height: 54px;
border-radius: 6px;
background: #c9d3df;
.analysis-position {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: 18px;
padding: 16px 18px;
border: 1px solid rgba(130, 175, 255, 0.14);
border-radius: 14px;
background: rgba(8, 18, 38, 0.55);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.analysis-position__label {
color: rgba(158, 190, 226, 0.7);
font-size: 16px;
letter-spacing: 1px;
}
.analysis-position__value {
color: #e8f2ff;
font-size: 26px;
font-weight: 600;
letter-spacing: 1px;
}
.analysis-position__value small {
margin-left: 6px;
color: rgba(158, 190, 226, 0.55);
font-size: 16px;
font-weight: 400;
}
.analysis-hint {
display: flex;
gap: 12px;
margin-top: auto;
padding: 16px 18px;
border: 1px solid rgba(130, 175, 255, 0.14);
border-radius: 14px;
background: rgba(8, 18, 38, 0.45);
color: rgba(158, 190, 226, 0.66);
font-size: 15px;
line-height: 1.6;
}
.analysis-hint__mark {
display: grid;
flex: none;
place-items: center;
width: 24px;
height: 24px;
border: 1px solid rgba(130, 195, 255, 0.35);
border-radius: 50%;
color: #8fc6ff;
font-size: 14px;
font-weight: 700;
}
.spectrum-progress {
+278 -83
View File
@@ -199,9 +199,19 @@ onMounted(() => {
<template>
<AppStage>
<PageHeader title="系统参数管理" subtitle="系统运行参数集中配置">
<div class="system-bg" aria-hidden="true">
<span class="system-bg__orb system-bg__orb--blue"></span>
<span class="system-bg__orb system-bg__orb--cyan"></span>
<span class="system-bg__orb system-bg__orb--violet"></span>
</div>
<PageHeader
title="系统参数管理"
subtitle="系统运行参数集中配置"
theme="dark"
>
<template #left>
<button class="header-button header-button--outline" type="button" @click="goHome">
<button class="admin-back" type="button" @click="goHome">
返回
</button>
</template>
@@ -377,6 +387,95 @@ onMounted(() => {
</template>
<style scoped>
.system-bg {
position: absolute;
inset: 0;
overflow: hidden;
pointer-events: none;
background:
radial-gradient(1000px 600px at 8% -16%, rgba(48, 112, 255, 0.28), transparent 62%),
radial-gradient(820px 520px at 98% 4%, rgba(0, 209, 255, 0.14), transparent 60%),
radial-gradient(900px 680px at 58% 116%, rgba(122, 84, 255, 0.18), transparent 62%),
linear-gradient(156deg, #050a16 0%, #081226 46%, #0a1730 100%);
}
.system-bg::before {
content: '';
position: absolute;
inset: 0;
background-image:
linear-gradient(rgba(130, 175, 255, 0.05) 1px, transparent 1px),
linear-gradient(90deg, rgba(130, 175, 255, 0.05) 1px, transparent 1px);
background-size: 64px 64px;
mask-image: radial-gradient(ellipse 78% 72% at 50% 32%, #000 20%, transparent 78%);
}
.system-bg__orb {
position: absolute;
border-radius: 50%;
filter: blur(100px);
animation: system-orb-drift 16s ease-in-out infinite alternate;
}
.system-bg__orb--blue {
top: -340px;
left: -160px;
width: 760px;
height: 760px;
background: rgba(48, 118, 255, 0.3);
}
.system-bg__orb--cyan {
top: -200px;
right: -220px;
width: 640px;
height: 640px;
background: rgba(0, 214, 255, 0.18);
animation-delay: -5s;
}
.system-bg__orb--violet {
bottom: -360px;
left: 36%;
width: 700px;
height: 700px;
background: rgba(124, 92, 255, 0.18);
animation-delay: -10s;
}
@keyframes system-orb-drift {
from {
transform: translate3d(0, 0, 0) scale(1);
}
to {
transform: translate3d(42px, 30px, 0) scale(1.08);
}
}
.admin-back {
width: 132px;
height: 60px;
border: 1px solid rgba(130, 190, 255, 0.35);
border-radius: 12px;
background: rgba(18, 40, 78, 0.5);
color: #bcd9ff;
font-size: 24px;
font-weight: 600;
letter-spacing: 3px;
backdrop-filter: blur(10px);
transition:
transform 0.2s ease,
border-color 0.2s ease,
background 0.2s ease;
}
.admin-back:hover {
border-color: rgba(150, 205, 255, 0.55);
background: rgba(30, 66, 128, 0.65);
transform: translateY(-1px);
}
.system-main {
position: absolute;
top: 176px;
@@ -386,13 +485,32 @@ onMounted(() => {
}
.config-card {
position: relative;
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
border-radius: var(--radius-lg);
background: #fff;
box-shadow: var(--shadow-card);
border: 1px solid rgba(130, 175, 255, 0.18);
border-radius: 26px;
background: linear-gradient(158deg, rgba(20, 40, 78, 0.7) 0%, rgba(6, 14, 30, 0.85) 100%);
box-shadow:
0 30px 70px rgba(0, 10, 32, 0.5),
0 0 40px rgba(48, 118, 255, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
backdrop-filter: blur(16px);
color-scheme: dark;
}
.config-card::before {
content: '';
position: absolute;
top: 0;
right: 40px;
left: 40px;
z-index: 2;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(130, 214, 255, 0.55), transparent);
pointer-events: none;
}
.config-toolbar {
@@ -402,7 +520,8 @@ onMounted(() => {
justify-content: space-between;
gap: 24px;
padding: 24px 30px;
border-bottom: 1px solid var(--line);
border-bottom: 1px solid rgba(130, 175, 255, 0.12);
background: linear-gradient(120deg, rgba(26, 58, 112, 0.24) 0%, transparent 70%);
}
.config-search {
@@ -415,18 +534,26 @@ onMounted(() => {
width: 460px;
height: 54px;
padding: 0 20px;
border: 2px solid var(--line-strong);
border-radius: 10px;
color: var(--ink);
border: 1px solid rgba(130, 175, 255, 0.18);
border-radius: 12px;
background: rgba(8, 18, 38, 0.6);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
color: #e8f2ff;
font-family: inherit;
font-size: 19px;
outline: none;
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.config-search__input::placeholder {
color: rgba(158, 190, 226, 0.42);
}
.config-search__input:focus {
border-color: var(--blue);
box-shadow: 0 0 0 4px rgba(47, 111, 208, 0.12);
border-color: rgba(120, 200, 255, 0.55);
box-shadow:
0 0 0 4px rgba(70, 140, 255, 0.14),
0 0 24px rgba(70, 140, 255, 0.1);
}
.config-toolbar__right {
@@ -438,40 +565,54 @@ onMounted(() => {
.toolbar-button {
height: 54px;
padding: 0 26px;
border-radius: 10px;
border: 2px solid var(--blue);
color: var(--blue);
border: 1px solid rgba(130, 175, 255, 0.28);
border-radius: 12px;
background: rgba(18, 40, 78, 0.5);
color: #bcd9ff;
font-size: 19px;
font-weight: 600;
letter-spacing: 2px;
background: #fff;
transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
transition:
transform 0.2s ease,
background 0.2s ease,
border-color 0.2s ease,
box-shadow 0.2s ease;
}
.toolbar-button:hover {
background: var(--blue-soft);
border-color: rgba(150, 205, 255, 0.5);
background: rgba(30, 66, 128, 0.6);
transform: translateY(-1px);
}
.toolbar-button--ghost {
border-color: var(--line-strong);
color: var(--ink-soft);
border-color: rgba(130, 175, 255, 0.18);
background: rgba(10, 24, 48, 0.45);
color: rgba(178, 202, 232, 0.82);
}
.toolbar-button--ghost:hover {
background: var(--surface-soft);
border-color: rgba(150, 205, 255, 0.35);
background: rgba(20, 44, 86, 0.55);
}
.toolbar-button--primary {
border-color: transparent;
color: #fff;
background: linear-gradient(180deg, #4b89e4 0%, #2f6fd0 100%);
box-shadow: 0 8px 18px rgba(47, 111, 208, 0.24);
background: linear-gradient(180deg, #ffd166 0%, #f0ac0b 100%);
box-shadow:
0 12px 26px rgba(240, 172, 11, 0.26),
0 0 24px rgba(255, 190, 60, 0.14),
inset 0 1px 0 rgba(255, 255, 255, 0.6);
color: #241500;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.25);
}
.toolbar-button--primary:hover {
background: linear-gradient(180deg, #4b89e4 0%, #2f6fd0 100%);
box-shadow: 0 12px 24px rgba(47, 111, 208, 0.32);
background: linear-gradient(180deg, #ffd166 0%, #f0ac0b 100%);
box-shadow:
0 16px 34px rgba(240, 172, 11, 0.34),
0 0 32px rgba(255, 190, 60, 0.22),
inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.config-table {
@@ -495,9 +636,10 @@ onMounted(() => {
flex: none;
height: 62px;
margin-top: 18px;
border-radius: 12px;
background: var(--surface-soft);
color: var(--muted);
border: 1px solid rgba(130, 175, 255, 0.12);
border-radius: 14px;
background: rgba(255, 255, 255, 0.04);
color: rgba(158, 190, 226, 0.65);
font-size: 18px;
font-weight: 600;
letter-spacing: 1px;
@@ -507,22 +649,33 @@ onMounted(() => {
flex: 1;
min-height: 0;
overflow-y: auto;
margin-right: -6px;
padding-right: 6px;
}
.config-table__body::-webkit-scrollbar {
width: 6px;
}
.config-table__body::-webkit-scrollbar-thumb {
border-radius: 3px;
background: rgba(130, 175, 255, 0.25);
}
.config-row {
min-height: 72px;
border-bottom: 1px solid var(--line);
color: var(--ink-soft);
border-bottom: 1px solid rgba(130, 175, 255, 0.08);
color: rgba(210, 228, 250, 0.8);
font-size: 19px;
transition: background 0.18s ease;
}
.config-row:hover {
background: #f8fafc;
background: rgba(70, 140, 255, 0.08);
}
.col-name {
color: var(--ink);
color: #f2f8ff;
font-weight: 600;
}
@@ -542,47 +695,53 @@ onMounted(() => {
.row-button {
height: 42px;
padding: 0 18px;
border: 1px solid var(--line-strong);
border-radius: 8px;
color: var(--blue);
border: 1px solid rgba(120, 190, 255, 0.28);
border-radius: 10px;
background: rgba(70, 140, 255, 0.12);
color: #8fd0ff;
font-size: 17px;
font-weight: 600;
letter-spacing: 1px;
background: #fff;
transition: background 0.18s ease, border-color 0.18s ease;
transition:
background 0.18s ease,
border-color 0.18s ease,
color 0.18s ease;
}
.row-button:hover {
border-color: var(--blue);
background: var(--blue-soft);
border-color: rgba(150, 205, 255, 0.5);
background: rgba(70, 140, 255, 0.22);
}
.row-button--danger {
color: var(--red);
border-color: rgba(255, 120, 120, 0.28);
background: rgba(255, 84, 84, 0.1);
color: #ff9d9d;
}
.row-button--danger:hover {
border-color: var(--red);
background: #fdeeee;
border-color: rgba(255, 150, 150, 0.5);
background: rgba(255, 84, 84, 0.18);
}
.config-empty {
padding: 80px 0;
color: var(--muted-light);
color: rgba(158, 190, 226, 0.5);
font-size: 20px;
letter-spacing: 1px;
text-align: center;
}
.config-footer {
flex: none;
height: 64px;
display: flex;
flex: none;
align-items: center;
justify-content: flex-end;
height: 64px;
padding: 0 48px;
border-top: 1px solid var(--line);
color: var(--muted);
border-top: 1px solid rgba(130, 175, 255, 0.12);
background: rgba(8, 18, 38, 0.55);
color: rgba(158, 190, 226, 0.65);
font-size: 18px;
letter-spacing: 1px;
}
@@ -594,26 +753,31 @@ onMounted(() => {
display: grid;
place-items: center;
padding: 24px;
background: rgba(18, 33, 54, 0.44);
backdrop-filter: blur(5px);
background: rgba(3, 8, 18, 0.68);
backdrop-filter: blur(8px);
}
.form-card {
width: 760px;
padding: 36px 40px 34px;
border: 1px solid rgba(255, 255, 255, 0.65);
border-radius: 24px;
background: #fff;
box-shadow: 0 30px 80px rgba(12, 30, 55, 0.3);
border: 1px solid rgba(130, 175, 255, 0.2);
border-radius: 26px;
background: linear-gradient(158deg, rgba(22, 42, 78, 0.98) 0%, rgba(8, 16, 32, 0.99) 100%);
box-shadow:
0 40px 90px rgba(0, 6, 20, 0.6),
0 0 50px rgba(48, 118, 255, 0.12),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
color-scheme: dark;
}
.form-card h2,
.confirm-card h2 {
color: #1f2937;
color: #eef5ff;
font-size: 30px;
font-weight: 600;
letter-spacing: 1px;
text-align: center;
text-shadow: 0 0 24px rgba(80, 150, 255, 0.28);
}
.form-grid {
@@ -627,7 +791,7 @@ onMounted(() => {
display: flex;
flex-direction: column;
gap: 10px;
color: var(--ink-soft);
color: rgba(158, 190, 226, 0.72);
font-size: 18px;
letter-spacing: 0.5px;
}
@@ -637,7 +801,7 @@ onMounted(() => {
}
.form-field em {
color: var(--red);
color: #ff9d9d;
font-style: normal;
}
@@ -645,9 +809,11 @@ onMounted(() => {
.form-field textarea {
width: 100%;
padding: 14px 18px;
border: 2px solid var(--line-strong);
border-radius: 10px;
color: var(--ink);
border: 1px solid rgba(130, 175, 255, 0.18);
border-radius: 12px;
background: rgba(6, 14, 28, 0.7);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
color: #e8f2ff;
font-family: inherit;
font-size: 19px;
outline: none;
@@ -655,19 +821,26 @@ onMounted(() => {
transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
color: rgba(158, 190, 226, 0.4);
}
.form-field input {
height: 56px;
}
.form-field input:focus,
.form-field textarea:focus {
border-color: var(--blue);
box-shadow: 0 0 0 4px rgba(47, 111, 208, 0.12);
border-color: rgba(120, 200, 255, 0.55);
box-shadow:
0 0 0 4px rgba(70, 140, 255, 0.14),
0 0 24px rgba(70, 140, 255, 0.1);
}
.form-error {
margin-top: 16px;
color: var(--red);
color: #ff9d9d;
font-size: 17px;
letter-spacing: 0.5px;
text-align: center;
@@ -687,58 +860,80 @@ onMounted(() => {
font-size: 20px;
font-weight: 600;
letter-spacing: 3px;
transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
transition:
transform 0.2s ease,
box-shadow 0.2s ease,
background 0.2s ease,
border-color 0.2s ease;
}
.form-button:disabled {
cursor: default;
opacity: 0.65;
opacity: 0.5;
}
.form-button--ghost {
border: 2px solid var(--line-strong);
color: var(--ink-soft);
background: #fff;
border: 1px solid rgba(130, 175, 255, 0.28);
background: rgba(18, 40, 78, 0.5);
color: #bcd9ff;
}
.form-button--ghost:hover:not(:disabled) {
background: var(--surface-soft);
border-color: rgba(150, 205, 255, 0.5);
background: rgba(30, 66, 128, 0.6);
}
.form-button--primary {
color: #fff;
background: linear-gradient(180deg, #4b89e4 0%, #2f6fd0 100%);
box-shadow: 0 10px 22px rgba(47, 111, 208, 0.28);
background: linear-gradient(180deg, #ffd166 0%, #f0ac0b 100%);
box-shadow:
0 14px 30px rgba(240, 172, 11, 0.28),
0 0 26px rgba(255, 190, 60, 0.16),
inset 0 1px 0 rgba(255, 255, 255, 0.6);
color: #241500;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.25);
}
.form-button--primary:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 14px 28px rgba(47, 111, 208, 0.36);
box-shadow:
0 18px 38px rgba(240, 172, 11, 0.36),
0 0 34px rgba(255, 190, 60, 0.26),
inset 0 1px 0 rgba(255, 255, 255, 0.6);
transform: translateY(-2px);
}
.form-button--danger {
color: #fff;
background: linear-gradient(180deg, #ef6d66 0%, #e15b55 100%);
box-shadow: 0 10px 22px rgba(225, 91, 85, 0.26);
background: linear-gradient(180deg, #ff8b84 0%, #e15b55 100%);
box-shadow:
0 14px 30px rgba(225, 91, 85, 0.28),
0 0 26px rgba(255, 110, 100, 0.16),
inset 0 1px 0 rgba(255, 255, 255, 0.4);
color: #2a0806;
}
.form-button--danger:hover:not(:disabled) {
transform: translateY(-1px);
box-shadow: 0 14px 28px rgba(225, 91, 85, 0.34);
box-shadow:
0 18px 38px rgba(225, 91, 85, 0.36),
0 0 34px rgba(255, 110, 100, 0.26),
inset 0 1px 0 rgba(255, 255, 255, 0.45);
transform: translateY(-2px);
}
.confirm-card {
width: 600px;
padding: 38px 44px 34px;
border: 1px solid rgba(255, 255, 255, 0.65);
border-radius: 24px;
background: #fff;
box-shadow: 0 30px 80px rgba(12, 30, 55, 0.3);
border: 1px solid rgba(130, 175, 255, 0.2);
border-radius: 26px;
background: linear-gradient(158deg, rgba(22, 42, 78, 0.98) 0%, rgba(8, 16, 32, 0.99) 100%);
box-shadow:
0 40px 90px rgba(0, 6, 20, 0.6),
0 0 50px rgba(48, 118, 255, 0.12),
inset 0 1px 0 rgba(255, 255, 255, 0.08);
color-scheme: dark;
}
.confirm-card p {
margin-top: 18px;
color: var(--muted);
color: rgba(158, 190, 226, 0.7);
font-size: 19px;
letter-spacing: 0.5px;
text-align: center;
+5
View File
@@ -15,6 +15,11 @@ const proxy = {
changeOrigin: true,
ws: true,
},
'/stageHub': {
target: backend,
changeOrigin: true,
ws: true,
},
}
export default defineConfig({
@@ -0,0 +1,53 @@
namespace HardwareControl.Core.FocusSystem
{
/// <summary>
/// 单次对焦的执行结果,对应 focus_single_focus 的返回值。
/// </summary>
public enum FocusSingleOutcome
{
/// <summary>对焦动作完成(FOCUS2_OK,运行结果 sta=0x01)。</summary>
Completed = 0,
/// <summary>句柄为空(FOCUS2_ERR_NULL_PTR)。</summary>
NullHandle = -1,
/// <summary>串口未打开(FOCUS2_ERR_COM_NOT_OPEN)。</summary>
ComNotOpen = -5,
/// <summary>设备返回失败(FOCUS2_ERR_COM_SEND_FAILED):应答失败,或运行结果 sta=0x00、error=11/12/13。</summary>
DeviceFailed = -6,
/// <summary>库内等待运行结果超时(FOCUS2_ERR_TIMEOUT)。</summary>
DeviceTimeout = -8,
/// <summary>本机等待上限内未收到返回,结果未知(非动态库返回值)。</summary>
WaitTimeout = -9,
/// <summary>动态库返回了未定义的错误码。</summary>
Unknown = -99,
}
/// <summary>一次单次对焦的结果。</summary>
/// <param name="Outcome">结果类型。</param>
/// <param name="Code">动态库原始返回值;<see cref="FocusSingleOutcome.WaitTimeout"/> 时为 null。</param>
/// <param name="Elapsed">从下发命令到取得结果的耗时。</param>
public sealed record FocusSingleResult(
FocusSingleOutcome Outcome,
int? Code,
TimeSpan Elapsed)
{
public bool IsSuccess => Outcome == FocusSingleOutcome.Completed;
/// <summary>结果的中文描述,用于日志与采样点错误信息。</summary>
public string Describe() => Outcome switch
{
FocusSingleOutcome.Completed => "对焦完成",
FocusSingleOutcome.NullHandle => "对焦句柄为空",
FocusSingleOutcome.ComNotOpen => "对焦串口未打开",
FocusSingleOutcome.DeviceFailed => "设备执行失败(应答失败或运行结果 sta=0x00)",
FocusSingleOutcome.DeviceTimeout => "设备等待运行结果超时",
FocusSingleOutcome.WaitTimeout => "等待对焦结果超时",
_ => $"未定义的对焦错误码 {Code}",
};
}
}
@@ -16,28 +16,21 @@
<PackageReference Include="OpenCvSharp4.runtime.win" Version="4.10.0.20241108" />
</ItemGroup>
<!--
NIST 谱线库与光栅修正数据,扫描分析按相对路径 db 加载,必须复制到输出目录。
CfLibs 的 .cs 文件仍然参与编译,这里只复制数据文件。
-->
<ItemGroup>
<Reference Include="ArisSharp">
<HintPath>dll\aris\ArisSharp.dll</HintPath>
</Reference>
<Content Include="db\**\*" Exclude="db\**\*.cs">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</Content>
</ItemGroup>
<!--
aris.dll / libusb-1.0.dll 是 ArisSharp.dll 的原生依赖,必须和可执行文件放在同一目录。
作为项目内容复制,引用本项目的 HardwareWeb / HardwareProbe 输出目录也会带上它们。
位移台原生库,P/Invoke 按文件名加载,必须位于可执行文件同目录
-->
<ItemGroup>
<None Update="dll\aris\aris.dll">
<Link>aris.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
<None Update="dll\aris\libusb-1.0.dll">
<Link>libusb-1.0.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
<!-- 位移台原生库,P/Invoke 按文件名加载,必须位于可执行文件同目录 -->
<None Update="dll\AxisPlatform2.dll">
<Link>AxisPlatform2.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -4,8 +4,9 @@ namespace HardwareControl.Core.HardwareServiceImpl.HardwareService
{
/// <summary>
/// aris 光谱仪服务。
/// 单台使用 AcquireFrame 同步单帧;多台使用 StartMeasurement 一次性武装,
/// 收齐回调后按波长拼接。所有操作在内部串行化,单帧/多台采集互斥。
/// 单台与多台采集都使用 ZioLink 的“预配置 + 仅启动”流程:
/// 参数在启动前一次性下发,启动时每台只发一条 cmd 4,因此多台启动偏差为毫秒级。
/// 所有操作在内部串行化,单帧/多台采集互斥。
/// </summary>
public interface IArisSpectrometerService : IAsyncDisposable
{
@@ -43,10 +44,11 @@ namespace HardwareControl.Core.HardwareServiceImpl.HardwareService
CancellationToken ct = default);
/// <summary>
/// 多台光谱仪同步采集一帧:StartMeasurement 一次武装所有设备,
/// 收齐每台设备的回调后按波长自动拼接(重合区间各去一半)。
/// 多台光谱仪同步采集一帧:先下发有变化的曝光参数,再按顺序向每台设备发送启动命令,
/// 轮询到每台设备都有可用帧后读取并按波长自动拼接(重合区间各去一半)。
/// 启动偏差为 USB 往返级(约 1 ms/台),100 ms 曝光即可覆盖全部设备。
/// 由第三台设备触发激光的场景使用 Software 触发模式;
/// 有外部 AD/TTL 触发源时使用 FreeRunEdge/External。
/// 有外部 AD/TTL 触发源时使用 External。
/// 部分设备超时会返回已收到的帧,并通过 MissingSerials 标记缺失设备。
/// </summary>
Task<SynchronizedSpectrumResult> AcquireSynchronizedAsync(
@@ -6,9 +6,11 @@ namespace HardwareControl.Core.HardwareServiceImpl.HardwareService
/// 定焦系统服务,封装 FocusSystem2.dll。
///
/// 串口在连接时从系统参数 focus_com 读取,读取不到时回退到
/// appsettings.json 的 "FocusSystem:ComPort"。命令函数内部已完成
/// "组包→发送→收应答",返回即表示设备已回执;运行结果与系统信息
/// 需通过 <see cref="ReadSystemInfoAsync"/> / <see cref="ReadResultAsync"/> 查询。
/// appsettings.json 的 "FocusSystem:ComPort"。除
/// <see cref="FocusSingleAndWaitAsync"/> 外,命令函数内部只完成
/// "组包→发送",返回表示命令已写入串口,并不代表设备已执行完毕;
/// 设备应答、运行结果与系统信息需通过
/// <see cref="ReadSystemInfoAsync"/> / <see cref="ReadResultAsync"/> 查询。
/// 所有原生调用串行执行。
/// </summary>
public interface IFocusSystemService : IAsyncDisposable
@@ -25,9 +27,20 @@ namespace HardwareControl.Core.HardwareServiceImpl.HardwareService
// ---------- 对焦 ----------
/// <summary>单次对焦。</summary>
/// <summary>单次对焦(仅下发命令,不等待运行结果)。</summary>
Task StartSingleFocusAsync(CancellationToken ct = default);
/// <summary>
/// 执行一次单次对焦并等待设备返回结果。动态库内部已完成测距光源的
/// 开启与关闭,无需再调用测距相关接口。
/// 超过 <paramref name="timeout"/> 仍未返回时结果为
/// <see cref="FocusSingleOutcome.WaitTimeout"/>。原生调用不可取消,
/// 超时后仍会在后台执行直到动态库自行返回。
/// </summary>
Task<FocusSingleResult> FocusSingleAndWaitAsync(
TimeSpan timeout,
CancellationToken ct = default);
/// <summary>连续对焦。</summary>
Task StartContinuousFocusAsync(CancellationToken ct = default);
@@ -10,8 +10,10 @@ namespace HardwareControl.Core.HardwareServiceImpl.HardwareService
/// <summary>连续抓取多帧并取中值作为基准背景画面。</summary>
Task<SampleBaselineInfo> CaptureBaselineAsync(CancellationToken ct = default);
/// <summary>抓取当前最新画面作为靶样画面(需先采集基准画面)。</summary>
SampleTargetInfo CaptureTarget();
/// <summary>
/// 关闭红外测距光源后抓取当前最新画面作为靶样画面(需先采集基准画面)。
/// </summary>
Task<SampleTargetInfo> CaptureTargetAsync(CancellationToken ct = default);
/// <summary>基于基准画面和靶样画面提取轮廓并生成采样点。</summary>
SampleAnalysisResult Analyze();
File diff suppressed because it is too large Load Diff
@@ -213,6 +213,52 @@ namespace HardwareControl.Core.HardwareServiceImpl
public Task StartSingleFocusAsync(CancellationToken ct = default) =>
ExecuteAsync(FocusSystemNative.focus_single_focus, "单次对焦", ct);
public async Task<FocusSingleResult> FocusSingleAndWaitAsync(
TimeSpan timeout,
CancellationToken ct = default)
{
var limit = timeout > TimeSpan.Zero ? timeout : TimeSpan.FromSeconds(10);
var startedAt = DateTimeOffset.UtcNow;
// 动态库内部完成测距光源开关与对焦动作,并阻塞到运行结果返回;
// 这里只在外部加一个等待上限,避免界面长时间无响应。
var command = ExecuteRawAsync(
FocusSystemNative.focus_single_focus,
"单次对焦",
ct);
int code;
try
{
code = await command.WaitAsync(limit, ct).ConfigureAwait(false);
}
catch (TimeoutException)
{
_logger.LogWarning(
"单次对焦在 {Timeout}s 内未返回结果,判定为失败",
limit.TotalSeconds);
return new FocusSingleResult(
FocusSingleOutcome.WaitTimeout,
null,
DateTimeOffset.UtcNow - startedAt);
}
var outcome = code switch
{
FocusSystemNative.Ok => FocusSingleOutcome.Completed,
FocusSystemNative.ErrNullPtr => FocusSingleOutcome.NullHandle,
FocusSystemNative.ErrComNotOpen => FocusSingleOutcome.ComNotOpen,
FocusSystemNative.ErrComSendFailed => FocusSingleOutcome.DeviceFailed,
FocusSystemNative.ErrTimeout => FocusSingleOutcome.DeviceTimeout,
_ => FocusSingleOutcome.Unknown,
};
return new FocusSingleResult(
outcome,
code,
DateTimeOffset.UtcNow - startedAt);
}
public Task StartContinuousFocusAsync(CancellationToken ct = default) =>
ExecuteAsync(FocusSystemNative.focus_continuous_focus, "连续对焦", ct);
@@ -338,7 +384,53 @@ namespace HardwareControl.Core.HardwareServiceImpl
.ConfigureAwait(false);
EnsureSuccess(handle, result, operation);
_logger.LogInformation("对焦系统:{Operation}完成", operation);
_logger.LogInformation("对焦系统:{Operation}命令已下发", operation);
}
finally
{
_gate.Release();
}
}
/// <summary>
/// 执行原生命令并返回动态库原始结果码,非 0 时不抛异常,
/// 由调用方按业务语义处理。
/// </summary>
private async Task<int> ExecuteRawAsync(
Func<IntPtr, int> command,
string operation,
CancellationToken ct)
{
await _gate.WaitAsync(ct).ConfigureAwait(false);
try
{
ThrowIfDisposed();
var handle = RequireHandle();
ct.ThrowIfCancellationRequested();
var result = await Task.Run(
() => command(handle),
CancellationToken.None)
.ConfigureAwait(false);
if (result >= 0)
{
_logger.LogInformation(
"对焦系统:{Operation}命令已返回,结果码 {Code}",
operation,
result);
}
else
{
var detail = FocusSystemNative.GetError(handle);
_logger.LogWarning(
"对焦系统:{Operation}命令返回错误码 {Code}{Detail}",
operation,
result,
string.IsNullOrWhiteSpace(detail) ? string.Empty : $":{detail}");
}
return result;
}
finally
{
@@ -459,17 +551,20 @@ namespace HardwareControl.Core.HardwareServiceImpl
return MapResult(response);
}
// 非阻塞查询,未找到结果帧时继续轮询
if (result != FocusSystemNative.ErrTimeout)
// 未找到完整结果帧时继续轮询:底层在无数据时返回 ErrTimeout,
// 缓冲区只有半帧时返回 ErrParseFailed,两者都视为“结果尚未就绪”。
if (result is not (FocusSystemNative.ErrTimeout
or FocusSystemNative.ErrParseFailed))
{
throw MapNativeError(handle, result, "查询对焦系统结果");
}
if (Environment.TickCount64 >= deadline)
{
throw new HardwareException(
return MapResult(response);
/*throw new HardwareException(
HardwareErrorKind.Timeout,
$"查询对焦系统结果超时({timeoutMs}ms):未找到结果帧");
$"查询对焦系统结果超时({timeoutMs}ms):未找到结果帧");*/
}
Thread.Sleep(retryInterval);
@@ -1,3 +1,4 @@
using System.Globalization;
using HardwareControl.Core.HardwareServiceImpl.HardwareService;
using HardwareControl.Core.SampleAnalysis;
using HardwareControl.Core.SystemSetting;
@@ -13,6 +14,8 @@ namespace HardwareControl.Core.HardwareServiceImpl
public sealed class SampleAnalysisService : ISampleAnalysisService
{
private const string SamplingPointConfigName = "camera_sampling_point";
private const string SamplingRadiusConfigName = "camera_sampling_radius";
private const string CameraScaleConfigName = "camera_scale";
private const int DefaultSamplingPointCount = 5;
private const int MaxSamplingPointCount = 100;
@@ -24,6 +27,7 @@ namespace HardwareControl.Core.HardwareServiceImpl
private readonly object _gate = new();
private IReadOnlyList<CameraFrameSnapshot>? _baseline;
private CameraFrameSnapshot? _target;
private SampleAnalysisResult? _lastAnalysis;
public SampleAnalysisService(
IUsbCameraService camera,
@@ -48,6 +52,7 @@ namespace HardwareControl.Core.HardwareServiceImpl
{
_baseline = new[] { frame };
_target = null;
_lastAnalysis = null;
}
_logger.LogInformation(
@@ -57,8 +62,11 @@ namespace HardwareControl.Core.HardwareServiceImpl
new SampleBaselineInfo(frame.Width, frame.Height, frame.CapturedAt));
}
public SampleTargetInfo CaptureTarget()
public Task<SampleTargetInfo> CaptureTargetAsync(
CancellationToken ct = default)
{
ct.ThrowIfCancellationRequested();
var frame = CaptureLatestFrame();
lock (_gate)
@@ -71,12 +79,14 @@ namespace HardwareControl.Core.HardwareServiceImpl
}
_target = frame;
_lastAnalysis = null;
}
_logger.LogInformation(
"靶样画面已采集:{Width}x{Height}", frame.Width, frame.Height);
return new SampleTargetInfo(frame.Width, frame.Height, frame.CapturedAt);
return Task.FromResult(
new SampleTargetInfo(frame.Width, frame.Height, frame.CapturedAt));
}
public SampleAnalysisResult Analyze()
@@ -93,12 +103,26 @@ namespace HardwareControl.Core.HardwareServiceImpl
target = _target ?? throw new HardwareException(
HardwareErrorKind.InvalidState,
"尚未采集靶样画面,请返回样品放置界面重新检测");
// 同一组画面重复调用 Analyze 时直接返回缓存,避免重复执行 ONNX 推理。
if (_lastAnalysis is not null)
{
return _lastAnalysis;
}
}
var pointCount = GetSamplingPointCount();
_logger.LogInformation("开始靶样轮廓分析,采样点数:{PointCount}", pointCount);
var samplingRadiusPixels = GetSamplingRadiusPixels();
var result = _analyzer.Analyze(baseline, target, pointCount);
_logger.LogInformation(
"开始靶样轮廓分析,采样点数:{PointCount},采样半径:{Radius}",
pointCount,
samplingRadiusPixels is > 0
? $"{samplingRadiusPixels.Value:F1}px"
: "不限制");
var result = _analyzer.Analyze(
baseline, target, pointCount, samplingRadiusPixels);
_logger.LogInformation(
"靶样轮廓分析完成:{Width}x{Height},采样点 {PointCount} 个",
@@ -106,6 +130,15 @@ namespace HardwareControl.Core.HardwareServiceImpl
result.Height,
result.SamplingPointCount);
lock (_gate)
{
// 分析期间如果靶样画面已被重新采集,则不缓存本次结果。
if (ReferenceEquals(_target, target))
{
_lastAnalysis = result;
}
}
return result;
}
@@ -137,5 +170,61 @@ namespace HardwareControl.Core.HardwareServiceImpl
return DefaultSamplingPointCount;
}
/// <summary>
/// 读取系统参数 camera_sampling_radius(mm),按 camera_scale(px/mm)
/// 换算成像素半径;未配置或无效时返回 null,表示不限制采样区域。
/// </summary>
private double? GetSamplingRadiusPixels()
{
try
{
var values = _systemConfig
.GetAll()
.Where(c => !string.IsNullOrWhiteSpace(c.ConfigName))
.GroupBy(c => c.ConfigName.Trim(), StringComparer.OrdinalIgnoreCase)
.ToDictionary(
g => g.Key,
g => g.Last().ConfigValue?.Trim() ?? string.Empty,
StringComparer.OrdinalIgnoreCase);
var radiusMm = ReadDouble(values, SamplingRadiusConfigName);
if (radiusMm is null || radiusMm <= 0)
{
return null;
}
var scale = ReadDouble(values, CameraScaleConfigName);
if (scale is null || scale <= 0)
{
_logger.LogWarning(
"系统参数 {RadiusName} 已配置,但 {ScaleName} 无效," +
"跳过采样点半径限制",
SamplingRadiusConfigName,
CameraScaleConfigName);
return null;
}
return radiusMm.Value * scale.Value;
}
catch (Exception ex)
{
_logger.LogWarning(
ex, "读取系统参数 {ConfigName} 失败,跳过采样点半径限制",
SamplingRadiusConfigName);
return null;
}
}
private static double? ReadDouble(
IReadOnlyDictionary<string, string> values, string name) =>
values.TryGetValue(name, out var raw) &&
double.TryParse(
raw,
NumberStyles.Float,
CultureInfo.InvariantCulture,
out var value)
? value
: null;
}
}
@@ -41,7 +41,8 @@ namespace HardwareControl.Core.SampleAnalysis
public SampleAnalysisResult Analyze(
IReadOnlyList<CameraFrameSnapshot> baselineFrames,
CameraFrameSnapshot target,
int samplingPointCount)
int samplingPointCount,
double? samplingRadiusPixels = null)
{
ArgumentNullException.ThrowIfNull(target);
@@ -72,6 +73,7 @@ namespace HardwareControl.Core.SampleAnalysis
modelPath,
targetImage,
pointCount,
samplingRadiusPixels,
out var confidence,
out var failureReason);
@@ -134,6 +136,7 @@ namespace HardwareControl.Core.SampleAnalysis
fallbackMask,
targetImage,
pointCount,
samplingRadiusPixels,
out var fallbackFailure);
if (fallbackResult is not null)
@@ -196,6 +199,7 @@ namespace HardwareControl.Core.SampleAnalysis
string modelPath,
Mat targetImage,
int pointCount,
double? samplingRadiusPixels,
out float confidence,
out string failureReason)
{
@@ -267,7 +271,7 @@ namespace HardwareControl.Core.SampleAnalysis
targetImage.Size());
return BuildResultFromMask(
mask, targetImage, pointCount, out failureReason);
mask, targetImage, pointCount, samplingRadiusPixels, out failureReason);
}
/// <summary>用掩膜提取轮廓、绘制采样点并编码结果图。</summary>
@@ -275,6 +279,7 @@ namespace HardwareControl.Core.SampleAnalysis
Mat mask,
Mat targetImage,
int pointCount,
double? samplingRadiusPixels,
out string failureReason)
{
failureReason = string.Empty;
@@ -312,7 +317,10 @@ namespace HardwareControl.Core.SampleAnalysis
var points = BuildSamplingPoints(
contour,
pointCount,
CalculateSamplingMargin(contour, outputImage.Width, outputImage.Height));
CalculateSamplingMargin(contour, outputImage.Width, outputImage.Height),
samplingRadiusPixels,
outputImage.Width / 2.0,
outputImage.Height / 2.0);
DrawSamplingPoints(outputImage, points, lineThickness);
Cv2.ImEncode(
@@ -1237,10 +1245,16 @@ namespace HardwareControl.Core.SampleAnalysis
/// <summary>
/// 在轮廓内部按网格生成候选点,要求候选点到轮廓的距离不小于安全边距;
/// 配置采样半径时,候选点还须位于以画面中心为原点的半径范围内。
/// 点数不足时逐步缩小间距,再均匀抽取指定数量的采样点。
/// </summary>
private static List<Point> BuildSamplingPoints(
Point[] contour, int count, double margin)
Point[] contour,
int count,
double margin,
double? radiusPixels,
double centerX,
double centerY)
{
var area = Cv2.ContourArea(contour);
if (area <= 0 || count <= 0)
@@ -1266,6 +1280,11 @@ namespace HardwareControl.Core.SampleAnalysis
for (var x = rect.Left + spacing / 2; x <= rect.Right; x += spacing)
{
var point = new Point((int)Math.Round(x), (int)Math.Round(y));
if (!IsInsideRadius(point, centerX, centerY, radiusPixels))
{
continue;
}
var distance = Cv2.PointPolygonTest(
contour, new Point2f(point.X, point.Y), true);
if (distance >= margin)
@@ -1286,7 +1305,8 @@ namespace HardwareControl.Core.SampleAnalysis
if (candidates.Count == 0)
{
// 极窄轮廓可能无法满足安全边距,退回到离边缘最远的内部点
var fallback = FindBestInteriorPoint(contour);
var fallback = FindBestInteriorPoint(
contour, radiusPixels, centerX, centerY);
return fallback.HasValue
? new List<Point> { fallback.Value }
: new List<Point>();
@@ -1313,8 +1333,27 @@ namespace HardwareControl.Core.SampleAnalysis
return selected.Distinct().ToList();
}
/// <summary>
/// 判断点是否位于以画面中心为圆心、radiusPixels 为半径的圆内;
/// 未配置有效半径(null 或非正数)时不做限制。
/// </summary>
private static bool IsInsideRadius(
Point point, double centerX, double centerY, double? radiusPixels)
{
if (radiusPixels is not > 0)
{
return true;
}
var dx = point.X - centerX;
var dy = point.Y - centerY;
var radius = radiusPixels.Value;
return dx * dx + dy * dy <= radius * radius;
}
/// <summary>找到轮廓内部距边缘最远的点,作为极端情况下的兜底。</summary>
private static Point? FindBestInteriorPoint(Point[] contour)
private static Point? FindBestInteriorPoint(
Point[] contour, double? radiusPixels, double centerX, double centerY)
{
var rect = Cv2.BoundingRect(contour);
var step = Math.Max(2, Math.Min(rect.Width, rect.Height) / 50);
@@ -1326,6 +1365,11 @@ namespace HardwareControl.Core.SampleAnalysis
{
for (var x = rect.Left; x <= rect.Right; x += step)
{
if (!IsInsideRadius(new Point(x, y), centerX, centerY, radiusPixels))
{
continue;
}
var distance = Cv2.PointPolygonTest(
contour, new Point2f(x, y), true);
@@ -0,0 +1,117 @@
namespace HardwareControl.Core.Scanning
{
/// <summary>元素符号与中文名称的对应关系。</summary>
public static class ElementNames
{
private static readonly Dictionary<string, string> ChineseNames =
new(StringComparer.OrdinalIgnoreCase)
{
["H"] = "氢",
["He"] = "氦",
["Li"] = "锂",
["Be"] = "铍",
["B"] = "硼",
["C"] = "碳",
["N"] = "氮",
["O"] = "氧",
["F"] = "氟",
["Ne"] = "氖",
["Na"] = "钠",
["Mg"] = "镁",
["Al"] = "铝",
["Si"] = "硅",
["P"] = "磷",
["S"] = "硫",
["Cl"] = "氯",
["Ar"] = "氩",
["K"] = "钾",
["Ca"] = "钙",
["Sc"] = "钪",
["Ti"] = "钛",
["V"] = "钒",
["Cr"] = "铬",
["Mn"] = "锰",
["Fe"] = "铁",
["Co"] = "钴",
["Ni"] = "镍",
["Cu"] = "铜",
["Zn"] = "锌",
["Ga"] = "镓",
["Ge"] = "锗",
["As"] = "砷",
["Se"] = "硒",
["Br"] = "溴",
["Kr"] = "氪",
["Rb"] = "铷",
["Sr"] = "锶",
["Y"] = "钇",
["Zr"] = "锆",
["Nb"] = "铌",
["Mo"] = "钼",
["Tc"] = "锝",
["Ru"] = "钌",
["Rh"] = "铑",
["Pd"] = "钯",
["Ag"] = "银",
["Cd"] = "镉",
["In"] = "铟",
["Sn"] = "锡",
["Sb"] = "锑",
["Te"] = "碲",
["I"] = "碘",
["Xe"] = "氙",
["Cs"] = "铯",
["Ba"] = "钡",
["La"] = "镧",
["Ce"] = "铈",
["Pr"] = "镨",
["Nd"] = "钕",
["Pm"] = "钷",
["Sm"] = "钐",
["Eu"] = "铕",
["Gd"] = "钆",
["Tb"] = "铽",
["Dy"] = "镝",
["Ho"] = "钬",
["Er"] = "铒",
["Tm"] = "铥",
["Yb"] = "镱",
["Lu"] = "镥",
["Hf"] = "铪",
["Ta"] = "钽",
["W"] = "钨",
["Re"] = "铼",
["Os"] = "锇",
["Ir"] = "铱",
["Pt"] = "铂",
["Au"] = "金",
["Hg"] = "汞",
["Tl"] = "铊",
["Pb"] = "铅",
["Bi"] = "铋",
["Po"] = "钋",
["At"] = "砹",
["Rn"] = "氡",
["Fr"] = "钫",
["Ra"] = "镭",
["Ac"] = "锕",
["Th"] = "钍",
["Pa"] = "镤",
["U"] = "铀",
["Np"] = "镎",
["Pu"] = "钚",
["Am"] = "镅",
["Cm"] = "锔",
["Bk"] = "锫",
["Cf"] = "锎",
["Es"] = "锿",
["Fm"] = "镄",
["Md"] = "钔",
["No"] = "锘",
["Lr"] = "铹",
};
public static string GetChineseName(string symbol) =>
ChineseNames.TryGetValue(symbol, out var name) ? name : symbol;
}
}
@@ -0,0 +1,65 @@
namespace HardwareControl.Core.Scanning
{
/// <summary>换算后的位移台绝对目标位置(mm)。</summary>
public readonly record struct StageTarget(int X, int Y);
/// <summary>
/// 相机像素坐标 → 位移台绝对坐标。
///
/// 约定(B 模式):
/// * 图像中心对应位移台坐标 (camera_x_offset, camera_y_offset);
/// * 激光位于位移台原点 (0,0);
/// * +X 使画面中的位移台向右,+Y 使画面中的位移台向上,图像 y 轴向下;
/// * 要把某个采样点送到激光下,目标位置 = -(该点在位移台坐标系中的坐标)。
/// </summary>
public static class ScanCoordinateMapper
{
public static StageTarget ToStageAbsolute(
int pixelX,
int pixelY,
int imageWidth,
int imageHeight,
double scalePxPerMm,
double offsetX,
double offsetY)
{
if (imageWidth <= 0 || imageHeight <= 0)
{
throw new HardwareException(
HardwareErrorKind.InvalidState,
"相机画面尺寸无效,无法换算采样点坐标");
}
if (scalePxPerMm <= 0)
{
throw new HardwareException(
HardwareErrorKind.InvalidState,
"标尺比例 camera_scale 无效,无法换算采样点坐标");
}
// 图像坐标相对画面中心的偏移(毫米):x 向右为正,y 向下为正。
var dx = (pixelX - imageWidth / 2.0) / scalePxPerMm;
var dy = (pixelY - imageHeight / 2.0) / scalePxPerMm;
// 点自身在位移台坐标系中的坐标:P = (offsetX + dx, offsetY - dy)。
// 要把 P 送到激光原点,位移台绝对位置 = -P。
var targetX = -offsetX - dx;
var targetY = -offsetY + dy;
return new StageTarget(RoundMm(targetX), RoundMm(targetY));
}
private static int RoundMm(double value)
{
var rounded = (int)Math.Round(value, MidpointRounding.AwayFromZero);
if (rounded is < short.MinValue or > short.MaxValue)
{
throw new HardwareException(
HardwareErrorKind.InvalidArgument,
$"换算后的位移台坐标 {rounded}mm 超出硬件范围");
}
return rounded;
}
}
}
@@ -0,0 +1,152 @@
using LiteDB;
using Microsoft.Extensions.Logging;
namespace HardwareControl.Core.Scanning
{
/// <summary>
/// 扫描数据持久化(独立 LiteDB 文件)。
/// 扫描期间数据只保存在内存,流程正常结束后一次性写入。
/// </summary>
public sealed class ScanDataStore : IDisposable
{
private const string RunCollection = "scan_run";
private const string PointCollection = "scan_point";
private readonly LiteDatabase _database;
private readonly ILiteCollection<ScanRunRecord> _runs;
private readonly ILiteCollection<ScanPointRecord> _points;
private readonly ILogger<ScanDataStore> _logger;
private readonly object _gate = new();
public ScanDataStore(string? databasePath, ILogger<ScanDataStore> logger)
{
_logger = logger;
var path = string.IsNullOrWhiteSpace(databasePath)
? Path.Combine(AppContext.BaseDirectory, "Data", "scan-data.db")
: databasePath;
var fullPath = Path.GetFullPath(path);
var directory = Path.GetDirectoryName(fullPath);
if (!string.IsNullOrWhiteSpace(directory))
{
Directory.CreateDirectory(directory);
}
_database = new LiteDatabase(new ConnectionString
{
Filename = fullPath,
Connection = ConnectionType.Shared,
});
_runs = _database.GetCollection<ScanRunRecord>(RunCollection);
_points = _database.GetCollection<ScanPointRecord>(PointCollection);
_points.EnsureIndex(point => point.ScanId);
_logger.LogInformation("扫描数据库:{Path}", fullPath);
}
/// <summary>一次性写入一次扫描及其所有采样点。</summary>
public void SaveCompleted(
ScanRunRecord run,
IReadOnlyList<ScanPointRecord> points)
{
lock (_gate)
{
_database.BeginTrans();
try
{
_runs.Upsert(run);
for (var i = 0; i < points.Count; i++)
{
points[i].Id = 0;
}
_points.InsertBulk(points);
_database.Commit();
}
catch
{
_database.Rollback();
throw;
}
}
_logger.LogInformation(
"扫描数据已写入数据库:{ScanId},采样点 {Count} 个",
run.ScanId,
points.Count);
}
public ScanRunRecord? GetRun(string scanId)
{
lock (_gate)
{
return _runs.FindById(scanId);
}
}
public IReadOnlyList<ScanPointRecord> GetPoints(string scanId)
{
lock (_gate)
{
return _points
.Find(point => point.ScanId == scanId)
.OrderBy(point => point.Index)
.ToList();
}
}
public ScanRunRecord? GetLatestRun()
{
lock (_gate)
{
return _runs
.FindAll()
.OrderByDescending(run => run.StartedAt)
.FirstOrDefault();
}
}
/// <summary>按开始时间倒序读取最近的扫描记录,用于历史列表。</summary>
public IReadOnlyList<ScanRunRecord> GetRecentRuns(int limit)
{
var count = Math.Clamp(limit, 1, 200);
lock (_gate)
{
return _runs
.Find(Query.All("StartedAt", Query.Descending), 0, count)
.ToList();
}
}
/// <summary>删除一条扫描记录及其全部采样点;记录不存在时返回 false。</summary>
public bool DeleteRun(string scanId)
{
lock (_gate)
{
_database.BeginTrans();
try
{
_points.DeleteMany(point => point.ScanId == scanId);
var removed = _runs.Delete(scanId);
_database.Commit();
if (removed)
{
_logger.LogInformation("扫描记录已删除:{ScanId}", scanId);
}
return removed;
}
catch
{
_database.Rollback();
throw;
}
}
}
public void Dispose() => _database.Dispose();
}
}
+193
View File
@@ -0,0 +1,193 @@
using LiteDB;
namespace HardwareControl.Core.Scanning
{
/// <summary>一次扫描的整体状态。</summary>
public enum ScanStatus
{
Running = 0,
Completed = 1,
Aborted = 2,
Failed = 3,
}
/// <summary>扫描流程当前所处阶段。</summary>
public enum ScanPhase
{
Idle = 0,
Homing = 1,
Moving = 2,
Focusing = 3,
Acquiring = 4,
Returning = 5,
Analyzing = 6,
Writing = 7,
Completed = 8,
Aborted = 9,
Failed = 10,
}
/// <summary>实时进度快照,通过 SignalR 推送给前端。</summary>
public sealed record ScanProgress(
string ScanId,
ScanPhase Phase,
int PointIndex,
int TotalPoints,
int CompletedPoints,
int Percent,
string Message,
int StageX,
int StageY,
bool StageMoving,
DateTimeOffset UpdatedAt);
/// <summary>启动扫描的返回结果。</summary>
public sealed record ScanStartResult(string ScanId, int TotalPoints);
/// <summary>位移台实时位置。</summary>
public sealed record StagePosition(
int X,
int Y,
int Z,
bool Moving,
DateTimeOffset UpdatedAt);
/// <summary>扫描结束事件。</summary>
public sealed record ScanRunSummary(string ScanId, ScanStatus Status, string? Error);
/// <summary>单个采样点采集完成事件(携带拼接光谱,用于实时绘图)。</summary>
public sealed record ScanPointAcquired(
string ScanId,
int PointIndex,
int TotalPoints,
float[] Wavelengths,
float[] Spectrum,
IReadOnlyList<ScanSegmentRecord> Segments,
DateTimeOffset AcquiredAt);
/// <summary>扫描运行的持久化记录。</summary>
public sealed class ScanRunRecord
{
[BsonId]
public string ScanId { get; set; } = string.Empty;
public DateTimeOffset StartedAt { get; set; }
public DateTimeOffset? FinishedAt { get; set; }
public ScanStatus Status { get; set; }
public string? Error { get; set; }
public int TotalPoints { get; set; }
public int CompletedPoints { get; set; }
/// <summary>传给光谱仪的曝光时间(微秒)。</summary>
public int ExposureUs { get; set; }
public int Averaging { get; set; }
public int DelayUs { get; set; }
public int WaitTimeoutMs { get; set; }
public int MoveSpeed { get; set; }
public int MoveAccel { get; set; }
/// <summary>比例尺(像素/毫米)。</summary>
public double CameraScale { get; set; }
public double CameraOffsetX { get; set; }
public double CameraOffsetY { get; set; }
public int ImageWidth { get; set; }
public int ImageHeight { get; set; }
/// <summary>带采样点标注的靶面图。</summary>
public byte[]? ImageData { get; set; }
public string? ImageMimeType { get; set; }
}
/// <summary>单个采样点的持久化记录。</summary>
public sealed class ScanPointRecord
{
[BsonId]
public int Id { get; set; }
public string ScanId { get; set; } = string.Empty;
/// <summary>从 0 开始的点序号。</summary>
public int Index { get; set; }
public int PixelX { get; set; }
public int PixelY { get; set; }
public int StageX { get; set; }
public int StageY { get; set; }
public bool Succeeded { get; set; }
public string? Error { get; set; }
public float[] Wavelengths { get; set; } = Array.Empty<float>();
public float[] Spectrum { get; set; } = Array.Empty<float>();
public ScanSegmentRecord[] Segments { get; set; } = Array.Empty<ScanSegmentRecord>();
public List<ScanElementRecord> Elements { get; set; } = new();
public double Temperature { get; set; }
public double ElectronDensity { get; set; }
public DateTimeOffset AcquiredAt { get; set; }
}
/// <summary>拼接光谱的段信息。</summary>
public sealed class ScanSegmentRecord
{
public int DeviceIndex { get; set; }
public string SerialNumber { get; set; } = string.Empty;
public double WavelengthStart { get; set; }
public double WavelengthEnd { get; set; }
public int PointCount { get; set; }
}
/// <summary>单个元素的定性/定量结果。</summary>
public sealed class ScanElementRecord
{
public string Symbol { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
/// <summary>高 / 中 / 低。</summary>
public string IntensityLevel { get; set; } = string.Empty;
public double Abundance { get; set; }
public double RawAbundance { get; set; }
/// <summary>检出 / 痕量。</summary>
public string Verdict { get; set; } = string.Empty;
/// <summary>该元素匹配谱线中的最大强度。</summary>
public double MaxIntensity { get; set; }
/// <summary>最强匹配谱线在原始光谱中的峰位(nm)。</summary>
public double MatchedWavelength { get; set; }
public int MatchedLines { get; set; }
}
}
@@ -0,0 +1,174 @@
using System.Globalization;
using HardwareControl.Core.AxisPlatform;
using HardwareControl.Core.HardwareServiceImpl.HardwareService;
using HardwareControl.Core.Spectrometer;
using HardwareControl.Core.SystemSetting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
namespace HardwareControl.Core.Scanning
{
/// <summary>一次扫描使用的运行参数(从系统参数读取)。</summary>
public sealed record ScanSettings(
double CameraScale,
double CameraOffsetX,
double CameraOffsetY,
int MoveSpeed,
int MoveAccel,
int ExposureUs,
int Averaging,
int DelayUs,
int WaitTimeoutMs,
TimeSpan FocusTimeout);
/// <summary>
/// 读取扫描所需的系统参数。参数在每次扫描开始时重新读取,
/// 管理界面修改后无需重启即可生效。
/// </summary>
public sealed class ScanSettingsProvider
{
public const string CameraScaleName = "camera_scale";
public const string CameraOffsetXName = "camera_x_offset";
public const string CameraOffsetYName = "camera_y_offset";
public const string MoveSpeedName = "move_speed";
public const string MoveAccelName = "move_accel";
public const string ExposureName = "ARIS_ExposureUs";
public const string AveragingName = "ARIS_Averaging";
public const string DelayName = "ARIS_DelayUs";
public const string TimeoutName = "ARIS_TimeoutMs";
public const string FocusTimeoutName = "focus_outTime";
private readonly ISystemConfigService _systemConfig;
private readonly AxisStageOptions _axisOptions;
private readonly ArisSpectrometerOptions _spectrometerOptions;
private readonly ILogger<ScanSettingsProvider> _logger;
public ScanSettingsProvider(
ISystemConfigService systemConfig,
IOptions<AxisStageOptions> axisOptions,
IOptions<ArisSpectrometerOptions> spectrometerOptions,
ILogger<ScanSettingsProvider> logger)
{
_systemConfig = systemConfig;
_axisOptions = axisOptions.Value;
_spectrometerOptions = spectrometerOptions.Value;
_logger = logger;
}
public ScanSettings Load()
{
var values = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
foreach (var config in _systemConfig.GetAll())
{
var name = config.ConfigName?.Trim();
if (string.IsNullOrWhiteSpace(name))
{
continue;
}
values[name] = config.ConfigValue?.Trim() ?? string.Empty;
}
var cameraScale = GetDouble(values, CameraScaleName, 0);
if (cameraScale <= 0)
{
throw new HardwareException(
HardwareErrorKind.InvalidState,
"未配置有效的标尺比例 camera_scale,请先在标尺设定中完成相机标定");
}
var moveSpeed = GetInt(
values, MoveSpeedName, _axisOptions.DefaultSpeed);
var moveAccel = GetInt(
values, MoveAccelName, _axisOptions.DefaultAccel);
// ARIS_ExposureUs 在系统参数中的单位是毫秒,接口需要微秒。
var exposureMs = GetDouble(
values,
ExposureName,
_spectrometerOptions.SynchronizedExposureUs / 1000.0);
var exposureUs = (int)Math.Round(exposureMs * 1000.0, MidpointRounding.AwayFromZero);
if (exposureUs <= 0)
{
exposureUs = _spectrometerOptions.SynchronizedExposureUs;
}
var averaging = GetInt(
values, AveragingName, _spectrometerOptions.Averaging);
if (averaging < 1)
{
averaging = 1;
}
var delayUs = GetInt(
values, DelayName, _spectrometerOptions.DelayUs);
if (delayUs < 0)
{
delayUs = 0;
}
var waitTimeoutMs = GetInt(
values,
TimeoutName,
_spectrometerOptions.SynchronizedWaitTimeoutMs);
if (waitTimeoutMs <= 0)
{
waitTimeoutMs = _spectrometerOptions.SynchronizedWaitTimeoutMs;
}
var focusSeconds = GetDouble(values, FocusTimeoutName, 10);
if (focusSeconds <= 0)
{
focusSeconds = 10;
}
var settings = new ScanSettings(
cameraScale,
GetDouble(values, CameraOffsetXName, 0),
GetDouble(values, CameraOffsetYName, 0),
Math.Clamp(moveSpeed, 1, ushort.MaxValue),
Math.Clamp(moveAccel, 1, ushort.MaxValue),
exposureUs,
averaging,
delayUs,
waitTimeoutMs,
TimeSpan.FromSeconds(focusSeconds));
_logger.LogInformation(
"扫描参数:scale={Scale}px/mm,offset=({OffsetX},{OffsetY})mm," +
"speed={Speed},accel={Accel},exposure={Exposure}us," +
"averaging={Averaging},delay={Delay}us,waitTimeout={WaitTimeout}ms," +
"focusTimeout={FocusTimeout}s",
settings.CameraScale,
settings.CameraOffsetX,
settings.CameraOffsetY,
settings.MoveSpeed,
settings.MoveAccel,
settings.ExposureUs,
settings.Averaging,
settings.DelayUs,
settings.WaitTimeoutMs,
settings.FocusTimeout.TotalSeconds);
return settings;
}
private static double GetDouble(
IReadOnlyDictionary<string, string> values,
string name,
double fallback) =>
values.TryGetValue(name, out var raw) &&
double.TryParse(raw, NumberStyles.Float, CultureInfo.InvariantCulture, out var value)
? value
: fallback;
private static int GetInt(
IReadOnlyDictionary<string, string> values,
string name,
int fallback) =>
values.TryGetValue(name, out var raw) &&
int.TryParse(raw, NumberStyles.Integer, CultureInfo.InvariantCulture, out var value)
? value
: fallback;
}
}
@@ -0,0 +1,708 @@
using HardwareControl.Core.AxisPlatform;
using HardwareControl.Core.FocusSystem;
using HardwareControl.Core.HardwareServiceImpl.HardwareService;
using HardwareControl.Core.SampleAnalysis;
using HardwareControl.Core.Spectrometer;
using Microsoft.Extensions.Logging;
namespace HardwareControl.Core.Scanning
{
/// <summary>扫描流程服务:回零 → 逐点移动/对焦/收光 → 分析/写库 → 回零。</summary>
public interface IScanWorkflowService
{
bool IsRunning { get; }
ScanProgress Current { get; }
Task<ScanStartResult> StartAsync(CancellationToken ct = default);
Task AbortAsync();
event EventHandler<ScanProgress>? ProgressChanged;
event EventHandler<StagePosition>? StagePositionChanged;
event EventHandler<ScanPointAcquired>? PointAcquired;
event EventHandler<ScanRunSummary>? Finished;
}
/// <summary>
/// 一次完整测试流程的编排实现。同一时刻只允许一个扫描,
/// 中止或失败时不写库并尽量让位移台回零。
/// </summary>
public sealed class ScanWorkflowService : IScanWorkflowService
{
private static readonly TimeSpan StageTimeout = TimeSpan.FromSeconds(15);
private static readonly TimeSpan StagePollInterval = TimeSpan.FromMilliseconds(100);
private const int StageStatusTimeoutMs = 500;
private readonly ISampleAnalysisService _sampleAnalysis;
private readonly IAxisStageService _stage;
private readonly IFocusSystemService _focus;
private readonly IArisSpectrometerService _spectrometer;
private readonly ScanSettingsProvider _settingsProvider;
private readonly ScanDataStore _dataStore;
private readonly SpectrumAnalysisService _analysis;
private readonly ILogger<ScanWorkflowService> _logger;
private int _running;
private CancellationTokenSource? _cts;
private volatile ScanProgress _current = new(
string.Empty,
ScanPhase.Idle,
-1,
0,
0,
0,
"空闲",
0,
0,
false,
DateTimeOffset.Now);
private int _lastStageX;
private int _lastStageY;
private bool _lastStageMoving;
public ScanWorkflowService(
ISampleAnalysisService sampleAnalysis,
IAxisStageService stage,
IFocusSystemService focus,
IArisSpectrometerService spectrometer,
ScanSettingsProvider settingsProvider,
ScanDataStore dataStore,
SpectrumAnalysisService analysis,
ILogger<ScanWorkflowService> logger)
{
_sampleAnalysis = sampleAnalysis;
_stage = stage;
_focus = focus;
_spectrometer = spectrometer;
_settingsProvider = settingsProvider;
_dataStore = dataStore;
_analysis = analysis;
_logger = logger;
}
public bool IsRunning => Volatile.Read(ref _running) == 1;
public ScanProgress Current => _current;
public event EventHandler<ScanProgress>? ProgressChanged;
public event EventHandler<StagePosition>? StagePositionChanged;
public event EventHandler<ScanPointAcquired>? PointAcquired;
public event EventHandler<ScanRunSummary>? Finished;
public async Task<ScanStartResult> StartAsync(CancellationToken ct = default)
{
if (Interlocked.CompareExchange(ref _running, 1, 0) != 0)
{
throw new HardwareException(
HardwareErrorKind.InvalidState,
"已有扫描正在进行,请等待当前流程结束");
}
try
{
var settings = _settingsProvider.Load();
// 启动时可能连接失败,这里再尝试一次(已连接时立即返回)。
if (!_stage.IsConnected)
{
await _stage.ConnectAsync(ct);
}
if (!_focus.IsConnected)
{
await _focus.ConnectAsync(ct);
}
if (!_spectrometer.IsConnected)
{
await _spectrometer.ConnectAsync(ct);
}
var sample = _sampleAnalysis.Analyze();
if (sample.SamplingPoints.Count == 0)
{
throw new HardwareException(
HardwareErrorKind.InvalidState,
"没有可用的采样点,请重新识别靶样轮廓");
}
var targets = new List<StageTarget>(sample.SamplingPoints.Count);
foreach (var point in sample.SamplingPoints)
{
targets.Add(ScanCoordinateMapper.ToStageAbsolute(
point.X,
point.Y,
sample.Width,
sample.Height,
settings.CameraScale,
settings.CameraOffsetX,
settings.CameraOffsetY));
}
var run = new ScanRunRecord
{
ScanId = BuildScanId(),
StartedAt = DateTimeOffset.Now,
Status = ScanStatus.Running,
TotalPoints = targets.Count,
CompletedPoints = 0,
ExposureUs = settings.ExposureUs,
Averaging = settings.Averaging,
DelayUs = settings.DelayUs,
WaitTimeoutMs = settings.WaitTimeoutMs,
MoveSpeed = settings.MoveSpeed,
MoveAccel = settings.MoveAccel,
CameraScale = settings.CameraScale,
CameraOffsetX = settings.CameraOffsetX,
CameraOffsetY = settings.CameraOffsetY,
ImageWidth = sample.Width,
ImageHeight = sample.Height,
ImageData = sample.ImageData,
ImageMimeType = sample.MimeType,
};
var context = new RunContext(run, sample, targets, settings);
var cts = new CancellationTokenSource();
_cts = cts;
Publish(context, ScanPhase.Idle, -1, 0, "扫描准备中");
_ = Task.Run(
() => ExecuteAsync(context, cts.Token),
CancellationToken.None);
return new ScanStartResult(run.ScanId, targets.Count);
}
catch
{
Interlocked.Exchange(ref _running, 0);
Interlocked.Exchange(ref _cts, null)?.Dispose();
throw;
}
}
public Task AbortAsync()
{
var cts = Volatile.Read(ref _cts);
if (cts is null)
{
return Task.CompletedTask;
}
try
{
if (!cts.IsCancellationRequested)
{
_logger.LogInformation("收到扫描中止请求");
cts.Cancel();
}
}
catch (ObjectDisposedException)
{
// 扫描流程刚好结束并释放了取消源
}
return Task.CompletedTask;
}
private async Task ExecuteAsync(RunContext context, CancellationToken ct)
{
var status = ScanStatus.Failed;
string? error = null;
var points = new List<ScanPointRecord>(context.Targets.Count);
var completedCount = 0;
try
{
Publish(context, ScanPhase.Homing, -1, 0, "位移台回零");
await MoveAndWaitAsync(context, 0, 0, ct);
for (var i = 0; i < context.Targets.Count; i++)
{
ct.ThrowIfCancellationRequested();
var target = context.Targets[i];
var samplePoint = context.Sample.SamplingPoints[i];
var displayIndex = i + 1;
Publish(
context,
ScanPhase.Moving,
i,
completedCount,
$"移动到第 {displayIndex}/{context.Targets.Count} 个采样点");
await MoveAndWaitAsync(context, target.X, target.Y, ct);
ct.ThrowIfCancellationRequested();
Publish(
context,
ScanPhase.Focusing,
i,
completedCount,
$"第 {displayIndex} 个采样点对焦中");
var focusResult = await FocusAndWaitAsync(context, ct);
if (!focusResult.IsSuccess)
{
var reason = focusResult.Describe();
_logger.LogWarning(
"第 {Index}/{Total} 个采样点对焦失败({Reason}),跳过该点",
displayIndex,
context.Targets.Count,
reason);
points.Add(new ScanPointRecord
{
ScanId = context.Run.ScanId,
Index = i,
PixelX = samplePoint.X,
PixelY = samplePoint.Y,
StageX = target.X,
StageY = target.Y,
Succeeded = false,
Error = $"对焦失败:{reason},已跳过该采样点",
AcquiredAt = DateTimeOffset.Now,
});
continue;
}
ct.ThrowIfCancellationRequested();
Publish(
context,
ScanPhase.Acquiring,
i,
completedCount,
$"第 {displayIndex} 个采样点收光中");
var merged = await AcquireAsync(context.Settings, ct);
var segments = merged.Segments
.Select(segment => new ScanSegmentRecord
{
DeviceIndex = segment.DeviceIndex,
SerialNumber = segment.SerialNumber,
WavelengthStart = segment.WavelengthStart,
WavelengthEnd = segment.WavelengthEnd,
PointCount = segment.PointCount,
})
.ToArray();
var point = new ScanPointRecord
{
ScanId = context.Run.ScanId,
Index = i,
PixelX = samplePoint.X,
PixelY = samplePoint.Y,
StageX = target.X,
StageY = target.Y,
Succeeded = true,
Wavelengths = merged.Wavelengths,
Spectrum = merged.Spectrum,
Segments = segments,
AcquiredAt = DateTimeOffset.Now,
};
points.Add(point);
completedCount++;
Raise(
PointAcquired,
new ScanPointAcquired(
context.Run.ScanId,
i,
context.Targets.Count,
merged.Wavelengths,
merged.Spectrum,
segments,
point.AcquiredAt));
}
// 全部点采集完成:回零与逐点分析/写库并行。
Publish(context, ScanPhase.Returning, -1, completedCount, "位移台回零");
var homeTask = MoveAndWaitSafeAsync(context, 0, 0);
Publish(context, ScanPhase.Analyzing, -1, completedCount, "NIST 元素分析中");
AnalyzePoints(points, ct);
ct.ThrowIfCancellationRequested();
Publish(context, ScanPhase.Writing, -1, completedCount, "写入数据库");
context.Run.CompletedPoints = completedCount;
context.Run.Status = ScanStatus.Completed;
context.Run.FinishedAt = DateTimeOffset.Now;
_dataStore.SaveCompleted(context.Run, points);
await homeTask;
status = ScanStatus.Completed;
}
catch (OperationCanceledException)
{
status = ScanStatus.Aborted;
error = "扫描已中止";
_logger.LogInformation("扫描已中止:{ScanId}", context.Run.ScanId);
}
catch (Exception ex)
{
status = ScanStatus.Failed;
error = ex.Message;
_logger.LogError(ex, "扫描失败:{ScanId}", context.Run.ScanId);
}
finally
{
if (status != ScanStatus.Completed)
{
// 中止或失败:丢弃内存数据,尽量让位移台回零。
try
{
await EnsureHomedAsync(context.Settings);
}
catch (Exception ex)
{
_logger.LogWarning(ex, "扫描中止后回零失败");
}
}
context.Run.Status = status;
context.Run.Error = error;
context.Run.FinishedAt ??= DateTimeOffset.Now;
var phase = status switch
{
ScanStatus.Completed => ScanPhase.Completed,
ScanStatus.Aborted => ScanPhase.Aborted,
_ => ScanPhase.Failed,
};
Publish(context, phase, -1, points.Count, error ?? "扫描完成");
Raise(Finished, new ScanRunSummary(context.Run.ScanId, status, error));
Interlocked.Exchange(ref _running, 0);
Interlocked.Exchange(ref _cts, null)?.Dispose();
}
}
private async Task MoveAndWaitAsync(
RunContext context,
int x,
int y,
CancellationToken ct)
{
await _stage.MoveAbsoluteAsync(
new AxisStagePoint(x, y, 0),
context.Settings.MoveSpeed,
context.Settings.MoveAccel,
ct);
var deadline = DateTimeOffset.UtcNow + StageTimeout;
while (DateTimeOffset.UtcNow < deadline)
{
ct.ThrowIfCancellationRequested();
AxisStageStatus stageStatus;
try
{
stageStatus = await _stage.ReadStatusAsync(StageStatusTimeoutMs, ct);
}
catch (HardwareException ex) when (ex.Kind == HardwareErrorKind.Timeout)
{
await Task.Delay(StagePollInterval, ct);
continue;
}
UpdateStageStatus(stageStatus);
if (!stageStatus.AnyMoving &&
stageStatus.XPosition == x &&
stageStatus.YPosition == y)
{
return;
}
await Task.Delay(StagePollInterval, ct);
}
throw new HardwareException(
HardwareErrorKind.Timeout,
$"位移台移动到 ({x}, {y}) 超时({StageTimeout.TotalSeconds:0}s)");
}
private async Task MoveAndWaitSafeAsync(RunContext context, int x, int y)
{
try
{
using var cts = new CancellationTokenSource(StageTimeout + TimeSpan.FromSeconds(5));
await MoveAndWaitAsync(context, x, y, cts.Token);
}
catch (Exception ex)
{
_logger.LogWarning(ex, "位移台回零失败");
}
}
/// <summary>
/// 执行一次单次对焦。动态库内部已完成测距光源开关与对焦动作,
/// 这里只需等待返回值:设备侧失败或等待超时返回非成功结果,由调用方跳过该点;
/// 句柄为空、串口未打开属于连接级故障,直接抛出异常中止扫描。
/// </summary>
private async Task<FocusSingleResult> FocusAndWaitAsync(
RunContext context,
CancellationToken ct)
{
var result = await _focus.FocusSingleAndWaitAsync(
context.Settings.FocusTimeout,
ct);
if (result.IsSuccess)
{
_logger.LogInformation(
"对焦完成,耗时 {Elapsed}ms",
(long)result.Elapsed.TotalMilliseconds);
return result;
}
if (result.Outcome is FocusSingleOutcome.NullHandle
or FocusSingleOutcome.ComNotOpen)
{
throw new HardwareException(
HardwareErrorKind.NotConnected,
$"对焦失败:{result.Describe()}");
}
return result;
}
private async Task<MergedSpectrum> AcquireAsync(
ScanSettings settings,
CancellationToken ct)
{
var result = await _spectrometer.AcquireSynchronizedAsync(
new SynchronizedSpectrumRequest
{
ExposureUs = settings.ExposureUs,
Averaging = settings.Averaging,
DelayUs = settings.DelayUs,
WaitTimeoutMs = settings.WaitTimeoutMs,
},
ct);
if (!result.IsComplete)
{
var missing = result.MissingSerials.Count == 0
? "未知设备"
: string.Join("、", result.MissingSerials);
throw new HardwareException(
HardwareErrorKind.CommunicationFailed,
$"光谱采集不完整,缺失设备:{missing}");
}
return result.Merged;
}
private void AnalyzePoints(
IReadOnlyList<ScanPointRecord> points,
CancellationToken ct)
{
foreach (var point in points)
{
ct.ThrowIfCancellationRequested();
// 跳过因测距无效而采集失败的点。
if (!point.Succeeded)
{
continue;
}
var result = _analysis.Analyze(
point.Wavelengths,
point.Spectrum,
point.Segments);
point.Elements = result.Elements.ToList();
point.Temperature = result.Temperature;
point.ElectronDensity = result.ElectronDensity;
// 单点分析失败只记录错误,继续处理后续点。
if (!string.IsNullOrWhiteSpace(result.Error))
{
point.Error = result.Error;
}
}
}
private async Task EnsureHomedAsync(ScanSettings settings)
{
if (!_stage.IsConnected)
{
return;
}
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(40));
// 先等待当前运动结束,再下发回零,避免与正在执行的移动命令冲突。
var deadline = DateTimeOffset.UtcNow + StageTimeout;
while (DateTimeOffset.UtcNow < deadline)
{
try
{
var status = await _stage.ReadStatusAsync(StageStatusTimeoutMs, cts.Token);
UpdateStageStatus(status);
if (!status.AnyMoving)
{
break;
}
}
catch (HardwareException ex) when (ex.Kind == HardwareErrorKind.Timeout)
{
// 忽略超时,继续尝试
}
catch (OperationCanceledException)
{
break;
}
try
{
await Task.Delay(StagePollInterval, cts.Token);
}
catch (OperationCanceledException)
{
break;
}
}
await _stage.MoveAbsoluteAsync(
AxisStagePoint.Zero,
settings.MoveSpeed,
settings.MoveAccel,
cts.Token);
var homeDeadline = DateTimeOffset.UtcNow + StageTimeout;
while (DateTimeOffset.UtcNow < homeDeadline)
{
AxisStageStatus status;
try
{
status = await _stage.ReadStatusAsync(StageStatusTimeoutMs, cts.Token);
}
catch (HardwareException ex) when (ex.Kind == HardwareErrorKind.Timeout)
{
continue;
}
UpdateStageStatus(status);
if (!status.AnyMoving &&
status.XPosition == 0 &&
status.YPosition == 0)
{
return;
}
try
{
await Task.Delay(StagePollInterval, cts.Token);
}
catch (OperationCanceledException)
{
return;
}
}
}
private void UpdateStageStatus(AxisStageStatus status)
{
_lastStageX = status.XPosition;
_lastStageY = status.YPosition;
_lastStageMoving = status.AnyMoving;
Raise(
StagePositionChanged,
new StagePosition(
status.XPosition,
status.YPosition,
status.ZPosition,
status.AnyMoving,
DateTimeOffset.Now));
}
private void Publish(
RunContext context,
ScanPhase phase,
int pointIndex,
int completedPoints,
string message)
{
var percent = phase switch
{
ScanPhase.Idle => 0,
ScanPhase.Homing => 2,
ScanPhase.Moving or ScanPhase.Focusing or ScanPhase.Acquiring =>
context.Targets.Count == 0
? 0
: (int)Math.Round(
Math.Max(pointIndex, 0) * 90.0 / context.Targets.Count),
ScanPhase.Returning => 90,
ScanPhase.Analyzing => 94,
ScanPhase.Writing => 98,
ScanPhase.Completed => 100,
_ => 0,
};
var progress = new ScanProgress(
context.Run.ScanId,
phase,
pointIndex,
context.Targets.Count,
completedPoints,
percent,
message,
_lastStageX,
_lastStageY,
_lastStageMoving,
DateTimeOffset.Now);
_current = progress;
Raise(ProgressChanged, progress);
}
private void Raise<T>(EventHandler<T>? handler, T payload)
{
if (handler is null)
{
return;
}
try
{
handler(this, payload);
}
catch (Exception ex)
{
_logger.LogWarning(ex, "扫描事件回调失败");
}
}
private static string BuildScanId() =>
$"{DateTimeOffset.Now:yyyyMMddHHmmss}-{Guid.NewGuid():N}"[..21];
private sealed record RunContext(
ScanRunRecord Run,
SampleAnalysisResult Sample,
IReadOnlyList<StageTarget> Targets,
ScanSettings Settings);
}
}
@@ -0,0 +1,257 @@
using CfLibs;
using HardwareControl.Core.Spectrometer;
using Microsoft.Extensions.Logging;
namespace HardwareControl.Core.Scanning
{
/// <summary>单个采样点的 NIST 定性/定量分析结果。</summary>
public sealed record PointAnalysisResult(
IReadOnlyList<ScanElementRecord> Elements,
double Temperature,
double ElectronDensity,
string? Error);
/// <summary>
/// NIST 谱线库分析封装:每个采样点独立执行 Identify(定性)+ Quantify(定量)。
/// 拼接光谱的段边界处不参与寻峰,避免接缝被识别成伪峰。
/// </summary>
public sealed class SpectrumAnalysisService
{
private readonly CfLibsIdentifier _identifier;
private readonly ILogger<SpectrumAnalysisService> _logger;
private readonly object _gate = new();
private readonly bool _dataReady;
public SpectrumAnalysisService(
string? dataPath,
ILogger<SpectrumAnalysisService> logger)
{
_logger = logger;
var path = string.IsNullOrWhiteSpace(dataPath)
? Path.Combine(AppContext.BaseDirectory, "db")
: dataPath;
_identifier = new CfLibsIdentifier();
_identifier.SetDataPath(path);
// 光栅修正使用 600c(gratingNo = 1)
_identifier.SetGratingNo(1);
_identifier.SetMatchTolerance(0.5);
_identifier.EnableGratingFix(true);
_identifier.Log = message => _logger.LogDebug("CfLibs: {Message}", message);
_dataReady =
File.Exists(Path.Combine(path, "element_lines.txt")) &&
File.Exists(Path.Combine(path, "nist_full_lines.txt"));
if (_dataReady)
{
_logger.LogInformation("NIST 谱线库目录:{Path}", path);
}
else
{
_logger.LogError(
"NIST 谱线库不完整,扫描结果将无法分析。请确认 {Path} 下存在 element_lines.txt 与 nist_full_lines.txt",
path);
}
}
public PointAnalysisResult Analyze(
float[] wavelengths,
float[] spectrum,
IReadOnlyList<ScanSegmentRecord> segments)
{
if (!_dataReady)
{
return new PointAnalysisResult(
Array.Empty<ScanElementRecord>(),
0,
0,
"NIST 谱线库文件缺失,无法分析元素");
}
if (wavelengths.Length == 0 || wavelengths.Length != spectrum.Length)
{
return new PointAnalysisResult(
Array.Empty<ScanElementRecord>(),
0,
0,
"光谱数据为空或波长/强度长度不一致");
}
var raw = new RawSpectrum();
raw.Points.Capacity = wavelengths.Length;
for (var i = 0; i < wavelengths.Length; i++)
{
raw.Points.Add(new SpectrumPoint
{
Wavelength = wavelengths[i],
Intensity = spectrum[i],
});
}
var boundaries = BuildBoundaries(segments, wavelengths.Length);
lock (_gate)
{
try
{
var identify = _identifier.Identify(raw, boundaries, out var lines);
if (identify != 0 || lines is null)
{
return new PointAnalysisResult(
Array.Empty<ScanElementRecord>(),
0,
0,
"NIST 定性分析失败");
}
if (lines.Lines.Count == 0)
{
// 没有匹配到有效谱线不算异常,结果页显示“未检出元素”。
return new PointAnalysisResult(
Array.Empty<ScanElementRecord>(),
0,
0,
null);
}
var quantified = _identifier.Quantify(lines, out var result) == 0
? result
: null;
return BuildResult(lines, quantified);
}
catch (Exception ex)
{
_logger.LogWarning(ex, "NIST 分析失败");
return new PointAnalysisResult(
Array.Empty<ScanElementRecord>(),
0,
0,
$"NIST 分析失败:{ex.Message}");
}
}
}
private static PointAnalysisResult BuildResult(
SpectralLines lines,
Result? quantified)
{
var groups = lines.Lines
.GroupBy(line => line.Element, StringComparer.OrdinalIgnoreCase)
.ToDictionary(
group => group.Key,
group => group.ToList(),
StringComparer.OrdinalIgnoreCase);
var abundances = new Dictionary<string, ElementResult>(StringComparer.OrdinalIgnoreCase);
if (quantified?.Elements is not null)
{
foreach (var element in quantified.Elements)
{
if (!string.IsNullOrWhiteSpace(element.Element))
{
abundances[element.Element] = element;
}
}
}
var globalMaxIntensity = groups.Values
.SelectMany(list => list)
.Select(line => line.Intensity)
.DefaultIfEmpty(0)
.Max();
var elements = new List<ScanElementRecord>(groups.Count + abundances.Count);
foreach (var (symbol, matched) in groups)
{
var strongest = matched
.OrderByDescending(line => line.Intensity)
.First();
abundances.TryGetValue(symbol, out var quantifiedElement);
var abundance = quantifiedElement?.Abundance ?? 0;
var ratio = globalMaxIntensity <= 0
? 0
: strongest.Intensity / globalMaxIntensity;
elements.Add(new ScanElementRecord
{
Symbol = symbol,
Name = ElementNames.GetChineseName(symbol),
IntensityLevel = ratio >= 0.6 ? "高" : ratio >= 0.2 ? "中" : "低",
Abundance = abundance,
RawAbundance = quantifiedElement?.RawAbundance ?? 0,
// 含量 ≥ 0.5% 记为检出,其余记为痕量(与界面示例一致)。
Verdict = abundance >= 0.5 ? "检出" : "痕量",
MaxIntensity = strongest.Intensity,
MatchedWavelength = strongest.WavelengthSource,
MatchedLines = matched.Count,
});
}
// 定量结果中存在、但没有进入匹配谱线列表的元素(正常不会出现)也一并返回。
foreach (var (symbol, element) in abundances)
{
if (groups.ContainsKey(symbol))
{
continue;
}
elements.Add(new ScanElementRecord
{
Symbol = symbol,
Name = ElementNames.GetChineseName(symbol),
IntensityLevel = "低",
Abundance = element.Abundance,
RawAbundance = element.RawAbundance,
Verdict = element.Abundance >= 0.5 ? "检出" : "痕量",
MaxIntensity = 0,
MatchedWavelength = 0,
MatchedLines = 0,
});
}
elements.Sort((left, right) =>
{
var byAbundance = right.Abundance.CompareTo(left.Abundance);
return byAbundance != 0
? byAbundance
: right.MaxIntensity.CompareTo(left.MaxIntensity);
});
return new PointAnalysisResult(
elements,
quantified?.Temperature ?? 0,
quantified?.ElectronDensity ?? 0,
null);
}
/// <summary>把拼接光谱的段长度换算成寻峰时要跳过的边界索引。</summary>
private static int[] BuildBoundaries(
IReadOnlyList<ScanSegmentRecord> segments,
int pointCount)
{
if (segments.Count <= 1)
{
return Array.Empty<int>();
}
var boundaries = new List<int>(segments.Count - 1);
var offset = 0;
for (var i = 0; i < segments.Count - 1; i++)
{
offset += segments[i].PointCount;
if (offset > 0 && offset < pointCount)
{
boundaries.Add(offset);
}
}
return boundaries.Distinct().ToArray();
}
}
}
@@ -1,5 +1,3 @@
using Aris;
namespace HardwareControl.Core.Spectrometer
{
/// <summary>
@@ -30,41 +28,34 @@ namespace HardwareControl.Core.Spectrometer
public int DelayUs { get; set; }
/// <summary>
/// 单帧采集默认超时,单位毫秒;小于等于 0 时由 SDK 按
/// 单帧采集默认超时,单位毫秒;小于等于 0 时按
/// <c>max(3000, 曝光/1000 + 2000)</c> 计算。
/// </summary>
public int TimeoutMs { get; set; }
/// <summary>
/// 多台同步采集的默认曝光时间,单位微秒。
/// SDK 逐台武装设备,第三台通常比前两台晚约 0.6 秒启动;
/// 曝光窗口必须覆盖这段武装时间,否则前两台会在第三台触发激光前结束。
/// 默认 1 秒,可按现场时序下调,但建议不低于 0.7 秒。
/// 参数在连接时预配置,采集时三台设备只发启动命令(间隔约 1 ms),
/// 因此 100 ms 曝光即可覆盖全部设备,不再需要覆盖“逐台武装”的长曝光窗口。
/// </summary>
public int SynchronizedExposureUs { get; set; } = 1_000_000;
public int SynchronizedExposureUs { get; set; } = 100_000;
/// <summary>
/// 多台同步采集时,StartMeasurement 返回后等待所有设备回调的默认最长时间(毫秒)。
/// 多台同步采集时,启动后等待所有设备出帧的默认最长时间(毫秒)。
/// </summary>
public int SynchronizedWaitTimeoutMs { get; set; } = 8000;
/// <summary>
/// 连接成功后设置的触发模式;为 null 时保持设备当前配置。
/// 手册要求触发模式只在连接后设置一次。
/// 默认 <see cref="Aris.TriggerMode.Software"/>:纯自由运行。
/// 默认 <see cref="SpectrometerTriggerMode.Software"/>:自由运行。
/// 由第三台设备触发激光、其余设备自由收光的场景使用 Software;
/// 有外部 AD/TTL 触发源时改为 FreeRunEdge 或 External。
/// 有外部 AD/TTL 触发源时改为 External;FreeRunEdge 对应自由运行的开始触发脉冲。
/// </summary>
public TriggerMode? TriggerMode { get; set; } = Aris.TriggerMode.Software;
public SpectrometerTriggerMode? TriggerMode { get; set; } = SpectrometerTriggerMode.Software;
/// <summary>
/// 连接成功后设置的增益(0=低增益,1=高增益);为 null 时保持设备当前配置。
/// </summary>
public int? Gain { get; set; }
/// <summary>
/// 是否打开 aris.dll 内部的诊断日志(默认关闭,避免刷屏)。
/// </summary>
public bool SdkLogEnabled { get; set; }
}
}
@@ -0,0 +1,18 @@
namespace HardwareControl.Core.Spectrometer
{
/// <summary>
/// Aris 光谱仪的触发模式。
/// 名称与 aris C API 保持一致,appsettings.json 仍可直接写 "Software" / "External" / "FreeRunEdge"。
/// </summary>
public enum SpectrometerTriggerMode
{
/// <summary>自由运行,内部定时启动曝光(对应设备 FreeRunningTriggerEnd)。</summary>
Software = 0,
/// <summary>硬件触发:等待 Trigger In 上升沿(对应设备 HardwareTrigger)。</summary>
External = 1,
/// <summary>自由运行,开始时输出触发脉冲(对应设备 FreeRunningTriggerStart)。</summary>
FreeRunEdge = 2,
}
}
@@ -9,8 +9,8 @@ namespace HardwareControl.Core.Spectrometer
/// <param name="Errors">测量过程中 SDK 上报的设备错误。</param>
/// <param name="ExpectedDeviceCount">本次期望采集的设备数。</param>
/// <param name="AcquiredAt">采集完成的主机本地时间。</param>
/// <param name="StartElapsed">StartMeasurement 武装设备所耗时间。</param>
/// <param name="WaitElapsed">等待设备回调所耗时间。</param>
/// <param name="StartElapsed">预配置参数并向所有设备发送启动命令所耗时间。</param>
/// <param name="WaitElapsed">等待所有设备出帧所耗时间。</param>
public sealed record SynchronizedSpectrumResult(
IReadOnlyList<SynchronizedSpectrumFrame> Frames,
MergedSpectrum Merged,
@@ -0,0 +1,465 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
namespace HardwareControl.Core.Spectrometer.ZioLink
{
/// <summary>
/// Aris 光谱仪的 WinUSB 连接(与官方 Inspective 使用同一驱动与接口 GUID)。
/// 只负责 USB 管道读写,协议层见 <see cref="ZioLinkDevice"/>。
/// </summary>
internal sealed class WinUsbConnection : IDisposable
{
// GUID_DEVINTERFACE_USB_DEVICE,官方软件用它枚举全部 USB 设备后再按 VID/PID 过滤
private static readonly Guid UsbDeviceInterfaceGuid =
new Guid("a5dcbf10-6530-11d2-901f-00c04fb951ed");
private const uint GENERIC_READ = 0x80000000;
private const uint GENERIC_WRITE = 0x40000000;
private const uint FILE_SHARE_READ = 1;
private const uint FILE_SHARE_WRITE = 2;
private const uint OPEN_EXISTING = 3;
private const uint FILE_ATTRIBUTE_NORMAL = 0x80;
private const uint FILE_FLAG_OVERLAPPED = 0x40000000;
private const int DIGCF_PRESENT = 0x02;
private const int DIGCF_DEVICEINTERFACE = 0x10;
private const uint POLICY_SHORT_PACKET_TERMINATE = 1;
private const uint POLICY_PIPE_TRANSFER_TIMEOUT = 3;
private readonly string _devicePath;
private SafeFileHandle? _deviceHandle;
private IntPtr _winUsbHandle;
private byte _inPipe;
private byte _outPipe;
public string DevicePath => _devicePath;
public string Manufacturer { get; private set; } = string.Empty;
public string Product { get; private set; } = string.Empty;
public string SerialNumber { get; private set; } = string.Empty;
public bool IsOpen => _winUsbHandle != IntPtr.Zero;
private WinUsbConnection(string devicePath)
{
_devicePath = devicePath;
}
/// <summary>枚举所有 Avenir 光谱仪的 WinUSB 接口路径。</summary>
public static string[] FindDevicePaths()
{
var results = new List<string>();
var guid = UsbDeviceInterfaceGuid;
var deviceInfoSet = SetupDiGetClassDevs(
ref guid, IntPtr.Zero, IntPtr.Zero, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE);
if (deviceInfoSet == IntPtr.Zero || deviceInfoSet == new IntPtr(-1))
{
return Array.Empty<string>();
}
try
{
var interfaceData = new SpDeviceInterfaceData
{
cbSize = Marshal.SizeOf<SpDeviceInterfaceData>(),
};
for (uint index = 0;
SetupDiEnumDeviceInterfaces(
deviceInfoSet, IntPtr.Zero, ref guid, index, ref interfaceData);
index++)
{
SetupDiGetDeviceInterfaceDetail(
deviceInfoSet, ref interfaceData, IntPtr.Zero, 0, out var requiredSize, IntPtr.Zero);
if (requiredSize <= 0)
{
continue;
}
var detail = Marshal.AllocHGlobal(requiredSize);
try
{
// x64: 8;x86: 4 + sizeof(WCHAR)
Marshal.WriteInt32(detail, IntPtr.Size == 8 ? 8 : 6);
if (!SetupDiGetDeviceInterfaceDetail(
deviceInfoSet, ref interfaceData, detail, requiredSize, out _, IntPtr.Zero))
{
continue;
}
var path = Marshal.PtrToStringUni(IntPtr.Add(detail, 4));
if (string.IsNullOrWhiteSpace(path))
{
continue;
}
// 官方软件同样按 vid_354f&pid_01 过滤,并排除 DFU 接口 pid_0103
if (path.Contains("vid_354f&pid_01", StringComparison.OrdinalIgnoreCase)
&& !path.Contains("pid_0103", StringComparison.OrdinalIgnoreCase))
{
results.Add(path);
}
}
finally
{
Marshal.FreeHGlobal(detail);
}
}
}
finally
{
SetupDiDestroyDeviceInfoList(deviceInfoSet);
}
results.Sort(StringComparer.OrdinalIgnoreCase);
return results.ToArray();
}
public static WinUsbConnection Open(
string devicePath,
uint readTimeoutMs = 2000,
uint writeTimeoutMs = 500)
{
var connection = new WinUsbConnection(devicePath);
try
{
connection.OpenCore(readTimeoutMs, writeTimeoutMs);
return connection;
}
catch
{
connection.Dispose();
throw;
}
}
private void OpenCore(uint readTimeoutMs, uint writeTimeoutMs)
{
_deviceHandle = CreateFile(
_devicePath,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
IntPtr.Zero,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED,
IntPtr.Zero);
if (_deviceHandle.IsInvalid)
{
var error = Marshal.GetLastWin32Error();
throw new ZioLinkException(
0,
$"无法打开光谱仪 {_devicePath}(Win32 错误 {error})。"
+ "设备可能正被 Inspective 或其他程序占用。");
}
if (!WinUsb_Initialize(_deviceHandle, out _winUsbHandle) || _winUsbHandle == IntPtr.Zero)
{
var error = Marshal.GetLastWin32Error();
throw new ZioLinkException(0, $"初始化 WinUSB 失败(Win32 错误 {error})");
}
UsbInterfaceDescriptor interfaceDescriptor = default;
if (!WinUsb_QueryInterfaceSettings(_winUsbHandle, 0, ref interfaceDescriptor))
{
throw new ZioLinkException(0, "读取 WinUSB 接口描述符失败");
}
for (var i = 0; i < interfaceDescriptor.bNumEndpoints; i++)
{
var pipe = default(WinUsbPipeInformation);
if (!WinUsb_QueryPipe(_winUsbHandle, 0, (byte)i, ref pipe))
{
throw new ZioLinkException(0, "查询 WinUSB 管道失败");
}
if ((pipe.PipeId & 0x80) != 0)
{
_inPipe = pipe.PipeId;
SetTimeout(pipe.PipeId, readTimeoutMs);
}
else
{
_outPipe = pipe.PipeId;
SetTimeout(pipe.PipeId, writeTimeoutMs);
var enable = 1u;
WinUsb_SetPipePolicy(
_winUsbHandle, pipe.PipeId, POLICY_SHORT_PACKET_TERMINATE, sizeof(uint), ref enable);
}
}
if (_inPipe == 0 || _outPipe == 0)
{
throw new ZioLinkException(0, "未找到光谱仪的 USB 批量端点");
}
// 用设备描述符里的 iManufacturer / iProduct / iSerialNumber 读取字符串
var languageId = ReadLanguageId();
var deviceDescriptor = ReadDeviceDescriptor();
Manufacturer = ReadStringDescriptor(deviceDescriptor.iManufacturer, languageId);
Product = ReadStringDescriptor(deviceDescriptor.iProduct, languageId);
SerialNumber = ReadStringDescriptor(deviceDescriptor.iSerialNumber, languageId);
if (string.IsNullOrWhiteSpace(SerialNumber))
{
SerialNumber = Path.GetFileNameWithoutExtension(_devicePath);
}
}
private void SetTimeout(byte pipeId, uint timeoutMs)
{
var value = timeoutMs;
WinUsb_SetPipePolicy(
_winUsbHandle, pipeId, POLICY_PIPE_TRANSFER_TIMEOUT, sizeof(uint), ref value);
}
public void Write(byte[] buffer, int count)
{
ThrowIfClosed();
if (!WinUsb_WritePipe(
_winUsbHandle, _outPipe, buffer, (uint)count, out _, IntPtr.Zero))
{
var error = Marshal.GetLastWin32Error();
throw new ZioLinkException(0, $"USB 写入失败(Win32 错误 {error})");
}
}
public int Read(byte[] buffer, int count)
{
ThrowIfClosed();
if (!WinUsb_ReadPipe(
_winUsbHandle, _inPipe, buffer, (uint)count, out var transferred, IntPtr.Zero))
{
var error = Marshal.GetLastWin32Error();
if (error == 121)
{
throw new ZioLinkException(0, "USB 读取超时,设备未响应");
}
throw new ZioLinkException(0, $"USB 读取失败(Win32 错误 {error})");
}
return (int)transferred;
}
private void ThrowIfClosed()
{
if (!IsOpen)
{
throw new ZioLinkException(0, "USB 连接已关闭");
}
}
private UsbDeviceDescriptor ReadDeviceDescriptor()
{
var buffer = new byte[Marshal.SizeOf<UsbDeviceDescriptor>()];
if (!WinUsb_GetDescriptor(
_winUsbHandle, 1, 0, 0, buffer, (uint)buffer.Length, out _))
{
throw new ZioLinkException(0, "读取 USB 设备描述符失败");
}
return MemoryMarshal.Read<UsbDeviceDescriptor>(buffer);
}
private ushort ReadLanguageId()
{
var buffer = new byte[256];
if (!WinUsb_GetDescriptor(
_winUsbHandle, 3, 0, 0, buffer, (uint)buffer.Length, out _))
{
return 0x0409;
}
var length = buffer[0] - 2;
if (length >= 2)
{
return BitConverter.ToUInt16(buffer, 2);
}
return 0x0409;
}
private string ReadStringDescriptor(byte index, ushort languageId)
{
if (index == 0)
{
return string.Empty;
}
var buffer = new byte[256];
if (!WinUsb_GetDescriptor(
_winUsbHandle, 3, index, languageId, buffer, (uint)buffer.Length, out _))
{
return string.Empty;
}
var length = buffer[0] - 2;
if (length <= 0)
{
return string.Empty;
}
return System.Text.Encoding.Unicode.GetString(buffer, 2, length).Trim();
}
public void Dispose()
{
if (_winUsbHandle != IntPtr.Zero)
{
WinUsb_Free(_winUsbHandle);
_winUsbHandle = IntPtr.Zero;
}
_deviceHandle?.Dispose();
_deviceHandle = null;
}
// ---------------- P/Invoke ----------------
[StructLayout(LayoutKind.Sequential)]
private struct SpDeviceInterfaceData
{
public int cbSize;
public Guid InterfaceClassGuid;
public int Flags;
public IntPtr Reserved;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
private struct UsbDeviceDescriptor
{
public byte bLength;
public byte bDescriptorType;
public ushort bcdUSB;
public byte bDeviceClass;
public byte bDeviceSubClass;
public byte bDeviceProtocol;
public byte bMaxPacketSize0;
public ushort idVendor;
public ushort idProduct;
public ushort bcdDevice;
public byte iManufacturer;
public byte iProduct;
public byte iSerialNumber;
public byte bNumConfigurations;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
private struct UsbInterfaceDescriptor
{
public byte bLength;
public byte bDescriptorType;
public byte bInterfaceNumber;
public byte bAlternateSetting;
public byte bNumEndpoints;
public byte bInterfaceClass;
public byte bInterfaceSubClass;
public byte bInterfaceProtocol;
public byte iInterface;
}
[StructLayout(LayoutKind.Sequential)]
private struct WinUsbPipeInformation
{
public int PipeType;
public byte PipeId;
public ushort MaximumPacketSize;
public byte Interval;
}
[DllImport("setupapi.dll", CharSet = CharSet.Unicode, SetLastError = true)]
private static extern IntPtr SetupDiGetClassDevs(
ref Guid classGuid, IntPtr enumerator, IntPtr hwndParent, int flags);
[DllImport("setupapi.dll", SetLastError = true)]
private static extern bool SetupDiEnumDeviceInterfaces(
IntPtr deviceInfoSet,
IntPtr deviceInfoData,
ref Guid interfaceClassGuid,
uint memberIndex,
ref SpDeviceInterfaceData deviceInterfaceData);
[DllImport("setupapi.dll", CharSet = CharSet.Unicode, SetLastError = true)]
private static extern bool SetupDiGetDeviceInterfaceDetail(
IntPtr deviceInfoSet,
ref SpDeviceInterfaceData deviceInterfaceData,
IntPtr deviceInterfaceDetailData,
int deviceInterfaceDetailDataSize,
out int requiredSize,
IntPtr deviceInfoData);
[DllImport("setupapi.dll", SetLastError = true)]
private static extern bool SetupDiDestroyDeviceInfoList(IntPtr deviceInfoSet);
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
private static extern SafeFileHandle CreateFile(
string fileName,
uint desiredAccess,
uint shareMode,
IntPtr securityAttributes,
uint creationDisposition,
uint flagsAndAttributes,
IntPtr templateFile);
[DllImport("winusb.dll", SetLastError = true)]
private static extern bool WinUsb_Initialize(SafeFileHandle deviceHandle, out IntPtr interfaceHandle);
[DllImport("winusb.dll", SetLastError = true)]
private static extern bool WinUsb_Free(IntPtr interfaceHandle);
[DllImport("winusb.dll", SetLastError = true)]
private static extern bool WinUsb_QueryInterfaceSettings(
IntPtr interfaceHandle, byte alternateInterfaceNumber, ref UsbInterfaceDescriptor descriptor);
[DllImport("winusb.dll", SetLastError = true)]
private static extern bool WinUsb_QueryPipe(
IntPtr interfaceHandle,
byte alternateInterfaceNumber,
byte pipeIndex,
ref WinUsbPipeInformation pipeInformation);
[DllImport("winusb.dll", SetLastError = true)]
private static extern bool WinUsb_SetPipePolicy(
IntPtr interfaceHandle, byte pipeId, uint policyType, uint valueLength, ref uint value);
[DllImport("winusb.dll", SetLastError = true)]
private static extern bool WinUsb_WritePipe(
IntPtr interfaceHandle,
byte pipeId,
byte[] buffer,
uint bufferLength,
out uint lengthTransferred,
IntPtr overlapped);
[DllImport("winusb.dll", SetLastError = true)]
private static extern bool WinUsb_ReadPipe(
IntPtr interfaceHandle,
byte pipeId,
byte[] buffer,
uint bufferLength,
out uint lengthTransferred,
IntPtr overlapped);
[DllImport("winusb.dll", SetLastError = true)]
private static extern bool WinUsb_GetDescriptor(
IntPtr interfaceHandle,
byte descriptorType,
byte index,
ushort languageId,
byte[] buffer,
uint bufferLength,
out uint lengthTransferred);
}
}
@@ -0,0 +1,542 @@
using System;
using System.Text;
namespace HardwareControl.Core.Spectrometer.ZioLink
{
/// <summary>
/// Aris 光谱仪的 ZioLink 协议实现(与官方 Inspective 的 DeviceClasses.ZioLinkSpectrometer 一致)。
///
/// 与 aris.dll 的高层 StartMeasurement 不同,这里把“配置”和“启动”彻底分开:
/// * <see cref="ApplyParameters"/> 只在参数变化时下发一次(cmd 0x1100/0x1101/0x1105);
/// * <see cref="StartExposure"/> 只发 cmd 4(8 字节 USB 往返),设备收到后立即开始积分,
/// 主机不需要等待曝光结束;
/// * 多台设备依次调用 StartExposure 的间隔就是 USB 往返时间(约 1 ms/台),
/// 因此 100 ms 曝光可以覆盖全部设备。
/// </summary>
internal sealed class ZioLinkDevice : IDisposable
{
private const int MaxReplyLength = 16492;
private const int SpectrumHeaderOffset = 4;
private const int SpectrumValuesOffset = 68;
private const int CmdReset = 0;
private const int CmdStandBy = 1;
private const int CmdStartExposure = 4;
private const int CmdCancelExposure = 5;
private const int CmdGetExposureTime = 4096;
private const int CmdSetExposureTime = 4352;
private const int CmdGetAveraging = 4097;
private const int CmdSetAveraging = 4353;
private const int CmdGetSensorGain = 4109;
private const int CmdSetSensorGain = 4365;
private const int CmdGetMaxSensorGain = 4877;
private const int CmdGetMinExposureTime = 4608;
private const int CmdGetMaxExposureTime = 4864;
private const int CmdGetMaxAveraging = 4865;
private const int CmdGetTriggerInConfiguration = 4100;
private const int CmdSetTriggerInConfiguration = 4356;
private const int CmdGetTriggerInDelay = 4101;
private const int CmdSetTriggerInDelay = 4357;
private const int CmdGetStartPixel = 8201;
private const int CmdGetEndPixel = 8202;
private const int CmdGetSerialNumber = 8193;
private const int CmdGetManufacturer = 8194;
private const int CmdGetModelName = 8195;
private const int CmdGetSoftwareVersion = 8197;
private const int CmdGetPixelCount = 8199;
private const int CmdGetStatus = 12288;
private const int CmdGetSpectrum = 16384;
private const int CmdSetDateTime = 16645;
private const int CmdGetWavelengthCoefficient0 = 8220;
private static readonly Version MinFirmwareNewTriggering = new Version(4, 1, 7, 0);
private static readonly Version MinFirmwareDateTime = new Version(4, 0, 7, 1);
private static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1);
private readonly WinUsbConnection _connection;
private readonly byte[] _reply = new byte[MaxReplyLength];
private bool _disposed;
public ZioLinkDevice(WinUsbConnection connection)
{
_connection = connection;
}
public string DevicePath => _connection.DevicePath;
public string SerialNumber { get; private set; } = string.Empty;
public string Manufacturer { get; private set; } = string.Empty;
public string ModelName { get; private set; } = string.Empty;
public Version FirmwareVersion { get; private set; } = new Version(0, 0);
public int PixelCount { get; private set; }
public float[] Wavelengths { get; private set; } = Array.Empty<float>();
public int StartPixel { get; private set; }
public int EndPixel { get; private set; }
public int MinExposureUs { get; private set; }
public int MaxExposureUs { get; private set; }
public int MaxAveraging { get; private set; }
public int MaxSensorGain { get; private set; }
public int SensorGain { get; private set; }
public int TriggerConfiguration { get; private set; }
/// <summary>最近一次成功下发的曝光时间(微秒)。</summary>
public int ExposureTimeUs { get; private set; }
/// <summary>最近一次成功下发的平均次数。</summary>
public int Averaging { get; private set; } = 1;
/// <summary>最近一次成功下发的触发延迟(微秒)。</summary>
public int DelayUs { get; private set; }
public void Open()
{
ThrowIfDisposed();
// 官方 Open 流程:先复位,再读取全部静态参数
WriteCommand(CmdReset);
FirmwareVersion = ReadVersion(CmdGetSoftwareVersion);
SerialNumber = ReadStringOrFallback(CmdGetSerialNumber, _connection.SerialNumber);
Manufacturer = ReadStringOrFallback(CmdGetManufacturer, _connection.Manufacturer);
ModelName = ReadStringOrFallback(CmdGetModelName, _connection.Product);
PixelCount = ReadInt(CmdGetPixelCount);
if (PixelCount <= 0)
{
throw new ZioLinkException(0, $"设备返回的像素数无效({PixelCount})");
}
var coefficients = new float[4];
for (var i = 0; i < coefficients.Length; i++)
{
coefficients[i] = ReadFloat(CmdGetWavelengthCoefficient0 + i);
}
Wavelengths = BuildWavelengths(coefficients, PixelCount);
MinExposureUs = ReadInt(CmdGetMinExposureTime);
MaxExposureUs = ReadInt(CmdGetMaxExposureTime);
MaxAveraging = ReadInt(CmdGetMaxAveraging);
ExposureTimeUs = ReadInt(CmdGetExposureTime);
Averaging = ReadInt(CmdGetAveraging);
MaxSensorGain = TryReadInt(CmdGetMaxSensorGain, 0);
SensorGain = TryReadInt(CmdGetSensorGain, 0);
TriggerConfiguration = ReadInt(CmdGetTriggerInConfiguration);
DelayUs = TryReadInt(CmdGetTriggerInDelay, 0);
StartPixel = TryReadInt(CmdGetStartPixel, 0);
EndPixel = TryReadInt(CmdGetEndPixel, 0);
}
/// <summary>
/// 把设备 RTC 同步到主机时间。三台设备应在同一时刻集中调用,
/// 否则帧头时间戳会出现固定偏移,影响启动偏差的诊断。
/// </summary>
public bool SynchronizeTime()
{
ThrowIfDisposed();
if (FirmwareVersion < MinFirmwareDateTime)
{
return true;
}
for (var attempt = 0; attempt < 3; attempt++)
{
try
{
UpdateDeviceTime();
return true;
}
catch (ZioLinkException)
{
Thread.Sleep(20);
}
}
return false;
}
/// <summary>
/// 预配置:只有参数变化时才发命令。官方软件在用户修改曝光/平均时才调用同样的命令,
/// 启动阶段不会重复下发。
/// </summary>
public void ApplyParameters(int exposureUs, int averaging, int delayUs)
{
ThrowIfDisposed();
if (delayUs != DelayUs)
{
WriteInt(CmdSetTriggerInDelay, delayUs);
DelayUs = delayUs;
}
if (averaging != Averaging)
{
WriteInt(CmdSetAveraging, averaging);
Averaging = averaging;
}
if (exposureUs != ExposureTimeUs)
{
WriteInt(CmdSetExposureTime, exposureUs);
ExposureTimeUs = exposureUs;
}
}
public void SetTriggerMode(SpectrometerTriggerMode mode)
{
ThrowIfDisposed();
int modeValue;
if (FirmwareVersion >= MinFirmwareNewTriggering)
{
modeValue = mode switch
{
SpectrometerTriggerMode.Software => 0,
SpectrometerTriggerMode.FreeRunEdge => 1,
SpectrometerTriggerMode.External => 2,
_ => throw new ZioLinkException(0, $"不支持的触发模式:{mode}"),
};
}
else
{
// 旧固件只区分“自由运行”和“硬件触发”
modeValue = mode == SpectrometerTriggerMode.External ? 6 : 0;
}
var value = (TriggerConfiguration & ~0xFF) | modeValue;
WriteInt(CmdSetTriggerInConfiguration, value);
TriggerConfiguration = value;
}
public void SetGain(int gain)
{
ThrowIfDisposed();
WriteInt(CmdSetSensorGain, gain);
SensorGain = gain;
}
/// <summary>只发启动命令;设备收到后立即在固件内开始积分。</summary>
public void StartExposure(int numSpectra)
{
ThrowIfDisposed();
WriteInt(CmdStartExposure, numSpectra);
}
public void CancelExposure()
{
ThrowIfDisposed();
WriteCommand(CmdCancelExposure);
}
public ZioLinkDeviceStatus GetStatus(out int availableSpectra)
{
ThrowIfDisposed();
var value = ReadInt(CmdGetStatus);
availableSpectra = (value >> 8) & 0xFFFF;
var state = value & 0xFF;
return state switch
{
0 => ZioLinkDeviceStatus.Idle,
1 => ZioLinkDeviceStatus.WaitingForTrigger,
2 => ZioLinkDeviceStatus.TakingSpectrum,
3 => ZioLinkDeviceStatus.WaitingForTemperature,
8 => ZioLinkDeviceStatus.PoweredOff,
9 => ZioLinkDeviceStatus.SleepMode,
10 => ZioLinkDeviceStatus.NotConnected,
_ => ZioLinkDeviceStatus.Unknown,
};
}
/// <summary>丢弃设备里残留的旧帧(例如上一次采集超时后留下的数据)。</summary>
public int DrainPendingSpectra(int maxFrames = 8)
{
var drained = 0;
while (drained < maxFrames)
{
GetStatus(out var available);
if (available <= 0)
{
break;
}
ReadSpectrum();
drained++;
}
return drained;
}
public ZioLinkSpectrum ReadSpectrum()
{
ThrowIfDisposed();
var length = ReadBulk(CmdGetSpectrum);
if (length < SpectrumValuesOffset)
{
throw new ZioLinkException(0, $"收到的光谱只有 {length} 字节");
}
var header = SpectrumHeaderOffset;
var pixelCount = BitConverter.ToUInt16(_reply, header + 24);
if (pixelCount != PixelCount)
{
throw new ZioLinkException(0, $"收到的光谱像素数 {pixelCount} 与设备像素数 {PixelCount} 不一致");
}
var dataFormat = _reply[header + 26];
if (dataFormat != 0)
{
throw new ZioLinkException(0, $"不支持的光谱数据格式 {dataFormat}");
}
var expected = SpectrumValuesOffset + pixelCount * sizeof(float);
if (length != expected)
{
throw new ZioLinkException(0, $"光谱长度 {length} 与期望值 {expected} 不一致");
}
var values = new float[pixelCount];
Buffer.BlockCopy(_reply, SpectrumValuesOffset, values, 0, pixelCount * sizeof(float));
var exposureSettings = BitConverter.ToUInt16(_reply, header + 28);
var appliedProcessing = BitConverter.ToUInt16(_reply, header + 30);
return new ZioLinkSpectrum(
BitConverter.ToUInt32(_reply, header + 0),
BitConverter.ToUInt32(_reply, header + 4),
BitConverter.ToUInt32(_reply, header + 8),
BitConverter.ToUInt32(_reply, header + 12),
BitConverter.ToSingle(_reply, header + 16),
BitConverter.ToSingle(_reply, header + 20),
pixelCount,
dataFormat,
exposureSettings,
appliedProcessing,
BitConverter.ToSingle(_reply, header + 56),
BitConverter.ToSingle(_reply, header + 60),
values);
}
private void UpdateDeviceTime()
{
if (FirmwareVersion < MinFirmwareDateTime)
{
return;
}
var now = DateTime.Now;
var time = (int)(now.TimeOfDay.TotalMilliseconds * 10.0);
var days = (int)(now.Date - UnixEpoch).TotalDays;
WriteTwoInts(CmdSetDateTime, time, days);
}
private static float[] BuildWavelengths(float[] coefficients, int pixelCount)
{
var wavelengths = new float[pixelCount];
for (var i = 0; i < pixelCount; i++)
{
wavelengths[i] = coefficients[0]
+ (coefficients[1] + (coefficients[2] + coefficients[3] * i) * i) * i;
}
return wavelengths;
}
private void WriteCommand(int cmd)
{
var message = new byte[4];
CopyInt(message, cmd, 0);
SendReceive(message);
}
private void WriteInt(int cmd, int value)
{
var message = new byte[8];
CopyInt(message, cmd, 0);
CopyInt(message, value, 4);
SendReceive(message);
}
private void WriteTwoInts(int cmd, int value1, int value2)
{
var message = new byte[12];
CopyInt(message, cmd, 0);
CopyInt(message, value1, 4);
CopyInt(message, value2, 8);
SendReceive(message);
}
private int ReadInt(int cmd)
{
WriteCommand(cmd);
return BitConverter.ToInt32(_reply, 4);
}
private int TryReadInt(int cmd, int fallback)
{
try
{
return ReadInt(cmd);
}
catch (ZioLinkException)
{
return fallback;
}
}
private float ReadFloat(int cmd)
{
WriteCommand(cmd);
return BitConverter.ToSingle(_reply, 4);
}
private Version ReadVersion(int cmd)
{
WriteCommand(cmd);
return new Version(_reply[7], _reply[6], _reply[5], _reply[4]);
}
private string ReadStringOrFallback(int cmd, string fallback)
{
try
{
WriteCommand(cmd);
var end = Array.IndexOf(_reply, (byte)0, 4);
if (end < 0)
{
end = _reply.Length;
}
var value = Encoding.ASCII.GetString(_reply, 4, end - 4).Trim();
return string.IsNullOrWhiteSpace(value) ? fallback : value;
}
catch (ZioLinkException)
{
return fallback;
}
}
private int ReadBulk(int cmd)
{
WriteCommand(cmd);
return _replyLength;
}
private int _replyLength;
private int SendReceive(byte[] message)
{
_connection.Write(message, message.Length);
var length = _connection.Read(_reply, _reply.Length);
if (length < 4)
{
throw new ZioLinkException(0, $"设备回复长度不足({length} 字节)");
}
var status = BitConverter.ToInt32(_reply, 0);
var errorCode = status >> 8;
if (errorCode != 0)
{
throw new ZioLinkException(
errorCode,
BuildErrorMessage(errorCode, BitConverter.ToInt32(message, 0), status));
}
_replyLength = length;
return length;
}
private static string BuildErrorMessage(int errorCode, int command, int status)
{
var description = errorCode switch
{
1 => "设备不支持该命令",
2 => "设备参数无效",
4 => "设备当前状态不允许该操作(可能仍在测量中)",
5 => "设备不支持该操作",
6 => "操作密码错误",
7 => "通信错误",
8 => "设备内部错误",
10 => "无法读取设备存储(校验和错误或内容为空)",
11 => "光谱处理错误",
_ => "设备返回错误",
};
return $"{description}(cmd=0x{command:X4}, err=0x{status:X4})";
}
private static void CopyInt(byte[] buffer, int value, int offset)
{
buffer[offset] = (byte)value;
buffer[offset + 1] = (byte)(value >> 8);
buffer[offset + 2] = (byte)(value >> 16);
buffer[offset + 3] = (byte)(value >> 24);
}
private void ThrowIfDisposed()
{
ObjectDisposedException.ThrowIf(_disposed, this);
}
public void Dispose()
{
if (_disposed)
{
return;
}
_disposed = true;
_connection.Dispose();
}
}
internal enum ZioLinkDeviceStatus
{
Idle = 0,
WaitingForTrigger = 1,
TakingSpectrum = 2,
WaitingForTemperature = 3,
PoweredOff = 8,
SleepMode = 9,
NotConnected = 10,
Unknown = 255,
}
internal sealed record ZioLinkSpectrum(
uint ExposureTimeUs,
uint Averaging,
uint DeviceTime10Us,
uint DeviceDateDays,
float LoadLevel,
float SensorTemperature,
int PixelCount,
int DataFormat,
ushort ExposureSettings,
ushort AppliedProcessing,
float DarkAvg,
float ReadoutNoise,
float[] Values)
{
public int ErrorFlags => ExposureSettings >> 12;
public int IntensityUnit => AppliedProcessing & 0x0F;
public bool DarkSubtracted => (AppliedProcessing & 0x10) != 0;
}
}
@@ -0,0 +1,17 @@
using System;
namespace HardwareControl.Core.Spectrometer.ZioLink
{
/// <summary>ZioLink 协议或 USB 通信错误。</summary>
internal sealed class ZioLinkException : Exception
{
public ZioLinkException(int code, string message, Exception? innerException = null)
: base(message, innerException)
{
Code = code;
}
/// <summary>设备返回的错误码(报文头 status &gt;&gt; 8);0 表示 USB 层错误。</summary>
public int Code { get; }
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+57
View File
@@ -0,0 +1,57 @@
0.5 0
0.5 3.663988119
2.5 3.749567088
1.5 3.778128932
1.5 4.304015502
0.5 5.2762897
0.5 5.9881151
1.5 6.01333406
1.5 6.0434819
2.5 6.0459926
0.5 6.4331637
0.5 6.7002346
1.5 6.7101621
1.5 6.7203302
2.5 6.7205298
3.5 6.7205318
2.5 6.7216252
0.5 6.8911962
2.5 6.9708242
0.5 7.0200939
1.5 7.0250186
2.5 7.0288222
3.5 7.0288374
1.5 7.0298832
2.5 7.0305818
3.5 7.0313379
0.5 7.1198022
0.5 7.191728
1.5 7.194443
2.5 7.1962892
3.5 7.1962986
1.5 7.1972793
2.5 7.1977027
3.5 7.1978667
4.5 7.197867
4.5 7.1981679
0.5 7.2503542
1.5 7.2536441
3.5 7.289016
0.5 7.294517
1.5 7.296449
2.5 7.2970292
3.5 7.2970596
1.5 7.2980152
2.5 7.2982806
3.5 7.2982856
4.5 7.302923
0.5 7.331928
2.5 7.354916
1.5 7.363294
2.5 7.3634943
0.5 7.386304
1.5 7.408198
2.5 7.408243
1.5 7.43999
0.5 7.505687
1.5 7.593071
+99
View File
@@ -0,0 +1,99 @@
0 0
3 4.85621524
2 5.05178164
1 5.42340787
2 5.70935599
2 9.94061406
3 10.18799624
1 10.36824232
4 10.37371429
2 10.56354739
0 10.68000934
3 10.71975443
2 10.77275122
3 11.05129722
1 11.14562609
1 11.20009655
2 11.26865618
4 11.6461984
3 12.1457448
2 12.3495738
2 13.05085795
1 13.50664359
0 13.5301092
2 13.7341658
4 14.0848697
3 14.94426237
2 14.99107868
1 15.51369748
2 15.54822362
1 15.56929756
5 15.7048537
4 15.70624561
2 15.7170388
1 15.71751374
3 15.77216844
3 15.80688104
2 15.8108967
4 15.8214593
4 15.8717297
0 15.93632526
3 16.2078418
1 16.21250802
3 16.27323608
5 16.3003164
1 16.30480373
4 16.3060395
2 16.313471
2 16.33991707
3 16.3680947
2 16.38520771
3 16.39050597
4 16.4191861
4 16.4512994
1 16.4702717
2 16.4800215
3 16.492635
2 16.507485
3 16.6564258
0 16.6704131
1 16.7129662
2 16.7893601
4 16.8751236
0 16.8829047
2 16.9261856
1 16.965071
3 17.007721
1 17.0137822
3 17.0397954
2 17.0438913
3 17.188662
2 17.262321
3 17.432014
2 17.477363
1 17.480329
3 17.500631
3 17.595877
1 17.648662
2 17.821972
3 17.913043
2 17.93111
1 17.9794494
2 17.982062
6 18.0001752
5 18.0002804
2 18.0022265
1 18.0078178
2 18.0160852
5 18.025998
3 18.0283314
4 18.0306639
4 18.0394354
3 18.0469607
2 18.116974
1 18.483919
2 18.496233
3 19.228579
2 19.237564
1 19.799682
2 19.80528
+114
View File
@@ -0,0 +1,114 @@
0.5 0
1.5 0.0138938
0.5 3.1427212
0.5 3.598072
1.5 3.603844
2.5 3.613244
1.5 4.0214836
2.5 4.0216501
0.5 4.0852554
1.5 4.0872183
0.5 4.6728909
1.5 4.826632
2.5 4.8271968
0.5 4.9930889
1.5 4.993821
2.5 5.1229514
3.5 5.1229524
0.5 5.225241
1.5 5.2363166
2.5 5.2368176
0.5 5.3728582
1.5 5.3732134
2.5 5.4343639
3.5 5.4343644
3.5 5.4398995
4.5 5.4398995
1.5 5.4759354
2.5 5.476239
0.5 5.4891689
0.5 5.5693287
1.5 5.5695297
2.5 5.6034263
3.5 5.6034263
4.5 5.6067784
3.5 5.6067784
1.5 5.6219599
2.5 5.6221371
0.5 5.6359799
2.5 5.7052288
3.5 5.7052288
4.5 5.7073982
3.5 5.7073982
5.5 5.707872
4.5 5.707872
1.5 5.7148562
2.5 5.7149663
0.5 5.7260732
3.5 5.7712092
2.5 5.7712092
1.5 5.776835
2.5 5.776913
0.5 5.785342
2.5 5.816394
3.5 5.816394
1.5 5.819938
2.5 5.82001
0.5 5.826403
3.5 5.848678
2.5 5.848678
2.5 5.851109
1.5 5.851109
0.5 5.856022
2.5 5.87433
1.5 5.87433
0.5 5.878087
1.5 5.89187
2.5 5.89187
0.5 5.894968
2.5 5.90569
1.5 5.90569
0.5 5.908167
2.5 5.91669
1.5 5.91669
0.5 5.918684
1.5 5.92558
2.5 5.92558
1.5 5.93276
2.5 5.93276
2.5 5.93886
1.5 5.93886
2.5 5.94389
1.5 5.94389
2.5 5.94815
1.5 5.94815
1.5 5.95182
2.5 5.95182
1.5 5.9551
2.5 5.9551
1.5 5.9576
2.5 5.9576
2.5 5.9599
1.5 5.9599
2.5 5.962
1.5 5.962
2.5 5.9639
1.5 5.9639
2.5 5.9655
1.5 5.9655
2.5 5.967
1.5 5.967
1.5 5.9682
2.5 5.9682
1.5 5.9695
2.5 5.9695
1.5 5.9705
2.5 5.9705
2.5 5.9715
1.5 5.9715
2.5 5.9723
1.5 5.9723
2.5 5.9732
1.5 5.9732
2.5 5.9738
1.5 5.9738
+217
View File
@@ -0,0 +1,217 @@
0 0
0 4.636145
1 4.643693
2 4.659052
1 7.420705
2 10.598337
1 11.316596
0 11.665048
1 11.672797
2 11.687827
0 11.821968
3 11.846618
2 11.846753
1 11.846869
0 13.071346
1 13.07308
2 13.076729
1 13.25646
2 13.649399
0 13.841265
1 14.8896242
0 15.047556
3 15.062034
2 15.062086
1 15.0621275
2 15.301941
3 15.302185
4 15.302546
3 15.30839
2 15.4725
0 15.585203
1 15.5859081
2 15.5875044
1 15.6057688
1 16.3926348
0 16.4624522
2 16.467928
3 16.467939
1 16.467947
2 16.544167
3 16.544833
4 16.5457
3 16.574428
2 16.6035134
3 16.63666
4 16.63666
5 16.63666
4 16.63666
1 16.727874
0 16.7393898
1 16.7398133
2 16.74061
1 17.171798
2 17.17446
3 17.17663
4 17.17947
0 17.209081
1 17.21085
2 17.21085
3 17.210881
3 17.2642221
2 17.269653
3 17.30709
5 17.30709
4 17.30709
4 17.30709
1 17.347742
0 17.36895
1 17.36918
2 17.36965
2 17.492297
3 17.495418
4 17.499508
1 17.628438
0 17.65077
1 17.651077
2 17.651096
3 17.651132
3 17.680649
2 17.681296
3 17.71134
4 17.71134
5 17.71134
4 17.71134
1 17.72493
0 17.75025
1 17.750416
2 17.750823
2 17.762699
3 17.763571
4 17.764921
1 17.919107
1 17.93332
2 17.933345
3 17.933378
0 17.933588
2 17.950709
3 17.950984
1 17.970406
3 17.97363
5 17.97363
4 17.97363
4 17.97363
5 17.97674
5 17.97674
4 17.97674
6 17.97674
2 17.993766
3 17.994066
4 17.994485
0 17.99579
1 17.996438
2 17.997483
0 18.073939
1 18.081198
2 18.096924
1 18.115596
2 18.12506
1 18.12506
3 18.12511
0 18.12551
2 18.13591
3 18.136247
1 18.138878
3 18.15338
5 18.15338
4 18.15338
4 18.15338
5 18.15563
5 18.15563
4 18.15563
6 18.15563
2 18.163673
3 18.163808
4 18.163991
0 18.175445
1 18.175705
2 18.176344
1 18.254621
1 18.259254
2 18.261217
3 18.261273
1 18.26138
0 18.261754
2 18.268438
3 18.268659
4 18.28189
3 18.28189
5 18.28189
4 18.28189
5 18.28358
5 18.28358
4 18.28358
6 18.28358
2 18.288011
3 18.288075
4 18.28818
2 18.29689
1 18.350218
1 18.35662
3 18.36122
0 18.36189
2 18.366415
3 18.36651
4 18.37695
4 18.37695
3 18.37695
5 18.37695
2 18.380951
3 18.38097
4 18.381039
1 18.422123
1 18.43362
0 18.43767
3 18.440871
4 18.4492
3 18.4492
5 18.4492
4 18.4492
2 18.45203
4 18.45203
3 18.45203
1 18.480338
0 18.49624
3 18.49864
4 18.50532
4 18.50532
3 18.50532
5 18.50532
3 18.50749
2 18.50749
4 18.50749
1 18.527848
0 18.54272
3 18.54444
3 18.55163
2 18.55163
4 18.55163
1 18.56678
0 18.58015
3 18.58134
4 18.58725
1 18.59886
3 18.61147
2 18.61644
4 18.61644
3 18.61644
3 18.63649
4 18.64064
2 18.64064
3 18.64064
3 18.65743
1 18.658729
2 18.661751
3 18.665098
3 18.67506
3 18.69017
+426
View File
@@ -0,0 +1,426 @@
0 0
2 11.54835433
1 11.62359262
0 11.72316029
1 11.82807106
1 12.90701519
3 13.0757156
2 13.09487245
1 13.15314376
2 13.17177759
0 13.27303799
1 13.28263891
2 13.30222736
1 13.32785693
0 13.4798867
0 13.8450383
1 13.8636685
2 13.9034545
4 13.9792372
3 14.012738
2 14.0630271
2 14.0682976
1 14.0899684
3 14.0990558
1 14.1525149
2 14.2136714
2 14.2340225
3 14.236106
0 14.2410276
1 14.2550855
1 14.3036683
1 14.46399565
3 14.49905352
2 14.50606752
1 14.52491318
2 14.52891337
0 14.57594866
1 14.68065021
1 14.68711812
2 14.68829018
0 14.6936396
1 14.71089798
0 14.73811524
2 14.74254073
4 14.7570515
3 14.780512
2 14.809271
3 14.824298
2 14.83881088
1 14.84836887
1 14.85923
1 14.9014415
2 14.901491
5 14.903785
4 14.9037901
3 14.9065891
2 14.9066279
3 14.9090844
4 14.9090891
2 14.95260461
2 14.95485191
3 14.97152223
1 15.00356575
1 15.0106101
0 15.0140654
1 15.02208821
3 15.0225908
2 15.0258687
1 15.0339718
2 15.0356401
0 15.06039
3 15.0830791
4 15.0830843
3 15.0832026
2 15.0832455
0 15.10054359
1 15.11774626
4 15.13054424
2 15.13684834
3 15.14592818
2 15.1610485
3 15.1669462
2 15.18063346
1 15.18550787
1 15.1898238
1 15.2006145
1 15.2016574
2 15.2048087
1 15.2111333
2 15.2111761
5 15.21232
4 15.2123275
3 15.2138407
2 15.2138685
2 15.214033
3 15.214033
5 15.214453
6 15.214453
3 15.2150708
4 15.2150745
3 15.215275
4 15.215275
5 15.215711
4 15.215711
0 15.2240874
1 15.2713716
3 15.2755697
2 15.277418
1 15.281661
2 15.2824812
2 15.29629312
0 15.2977957
1 15.30807757
2 15.312729
0 15.3131552
3 15.31916789
4 15.3310399
3 15.34600286
2 15.3502991
1 15.351173
2 15.3525602
3 15.3532631
0 15.3582945
1 15.3594355
2 15.3620413
1 15.3660894
1 15.37367
1 15.3791362
2 15.379156
5 15.3798184
4 15.3798219
3 15.3804102
2 15.3804418
2 15.380867
3 15.380867
5 15.381105
6 15.381105
3 15.3812603
4 15.3812614
4 15.381548
3 15.381548
5 15.3818
4 15.3818
3 15.3908613
4 15.3908649
3 15.3910528
2 15.3910804
4 15.392422
5 15.392422
4 15.392452
3 15.392452
1 15.412684
3 15.417313
2 15.418289
1 15.420697
2 15.421298
0 15.428512
0 15.4393423
1 15.4428361
2 15.4489133
4 15.449653
1 15.453818
3 15.4545664
1 15.454748
2 15.455677
2 15.4598315
3 15.4626992
0 15.4670044
2 15.469705
1 15.471072
1 15.471767
1 15.480312
2 15.480336
5 15.4807415
4 15.4807431
3 15.481284
2 15.481298
5 15.481568
6 15.481568
4 15.481715
3 15.481715
3 15.481736
4 15.481743
6 15.481779
7 15.481779
1 15.502923
3 15.504736
2 15.505434
2 15.5062612
1 15.50703
2 15.507341
2 15.5120815
0 15.513213
1 15.5148656
3 15.5166145
0 15.518227
4 15.5252749
3 15.531428
2 15.5331
1 15.533516
2 15.534133
3 15.534435
2 15.538932
1 15.539168
0 15.539521
1 15.54182
1 15.54592
2 15.545925
4 15.5461
5 15.546201
3 15.546505
2 15.546515
4 15.546836
3 15.546837
3 15.5578645
4 15.557869
3 15.557927
2 15.5579539
4 15.558869
5 15.558869
3 15.55888
4 15.55888
1 15.560694
3 15.56247
2 15.56289
1 15.56393
2 15.564211
0 15.56768
0 15.571806
1 15.574036
4 15.576338
2 15.57711
3 15.578861
2 15.581278
3 15.582381
2 15.585975
1 15.586724
1 15.587059
1 15.58939
1 15.590858
2 15.590858
5 15.591055
4 15.591055
2 15.59134
3 15.59134
3 15.591527
4 15.591527
1 15.5944
1 15.595192
2 15.596214
0 15.601121
1 15.6027
2 15.60298
1 15.60382
2 15.603879
0 15.60822
0 15.609082
1 15.609434
2 15.61041
4 15.612396
3 15.613644
2 15.615273
3 15.616707
1 15.61945
2 15.61945
1 15.620065
2 15.62305
1 15.62305
3 15.62329
2 15.62329
2 15.628592
2 15.629998
1 15.63101
2 15.63185
2 15.63256
3 15.63311
1 15.634328
0 15.634608
0 15.636217
4 15.638791
3 15.641168
2 15.641867
1 15.64208
2 15.642146
3 15.642246
2 15.644102
1 15.64447
0 15.64715
1 15.64731
2 15.64823
1 15.64823
3 15.64823
2 15.64823
1 15.648234
2 15.65341
2 15.65392
0 15.6555
0 15.656894
1 15.658293
3 15.658563
4 15.658564
3 15.65858
2 15.6586
4 15.658675
5 15.659364
6 15.659364
4 15.659394
5 15.659394
2 15.659522
3 15.659853
2 15.660823
3 15.661188
2 15.662767
1 15.66317
1 15.66344
1 15.66482
2 15.66482
2 15.6649
3 15.6649
2 15.66995
2 15.67036
1 15.673207
4 15.674054
2 15.674169
3 15.674827
2 15.675582
3 15.675992
1 15.67754
1 15.67754
2 15.67889
1 15.67889
3 15.67895
2 15.67895
2 15.68311
2 15.68358
0 15.684998
1 15.685197
2 15.68582
4 15.686152
3 15.686933
0 15.687
3 15.68773
1 15.68884
1 15.68891
2 15.69003
2 15.69008
2 15.69329
1 15.69495
1 15.69792
1 15.69812
2 15.69905
2 15.69905
2 15.70166
1 15.70278
1 15.70533
1 15.70562
2 15.70638
2 15.70638
1 15.70897
1 15.7113
1 15.71184
2 15.71255
2 15.71255
1 15.71347
1 15.71605
1 15.71682
1 15.71727
1 15.71754
1 15.72035
1 15.72148
1 15.72159
1 15.72415
1 15.72526
1 15.72526
1 15.72747
1 15.72845
1 15.73035
1 15.73121
1 15.73285
1 15.73364
1 15.73507
1 15.73576
1 15.73703
1 15.73765
1 15.73876
1 15.73931
1 15.74028
1 15.7408
1 15.74165
1 15.74212
1 15.74289
1 15.74333
1 15.74401
1 15.74438
1 15.74503
1 15.74535
1 15.74596
1 15.74624
1 15.7468
1 15.74703
1 15.74757
1 15.74778
1 15.74844
1 15.74906
1 15.74963
1 15.75015
1 15.75062
1 15.75108
1 15.75147
1 15.75191
1 15.75223
1 15.75254
1 15.75287
1 15.75315
1 15.75342
1 15.75368
1 15.75392
1 15.75414
1 15.75435
1 15.75457
1 15.75475
1 15.75492
1 15.75509
1 15.75528
1 15.75544
1 15.75558
+416
View File
@@ -0,0 +1,416 @@
1.5 0
0.5 0.17749368
0.5 13.4797525
3.5 16.40650172
2.5 16.42557609
1.5 16.44411432
0.5 16.45737768
2.5 16.64385425
1.5 16.74852877
0.5 16.81247211
1.5 17.1400273
0.5 17.26583338
4.5 17.62885618
3.5 17.69466466
2.5 17.74309086
1.5 17.77579247
0.5 17.94175095
1.5 18.06063973
0.5 18.25395187
1.5 18.28805513
2.5 18.33428069
1.5 18.42654895
2.5 18.45411386
3.5 18.49586888
2.5 18.61594234
1.5 18.6565209
2.5 18.73243921
4.5 19.11606881
3.5 19.11886215
2.5 19.22290199
1.5 19.261084
0.5 19.30534474
3.5 19.49453372
2.5 19.54901161
1.5 19.61030772
0.5 19.6425819
2.5 19.68004879
1.5 19.76226091
0.5 19.8010864
1.5 19.86715687
1.5 19.96749891
0.5 19.97253806
2.5 20.24656508
3.5 20.27222673
0.5 20.74354589
2.5 21.12703333
3.5 21.14307527
1.5 21.35179967
2.5 21.36689086
0.5 21.42648933
1.5 21.42814592
1.5 21.49240221
2.5 21.49804969
1.5 21.62407043
0.5 21.67504259
2.5 22.26659785
1.5 22.30870468
2.5 22.51480375
1.5 22.59266341
0.5 22.68306524
1.5 22.70037738
3.5 22.77287946
2.5 22.78797899
0.5 22.80250953
1.5 22.81135824
0.5 22.82463943
0.5 22.83687146
4.5 22.94864794
3.5 23.01454534
2.5 23.07028979
0.5 23.0823033
1.5 23.10328497
1.5 23.11937796
3.5 23.16223797
2.5 23.17153551
2.5 23.25811355
2.5 23.4040274
1.5 23.43808861
3.5 23.48447022
0.5 23.4872861
2.5 23.5142042
0.5 23.54889293
1.5 23.57017702
0.5 23.58132402
1.5 23.61990867
2.5 23.62038658
1.5 23.63042474
0.5 23.64787986
0.5 23.67388014
1.5 23.68252216
1.5 23.70200875
1.5 23.80181422
0.5 23.84631446
2.5 23.87401492
1.5 23.8932498
4.5 24.15215466
3.5 24.15487203
2.5 24.15972844
3.5 24.16242376
1.5 24.17649215
2.5 24.18078715
5.5 24.19224869
4.5 24.19283478
0.5 24.21181391
1.5 24.21382608
2.5 24.2841313
1.5 24.28439423
1.5 24.31038395
2.5 24.31205364
4.5 24.31372301
3.5 24.31566947
3.5 24.33873385
2.5 24.34003106
3.5 24.37801662
2.5 24.37939715
3.5 24.62264148
4.5 24.62377584
2.5 24.64962188
1.5 24.69002841
0.5 24.72822996
1.5 24.73797755
2.5 24.75714519
3.5 24.78188485
2.5 24.79184041
1.5 24.79461079
1.5 24.80084252
0.5 24.81053026
3.5 24.81406469
1.5 24.81564805
2.5 24.82597055
4.5 24.8455785
0.5 24.8472311
0.5 24.87417675
3.5 24.90601819
0.5 24.92458905
1.5 24.96363449
2.5 24.96441862
3.5 24.99631786
1.5 25.01018319
2.5 25.01776175
2.5 25.063301
2.5 25.06414228
1.5 25.07625711
0.5 25.09695258
3.5 25.09810859
1.5 25.10272979
2.5 25.11230549
1.5 25.1697599
2.5 25.18754626
3.5 25.19328777
1.5 25.21157074
2.5 25.23101738
0.5 25.24248265
1.5 25.25941436
0.5 25.26633074
1.5 25.28263129
1.5 25.30688069
2.5 25.30939825
1.5 25.34451469
0.5 25.3566343
2.5 25.3653893
0.5 25.4080131
4.5 25.40905451
3.5 25.41070102
2.5 25.41398897
3.5 25.41628609
1.5 25.42374213
2.5 25.42657172
5.5 25.42923138
4.5 25.4297081
0.5 25.43912875
1.5 25.44082553
5.5 25.4430437
4.5 25.44305883
3.5 25.44339216
4.5 25.44339244
1.5 25.4442245
0.5 25.44689479
2.5 25.44775873
3.5 25.44777255
5.5 25.45069396
6.5 25.45069568
1.5 25.45407058
2.5 25.45408929
1.5 25.55357392
2.5 25.5556695
4.5 25.55720882
3.5 25.55922131
3.5 25.57120002
2.5 25.57239391
2.5 25.58252196
3.5 25.58253753
5.5 25.58388208
4.5 25.58388814
4.5 25.59001225
3.5 25.59001366
3.5 25.61810011
2.5 25.61906777
3.5 25.6423382
4.5 25.64233863
2.5 25.67654265
1.5 25.69912045
3.5 25.75083545
2.5 25.75728005
4.5 25.78089135
1.5 25.79018386
3.5 25.80645186
1.5 25.81968404
0.5 25.82951751
0.5 25.84843705
0.5 25.86208739
1.5 25.8621367
2.5 25.87220283
1.5 25.8748983
0.5 25.88366471
5.5 25.88831342
4.5 25.88831388
2.5 25.9020759
2.5 25.9029353
1.5 25.90321055
3.5 25.91464492
2.5 25.93733129
3.5 25.94352364
2.5 25.94387967
1.5 25.94596892
3.5 25.95459851
4.5 25.95463991
2.5 25.95946532
2.5 25.962013
1.5 25.962023
1.5 25.963967
1.5 25.98677759
2.5 26.05226943
4.5 26.091093
3.5 26.09211652
2.5 26.094298
3.5 26.0959238
1.5 26.100289
2.5 26.1020359
5.5 26.102613
4.5 26.1030054
1.5 26.109201
5.5 26.1120177
4.5 26.11203373
4.5 26.1122347
3.5 26.11224062
2.5 26.114806
3.5 26.1148139
4.5 26.11562699
5.5 26.11562732
5.5 26.1156855
6.5 26.11568664
6.5 26.11633472
5.5 26.11636948
3.5 26.1168951
4.5 26.11689615
6.5 26.11799294
7.5 26.11799467
1.5 26.1183377
2.5 26.11835403
2.5 26.118834
3.5 26.11883558
1.5 26.23162078
2.5 26.23333874
4.5 26.2342579
3.5 26.23586727
3.5 26.242751
2.5 26.243632
2.5 26.250636
3.5 26.25064918
5.5 26.25146678
4.5 26.25147564
3.5 26.25389733
4.5 26.25389869
5.5 26.25427164
6.5 26.25427361
4.5 26.2550758
3.5 26.2550759
5.5 26.25625206
4.5 26.25625349
3.5 26.29349807
2.5 26.29420688
3.5 26.2957448
4.5 26.30919054
3.5 26.30921031
5.5 26.31161572
4.5 26.31161707
4.5 26.3124705
3.5 26.3270996
1.5 26.40024778
2.5 26.40040694
3.5 26.4457878
4.5 26.501521
3.5 26.502211
5.5 26.508766
4.5 26.508998
5.5 26.5151816
4.5 26.515188
4.5 26.5153215
3.5 26.5153366
3.5 26.5169562
2.5 26.516971
5.5 26.5175106
4.5 26.5175166
5.5 26.5175465
6.5 26.5175478
6.5 26.5178907
5.5 26.517891
5.5 26.5182798
6.5 26.5182802
3.5 26.5183115
4.5 26.5183131
6.5 26.5183399
7.5 26.51834059
4.5 26.51872775
5.5 26.51872874
6.5 26.5189883
7.5 26.5189883
1.5 26.519141
2.5 26.5191665
7.5 26.51920431
8.5 26.51920604
3.5 26.5194635
4.5 26.5194653
3.5 26.5195296
2.5 26.5195296
3.5 26.55553696
4.5 26.55611105
2.5 26.61538
3.5 26.633348
3.5 26.63580564
4.5 26.642424
4.5 26.643572
3.5 26.643649
2.5 26.64561317
2.5 26.6534541
3.5 26.6534596
5.5 26.6539915
4.5 26.6540013
3.5 26.6556189
4.5 26.6556189
5.5 26.6558587
6.5 26.6558599
3.5 26.656228
4.5 26.6563034
4.5 26.65633139
5.5 26.65633274
6.5 26.6564535
7.5 26.65645547
5.5 26.6571105
4.5 26.6571107
6.5 26.65721708
5.5 26.65721849
0.5 26.66475708
3.5 26.7113731
4.5 26.7114154
4.5 26.7129918
5.5 26.7129931
5.5 26.71346418
6.5 26.7134642
4.5 26.767405
5.5 26.772202
4.5 26.772359
5.5 26.778505
6.5 26.778524
6.5 26.778743
5.5 26.778749
6.5 26.7787807
7.5 26.778782
4.5 26.7790112
5.5 26.7790128
6.5 26.7790639
7.5 26.7790642
7.5 26.7790991
8.5 26.7790998
7.5 26.7792083
8.5 26.7792087
5.5 26.7792433
6.5 26.7792443
4.5 26.7794125
3.5 26.7794125
8.5 26.7794752
9.5 26.779477
4.5 26.7795604
5.5 26.779562
0.5 26.889959
6.5 26.9166427
7.5 26.9166439
5.5 26.9166671
4.5 26.9166671
5.5 26.917031
6.5 26.9170324
7.5 26.917078
8.5 26.91708
5.5 26.9172074
6.5 26.9172074
7.5 26.9174372
6.5 26.9174385
5.5 26.9736915
6.5 26.9736926
7.5 26.9739783
6.5 26.9739797
4.5 27.14521093
5.5 27.145213
2.5 27.152775
1.5 27.153005
2.5 27.171451
3.5 27.17246
6.5 27.1777813
5.5 27.1777818
3.5 27.1831192
2.5 27.183137
3.5 27.19190849
4.5 27.19191019
4.5 27.19247952
5.5 27.1924832
+105
View File
@@ -0,0 +1,105 @@
1.5 0
1.5 1.3133
2.5 1.35324
0.5 2.25479
1.5 2.312
0.5 6.28523
1.5 6.39885
2.5 6.5585
0.5 6.58797
1.5 6.77019
2.5 6.86456
1.5 7.05019
0.5 7.12762
0.5 7.457333
0.5 7.53719
2.5 7.5401
1.5 7.54255
1.5 7.54573
2.5 7.64797
1.5 7.69028
0.5 7.73637
1.5 7.75576
2.5 7.78014
3.5 7.79504
2.5 7.84607
1.5 7.87344
1.5 7.89122
1.5 7.9326
0.5 7.93272
0.5 7.95011
2.5 7.95597
0.5 7.97513
1.5 7.97744
2.5 8.01428
1.5 8.02024
1.5 8.0356
0.5 8.12064
1.5 8.24311
0.5 8.2559
2.5 8.2729
3.5 8.28031
0.5 8.30803
1.5 8.42102
1.5 8.4682
0.5 8.46992
2.5 8.48085
1.5 8.59395
0.5 8.63485
1.5 8.63485
2.5 8.64149
1.5 8.64149
0.5 8.6642
1.5 8.67065
2.5 8.72559
1.5 8.74294
0.5 8.776947
2.5 8.78073
3.5 8.79389
1.5 8.80956
1.5 8.80972
2.5 8.81912
0.5 8.82756
1.5 8.87992
0.5 8.90159
1.5 8.9174
0.5 8.91749
1.5 8.91839
1.5 8.94236
1.5 8.9424
3.5 8.96922
3.5 8.97431
0.5 8.97638
2.5 8.98909
1.5 8.99126
1.5 9.00377
1.5 9.02345
0.5 9.02612
2.5 9.04395
1.5 9.0812
2.5 9.12102
1.5 9.12102
1.5 9.12958
1.5 9.18099
2.5 9.18099
0.5 9.19266
1.5 9.19266
2.5 9.231
2.5 9.23101
1.5 9.27532
0.5 9.30948
1.5 9.30948
3.5 9.3206
1.5 9.32069
2.5 9.32069
2.5 9.37056
1.5 9.37056
1.5 9.39793
0.5 9.39793
1.5 9.43225
1.5 9.5264
2.5 9.5264
1.5 9.56187
2.5 9.56187
2.5 9.58057
1.5 9.58057
+166
View File
@@ -0,0 +1,166 @@
0 0
1 0.131856
2 0.315087
2 1.251722
0 2.80187
2 6.796452
1 9.143821
2 9.157762
3 9.205135
0 9.7613866
1 9.810662
2 10.1058186
1 10.2682738
2 10.3031865
1 10.4935496
0 10.4950672
2 10.551782
2 11.01341
3 11.102742
4 11.2735633
1 11.8194858
1 12.0159504
2 12.0407422
0 12.1800117
1 12.2826194
1 12.2968909
3 12.2991084
2 12.3424802
2 12.4307957
3 12.4469098
1 12.5335504
1 12.5829384
2 12.6854929
2 12.6950786
3 12.7067793
0 12.7145901
1 12.720152
0 13.1162797
1 13.518742
2 13.8281726
0 14.1960985
1 14.2211478
2 14.5539893
1 14.5985628
2 14.7407617
1 14.7559507
3 14.8208307
2 14.9741091
1 14.974155
1 15.046643
1 15.052008
4 15.0570762
2 15.060626
3 15.0667254
3 15.0728052
2 15.0795879
4 15.0798835
0 15.103301
3 15.230581
2 15.2783314
1 15.3120154
0 15.3147634
1 15.3373263
2 15.347815
3 15.3686629
3 15.3913875
2 15.3943218
4 15.3999125
3 15.4231497
1 15.448328
2 15.4550232
3 15.4556492
5 15.4616011
4 15.4819645
2 15.4937239
1 15.5238662
2 15.5285847
0 15.645909
1 15.6974168
0 15.9410653
1 15.9554943
2 16.2011197
3 16.2601245
2 16.27378
1 16.295108
1 16.297394
2 16.3089954
3 16.3417421
3 16.3500684
4 16.3508889
2 16.3530534
1 16.353266
1 16.3558129
2 16.364958
0 16.3797741
4 16.4014642
4 16.401617
3 16.4017477
4 16.557597
3 16.6022904
2 16.6042997
2 16.6424968
1 16.646351
0 16.649041
1 16.677424
3 16.68325
4 16.688936
3 16.6921077
3 16.6951881
2 16.701155
2 16.7155124
5 16.7170239
3 16.7178849
1 16.731498
4 16.7319194
1 16.7522507
4 16.7538428
5 16.7538905
1 16.7548891
2 16.756146
2 16.760749
4 16.7616057
5 16.7616168
6 16.7734499
5 16.7735456
0 16.816517
0 16.82385
1 16.828805
2 16.960136
2 16.998408
3 17.001298
1 17.029842
4 17.0403275
3 17.041571
2 17.043986
2 17.179899
1 17.194019
0 17.3182
1 17.321329
4 17.326144
2 17.337763
1 17.362058
0 17.368502
2 17.380944
3 17.384175
4 17.387781
3 17.392886
2 17.400278
5 17.403337
3 17.405235
4 17.41226
1 17.414321
1 17.422962
2 17.428248
3 17.431769
6 17.439726
2 17.456359
3 17.460675
0 17.46544
2 17.6825
1 17.689347
0 17.7956
5 17.817444
6 17.841636
0 17.85467
5 18.08586
+61
View File
@@ -0,0 +1,61 @@
0.5 0
2.5 1.1358412
1.5 2.657625
0.5 4.6319245
1.5 5.1050013
2.5 5.2276114
3.5 5.6458926
2.5 5.7249677
2.5 5.75026
1.5 5.8281789
4.5 6.0376767
3.5 6.3267765
1.5 6.3519001
1.5 6.38333
2.5 6.40427
3.5 6.54663
0.5 6.595503
0.5 6.7553081
0.5 6.90995
1.5 6.9562261
2.5 7.2675524
1.5 7.2959014
2.5 7.40349
0.5 7.443125
1.5 7.529373
2.5 7.59466
1.5 7.63288
1.5 7.68102
2.5 7.6912
1.5 7.81164
0.5 8.02703
0.5 8.258
1.5 8.29582
1.5 8.36514
3.5 8.36711
2.5 8.36769
2.5 8.37026
3.5 8.40755
0.5 8.5153
2.5 8.51835
1.5 8.67534
2.5 8.67984
0.5 8.75543
1.5 8.75989
2.5 8.8304
1.5 8.84682
2.5 8.85004
0.5 8.89138
1.5 8.94717
2.5 8.94804
0.5 8.97595
1.5 9.01242
2.5 9.01301
0.5 9.03194
1.5 9.05717
2.5 9.05764
0.5 9.07094
1.5 9.08905
2.5 9.0896
1.5 9.11289
2.5 9.11315
+37
View File
@@ -0,0 +1,37 @@
0 0
3 1.8646693
2 2.1871576
1 3.4425152
2 3.6725668
4 5.0187253
2 6.0145843
3 6.4690625
2 7.2148425
0 7.2593028
1 7.6559522
2 7.817615
3 8.0594184
4 8.9882504
2 9.0729517
1 9.1009161
3 9.2729612
2 9.5045914
1 10.1245282
0 10.2428033
3 10.6254706
1 10.6263843
2 10.7327747
3 13.4117366
2 13.4685821
1 14.388434
4 14.4994965
2 14.5142881
3 14.5696308
2 14.809478
3 14.9099825
1 14.9801336
2 15.0168146
2 15.09932
1 15.10896
4 15.25772
3 15.29268
+81
View File
@@ -0,0 +1,81 @@
0.5 0
1.5 0.0018953
0.5 3.551829
1.5 3.552404
2.5 3.553189
0.5 4.96428892
2.5 5.9334881
1.5 5.9335272
0.5 6.02710323
1.5 6.0273242
1.5 6.79032863
2.5 6.79034652
0.5 6.82039969
0.5 7.16460459
1.5 7.16468328
2.5 7.43824
1.5 7.43824
2.5 7.4429048
3.5 7.44290547
0.5 7.4572049
0.5 7.616794
0.5 7.7468013
2.5 7.7472151
1.5 7.7472151
3.5 7.75106542
2.5 7.75106542
0.5 7.843642
0.5 7.8805147
1.5 7.9158111
2.5 7.9158111
2.5 7.9184152
3.5 7.9184152
0.5 7.9543323
0.5 7.973224
1.5 8.0174819
2.5 8.0174819
3.5 8.0192663
2.5 8.0192663
0.5 8.033195
0.5 8.05455
2.5 8.083434
1.5 8.083434
3.5 8.084685
2.5 8.084685
0.5 8.092472
0.5 8.10865
1.5 8.128612
2.5 8.129514
0.5 8.134526
1.5 8.160905
2.5 8.16154
1.5 8.184766
2.5 8.185267
1.5 8.202911
1.5 8.217013
1.5 8.2282
1.5 8.237217
1.5 8.244597
1.5 8.250713
1.5 8.255835
1.5 8.260166
1.5 8.263862
1.5 8.267041
1.5 8.269799
1.5 8.272202
1.5 8.274317
1.5 8.276199
1.5 8.277831
1.5 8.279304
1.5 8.280617
1.5 8.281811
1.5 8.282847
1.5 8.283842
1.5 8.284757
1.5 8.285501
1.5 8.286204
1.5 8.2869
1.5 8.287515
1.5 8.288075
1.5 8.288595
1.5 8.289038
+103
View File
@@ -0,0 +1,103 @@
0 0
0 4.629017
1 4.629775
2 4.631777
1 9.1000074
0 12.263448
1 12.264501
2 12.266161
2 12.6913659
0 15.82797
1 16.089904
0 17.062984
0 17.852478
1 17.852554
2 17.852994
1 17.866487
2 18.67818
3 18.67818
1 18.67818
2 19.178634
1 20.624138
0 20.821325
1 21.150629
0 21.268988
1 21.268988
2 21.268988
2 21.582342
3 21.582342
1 21.582342
3 21.685249
4 21.685249
2 21.685249
3 21.68755
2 21.765055
1 22.428384
0 22.509583
0 22.52122
1 22.522418
2 22.525047
1 22.53607
0 22.765831
2 22.765831
1 22.765831
1 22.891664
3 22.891664
2 22.891664
3 22.925767
2 22.925767
4 22.925767
3 22.93189
4 22.969542
4 22.969542
3 22.969542
5 22.969542
2 22.977146
1 23.139161
1 23.33018
0 23.3772
1 23.448881
0 23.52507
1 23.58854
1 23.5892
3 23.598145
2 23.598145
4 23.598145
3 23.610195
4 23.637442
4 23.637442
3 23.637442
5 23.637442
2 23.63813
1 23.6853
2 23.68651
3 23.68884
1 23.8347
0 23.8686
1 23.95703
2 24.0005
1 24.0026
1 24.0155
2 24.03605
3 24.04031
0 24.1699
1 24.1744
1 24.2488
0 24.25152
1 24.252328
2 24.253671
2 24.25694
1 24.2798
2 24.42236
1 24.4398
1 24.4683
2 24.50482
2 24.51102
3 24.51213
4 24.51399
2 24.514173
1 24.596
1 24.85612
2 24.85659
3 24.857254
0 24.88693
+355
View File
@@ -0,0 +1,355 @@
0 0
1 1.120069
2 1.1425765
3 1.1898184
2 1.4128433
0 1.5207931
1 1.5667416
2 1.6756148
1 2.239187
2 2.5954895
3 2.6346884
4 2.6810061
2 2.7356673
3 2.8451178
2 2.8593299
2 2.8608594
0 2.8775552
1 2.911146
4 2.9454987
2 2.9655675
1 2.9994298
2 3.04152
3 3.0971047
0 3.1792184
1 3.1869034
2 3.2181982
1 3.2434629
0 3.31748
3 3.3247932
0 3.5001025
1 3.5402722
2 3.7488886
1 3.8057714
0 3.8117069
2 3.8125974
1 3.8206365
3 3.8209593
2 3.8419281
1 4.0353178
1 4.0673225
2 4.0845074
3 4.1567687
2 4.1901713
1 4.2037286
0 4.2614611
0 4.276699
2 4.290196
3 4.2919167
4 4.2936693
3 4.3067613
1 4.317552
2 4.3821487
2 4.4159388
0 4.41985
1 4.422392
1 4.4273875
2 4.4333
2 4.4339461
3 4.4368084
1 4.4500985
3 4.4503378
1 4.4552241
3 4.4839272
2 4.488279
4 4.5067216
1 4.5187987
1 4.524894
3 4.5268127
3 4.5414237
5 4.5672889
1 4.5753479
0 4.5760435
1 4.5861731
2 4.5952823
2 4.5970212
2 4.5984244
1 4.5992541
4 4.6037857
0 4.616452
3 4.6223942
2 4.6363727
3 4.6393548
2 4.6413703
3 4.6498893
4 4.6524014
3 4.6543896
0 4.6712
4 4.6781875
3 4.6791306
1 4.683538
2 4.6912279
1 4.703572
1 4.7066767
2 4.708199
3 4.7099655
1 4.7142585
4 4.733344
2 4.7445797
1 4.7733742
2 4.7803629
0 4.7937
2 4.8125334
3 4.8129894
4 4.8137165
3 4.8209895
0 4.82596
1 4.855247
3 4.8584076
1 4.874061
2 4.8769188
1 4.882846
2 4.893034
0 4.918682
2 4.9194668
3 4.9197831
4 4.9200805
3 4.9228057
1 4.946161
1 4.948997
2 4.949718
2 4.950787
1 4.957154
2 4.959163
3 4.977549
2 4.987109
0 4.988349
4 4.996567
5 4.996567
3 4.996567
4 4.996567
1 5.008416
2 5.009789
1 5.00988
2 5.010649
3 5.011864
1 5.012517
2 5.019325
1 5.029916
2 5.035478
0 5.036015
1 5.041552
3 5.041687
4 5.041887
5 5.041887
4 5.041887
1 5.044224
3 5.045983
1 5.050126
1 5.050721
2 5.051334
1 5.05144
2 5.052109
3 5.052133
1 5.054244
2 5.056253
3 5.066901
1 5.0672
0 5.069908
1 5.07018
2 5.070351
2 5.071663
4 5.074104
5 5.074273
3 5.074273
4 5.074273
1 5.080085
4 5.080166
1 5.081167
2 5.081227
3 5.081768
2 5.081774
1 5.082265
2 5.084309
1 5.085778
1 5.09355
0 5.093757
0 5.094883
1 5.095403
2 5.09584
5 5.098133
3 5.098133
4 5.098133
4 5.098229
1 5.103168
2 5.103456
2 5.103491
1 5.103564
2 5.103761
3 5.103775
1 5.106116
2 5.108737
1 5.112594
0 5.113753
2 5.1145
4 5.116389
5 5.116389
3 5.116389
4 5.116389
0 5.120043
1 5.12017
2 5.120464
1 5.120495
2 5.120597
3 5.120649
1 5.121524
2 5.122468
1 5.12752
0 5.128273
3 5.130461
5 5.130511
4 5.130511
4 5.130511
1 5.133491
3 5.133686
1 5.133754
2 5.133755
2 5.13383
1 5.134315
2 5.135125
0 5.138056
1 5.139301
3 5.140308
0 5.141352
4 5.141698
5 5.141698
4 5.141698
3 5.141744
1 5.144116
1 5.144298
2 5.144328
2 5.14438
1 5.144649
3 5.144801
2 5.145344
1 5.14871
0 5.149715
5 5.150265
4 5.15077
3 5.15077
4 5.15077
5 5.151579
1 5.15266
1 5.152715
2 5.152886
2 5.152923
1 5.153061
3 5.153102
2 5.153662
1 5.154069
1 5.156839
0 5.157222
3 5.158174
4 5.158174
4 5.158174
5 5.158225
1 5.159766
2 5.159914
2 5.159942
1 5.15995
1 5.159989
3 5.160031
2 5.160517
1 5.163048
0 5.163481
2 5.163675
4 5.164288
4 5.164288
3 5.164288
5 5.164322
1 5.165622
1 5.165759
1 5.165762
2 5.165762
3 5.16584
2 5.166231
1 5.168367
0 5.168729
2 5.168876
3 5.169386
4 5.169438
5 5.169438
4 5.169438
1 5.170544
1 5.170617
2 5.170654
1 5.170662
3 5.170696
2 5.171029
1 5.172864
0 5.173166
2 5.173289
3 5.173443
3 5.173796
4 5.173796
5 5.173796
4 5.173796
1 5.174704
2 5.174777
2 5.174802
1 5.174821
3 5.174993
2 5.175108
1 5.176689
0 5.17695
2 5.17702
4 5.177467
4 5.177467
5 5.177467
3 5.177467
2 5.177571
1 5.178243
2 5.178345
1 5.178365
3 5.17847
2 5.178488
2 5.178597
1 5.179982
0 5.180206
2 5.18031
4 5.180656
4 5.180656
5 5.180656
3 5.180656
1 5.181298
2 5.181391
1 5.181437
2 5.18146
3 5.181515
2 5.181612
2 5.183109
5 5.183427
3 5.183427
4 5.183427
4 5.183427
2 5.184006
1 5.184081
2 5.184218
2 5.185552
5 5.185803
3 5.185803
4 5.185803
4 5.185803
2 5.187686
2 5.187701
4 5.187777
5 5.187985
3 5.187985
4 5.187985
4 5.188197
2 5.189588
5 5.18982
3 5.18982
4 5.18982
4 5.189843
1 5.19877
+161
View File
@@ -0,0 +1,161 @@
0.5 0
1.5 0.6042806
2.5 0.7035864
0.5 2.5121134
1.5 2.7217512
0.5 5.2513724
1.5 5.6970084
2.5 5.7224717
2.5 5.9833059
3.5 6.011167
0.5 6.1235574
1.5 6.2006159
2.5 7.1155674
3.5 7.1454249
0.5 7.1942092
1.5 7.4142865
2.5 7.4260246
0.5 7.60513
1.5 7.64263
3.5 7.8143179
4.5 7.8143179
2.5 8.008924
3.5 8.021416
0.5 8.1437341
1.5 8.2664791
2.5 8.2729188
0.5 8.37032
1.5 8.39142
4.5 8.4837545
3.5 8.4837545
2.5 8.581163
3.5 8.587203
0.5 8.680702
1.5 8.7557946
2.5 8.7597197
0.5 8.81897
1.5 8.83204
4.5 8.8875125
3.5 8.8875125
2.5 8.944563
3.5 8.947963
0.5 9.014306
1.5 9.063441
2.5 9.066016
0.5 9.1049
1.5 9.11367
4.5 9.149522
3.5 9.149522
2.5 9.186119
3.5 9.188335
0.5 9.235785
1.5 9.269741
2.5 9.271511
0.5 9.29849
1.5 9.30463
4.5 9.329083
3.5 9.329083
2.5 9.3543
3.5 9.35572
2.5 9.4161
3.5 9.457475
4.5 9.457475
2.5 9.47557
3.5 9.47657
2.5 9.56591
3.5 9.5667
2.5 9.6348
3.5 9.6354
3.5 9.691
2.5 9.691
0.5 9.802072
1.5 9.806772
2.5 9.807007
0.5 9.82457
1.5 9.828503
2.5 9.828712
0.5 9.843494
1.5 9.84683
2.5 9.847002
0.5 9.859593
1.5 9.862423
2.5 9.862514
0.5 9.873367
1.5 9.875834
2.5 9.875956
0.5 9.885263
1.5 9.887395
2.5 9.887509
0.5 9.895597
1.5 9.89745
2.5 9.897548
0.5 9.904643
1.5 9.906272
2.5 9.906366
0.5 9.9126
1.5 9.91404
2.5 9.914112
0.5 9.919631
1.5 9.920906
2.5 9.92097
0.5 9.925879
1.5 9.927022
2.5 9.927072
0.5 9.931468
2.5 9.932509
1.5 9.932509
0.5 9.936452
1.5 9.937403
2.5 9.937403
0.5 9.940965
1.5 9.941813
2.5 9.941813
0.5 9.945037
2.5 9.945795
1.5 9.945795
0.5 9.948711
1.5 9.949406
2.5 9.949406
0.5 9.95206
1.5 9.952693
2.5 9.952693
0.5 9.955107
2.5 9.955684
1.5 9.955684
0.5 9.957906
2.5 9.958429
1.5 9.958429
0.5 9.960456
1.5 9.960945
2.5 9.960945
0.5 9.962794
2.5 9.963235
1.5 9.963235
0.5 9.964957
2.5 9.965366
1.5 9.965366
0.5 9.966948
1.5 9.96733
2.5 9.96733
0.5 9.968792
2.5 9.969153
1.5 9.969153
0.5 9.970503
2.5 9.970829
1.5 9.970829
0.5 9.9721
1.5 9.972404
2.5 9.972404
0.5 9.973575
2.5 9.973855
1.5 9.973855
0.5 9.974959
2.5 9.975232
1.5 9.975232
0.5 9.976247
1.5 9.976486
2.5 9.976486
0.5 9.97744
1.5 9.977679
2.5 9.977679
0.5 9.978571
+109
View File
@@ -0,0 +1,109 @@
0 0
0 2.724959
1 2.7250394
2 2.72533
1 5.277431
1 6.457214
0 6.779116
2 7.052522
0 7.303593
1 7.303593
2 7.30364
0 7.401069
1 7.401245
2 7.401495
1 7.462279
2 7.693681
1 7.693681
3 7.693681
2 7.988092
1 7.99778
0 8.08939
2 8.283617
1 8.283617
0 8.283617
1 8.311243
1 8.423692
3 8.423692
2 8.423692
3 8.460808
2 8.460808
4 8.460808
3 8.460828
2 8.52774
1 8.556174
0 8.594857
1 8.687002
0 8.687002
2 8.687002
1 8.693833
1 8.753751
3 8.753751
2 8.753751
3 8.771847
2 8.771847
4 8.771847
3 8.77187
2 8.803168
1 8.82278
0 8.842696
1 8.893463
0 8.893463
2 8.893463
1 8.895381
1 8.93052
3 8.93052
2 8.93052
2 8.940693
4 8.940693
3 8.940693
3 8.940701
2 8.958016
1 8.97084
0 8.982442
1 9.013319
0 9.013319
2 9.013319
1 9.01387
1 9.03608
3 9.03608
2 9.03608
2 9.042366
4 9.042366
3 9.042366
3 9.042372
2 9.053006
1 9.06182
0 9.069019
1 9.089176
0 9.089176
2 9.089176
1 9.08924
3 9.104077
2 9.104077
1 9.104077
2 9.115295
0 9.12629
1 9.1388
1 9.15036
3 9.15036
2 9.15036
2 9.1583
0 9.1662
1 9.17597
1 9.18351
3 9.18351
2 9.18351
2 9.189198
0 9.19509
1 9.20224
2 9.20807
1 9.20807
3 9.20807
2 9.2122
1 9.22203
1 9.22632
3 9.22632
2 9.22632
2 9.22979
1 9.23733
+77
View File
@@ -0,0 +1,77 @@
0.5 0
0.5 3.9586597
1.5 3.959475
0.5 10.9393632
0.5 11.9638998
1.5 11.9641388
1.5 12.157217
2.5 12.157283
0.5 14.315766
0.5 14.724427
1.5 14.724527
1.5 14.806342
2.5 14.806371
2.5 14.80949
3.5 14.809506
0.5 15.787543
0.5 15.990443
1.5 15.990496
1.5 16.032413
2.5 16.032428
2.5 16.034114
3.5 16.034122
4.5 16.034313
3.5 16.034313
0.5 16.558888
0.5 16.674061
1.5 16.67409
2.5 16.698334
1.5 16.698334
2.5 16.699332
3.5 16.699336
4.5 16.699451
3.5 16.699451
4.5 16.699487
5.5 16.699487
0.5 17.01296
0.5 17.084523
1.5 17.084541
1.5 17.099798
2.5 17.099798
3.5 17.100435
2.5 17.100435
4.5 17.100534
3.5 17.100534
5.5 17.100537
4.5 17.100537
0.5 17.302635
0.5 17.350111
1.5 17.350123
2.5 17.360339
1.5 17.360339
3.5 17.360778
2.5 17.360778
4.5 17.360835
3.5 17.360835
4.5 17.36085
5.5 17.36085
0.5 17.498671
0.5 17.531767
1.5 17.531776
2.5 17.538947
1.5 17.538947
3.5 17.539257
2.5 17.539257
3.5 17.539294
4.5 17.539294
4.5 17.539303
5.5 17.539303
0.5 17.637476
0.5 17.661462
1.5 17.661468
2.5 17.666921
3.5 17.666921
3.5 17.666948
4.5 17.666948
4.5 17.666955
5.5 17.666955
+38
View File
@@ -0,0 +1,38 @@
1.5 0
1.5 1.4157804
2.5 1.9140062
0.5 2.685611
0.5 4.0404244
1.5 4.1119117
0.5 5.0988483
1.5 5.3239458
1.5 5.4444404
2.5 5.5565801
1.5 5.5625604
0.5 5.6928439
0.5 5.8735625
2.5 6.0119775
1.5 6.1323712
0.5 6.198897
1.5 6.3255609
2.5 6.3428448
0.5 6.478839
0.5 6.6296
2.5 6.68009
0.5 6.681972
1.5 6.692275
0.5 6.76454
1.5 6.765883
1.5 6.87174
2.5 6.8784
0.5 6.92107
1.5 6.95405
0.5 6.97726
1.5 6.9839
1.5 7.013848
0.5 7.0164
2.5 7.0765
0.5 7.14236
1.5 7.16229
2.5 7.22501
3.5 7.2379
+77
View File
@@ -0,0 +1,77 @@
0 0
1 1.6521391
2 2.1116614
2 4.2078647
0 5.4768492
0 8.57151
1 8.6291111
2 9.4412369
2 9.8060516
1 9.9902835
2 10.1728578
3 10.1985992
1 10.4494435
0 10.7963923
1 10.9808694
2 11.0062561
2 11.0084922
1 11.1444033
1 11.7093437
2 11.7698992
3 11.9102141
2 12.27584
4 12.36
0 12.42104
1 12.459783
1 12.564612
0 12.579863
2 12.68751
3 12.770807
2 13.028945
1 13.051934
3 13.054263
3 13.074263
2 13.083705
4 13.108609
2 13.198054
1 13.218107
0 13.3873
3 13.391416
1 13.406006
3 13.42509
1 13.440666
2 13.500456
1 13.527353
2 13.533883
2 13.626606
0 13.966928
0 14.205998
1 14.210247
3 14.374301
3 14.393447
4 14.399632
2 14.408747
2 14.499061
3 14.5066
3 14.533992
1 14.534
2 15.160543
1 15.209
3 15.514622
4 15.528934
3 15.545851
4 15.564548
2 15.573919
1 15.5955
5 15.615427
3 15.635355
2 15.659106
4 15.703071
3 15.739725
1 15.753756
2 15.768836
1 15.8578
3 15.937436
1 16.0414
1 16.1637
1 16.2564
+252
View File
@@ -0,0 +1,252 @@
1.5 0
0.5 0.456912
2.5 7.865117
1.5 8.047466
0.5 8.292543
1.5 8.329702
0.5 8.551216
2.5 9.258188
1.5 9.299947
3.5 9.363473
2.5 9.385238
0.5 9.399738
2.5 9.409202
1.5 9.411458
1.5 9.514929
0.5 9.68019
2.5 9.734198
1.5 9.754661
0.5 9.778103
3.5 9.800269
1.5 9.816862
2.5 9.8271
1.5 9.872945
1.5 9.881031
0.5 9.902374
0.5 9.922009
4.5 9.99159
3.5 10.052775
0.5 10.096029
2.5 10.126072
1.5 10.147117
2.5 10.195986
1.5 10.248728
0.5 10.303222
3.5 10.335179
1.5 10.362413
2.5 10.380339
1.5 10.424284
2.5 10.452582
0.5 10.517034
2.5 10.531857
1.5 10.562411
1.5 10.592631
2.5 10.603974
0.5 10.610187
1.5 10.611349
3.5 10.633254
0.5 10.637744
2.5 10.64039
1.5 10.655681
0.5 10.697283
3.5 10.757896
2.5 10.778353
2.5 10.794217
1.5 10.802948
4.5 10.810426
3.5 10.814541
1.5 10.818773
0.5 10.820315
3.5 10.841181
0.5 10.848497
0.5 10.88013
2.5 10.880223
1.5 10.882088
2.5 10.927356
1.5 10.944766
4.5 10.95266
3.5 10.952852
2.5 10.954101
3.5 10.95414
1.5 10.955736
2.5 10.956647
4.5 10.959233
5.5 10.959233
0.5 10.963288
1.5 10.963362
1.5 10.965011
2.5 10.970546
0.5 10.999008
2.5 11.015749
1.5 11.028861
1.5 11.038541
0.5 11.052856
1.5 11.101597
2.5 11.10264
3.5 11.113552
2.5 11.117548
0.5 11.125028
0.5 11.129418
1.5 11.132067
3.5 11.141307
1.5 11.142173
0.5 11.146908
1.5 11.152122
2.5 11.152127
4.5 11.18894
3.5 11.191787
0.5 11.194823
2.5 11.202583
1.5 11.21021
3.5 11.211598
0.5 11.211705
1.5 11.21558
1.5 11.225222
2.5 11.228734
2.5 11.231141
2.5 11.256389
1.5 11.257461
4.5 11.263413
3.5 11.263565
2.5 11.264126
3.5 11.264126
1.5 11.26629
2.5 11.266399
5.5 11.266903
4.5 11.266913
0.5 11.269033
1.5 11.269117
1.5 11.282729
2.5 11.304282
1.5 11.317777
0.5 11.325669
0.5 11.34236
1.5 11.342448
2.5 11.343203
3.5 11.344087
2.5 11.344199
1.5 11.348177
1.5 11.349816
2.5 11.350223
2.5 11.351635
3.5 11.354886
0.5 11.356811
1.5 11.365333
0.5 11.368228
3.5 11.376237
1.5 11.381768
2.5 11.383025
0.5 11.384719
4.5 11.38809
3.5 11.391747
4.5 11.396858
1.5 11.39748
0.5 11.398853
2.5 11.401159
3.5 11.406366
0.5 11.417656
2.5 11.426563
1.5 11.429148
2.5 11.429847
3.5 11.429847
4.5 11.432251
3.5 11.432368
1.5 11.434017
2.5 11.434072
5.5 11.434162
4.5 11.43417
3.5 11.434852
2.5 11.434889
0.5 11.435396
1.5 11.435444
1.5 11.470635
2.5 11.478976
1.5 11.480251
0.5 11.482033
3.5 11.483442
2.5 11.484264
0.5 11.487192
1.5 11.490522
0.5 11.496872
3.5 11.497012
2.5 11.498686
2.5 11.499992
2.5 11.500255
1.5 11.502623
4.5 11.506702
1.5 11.508071
0.5 11.50875
1.5 11.510614
3.5 11.511165
1.5 11.512382
0.5 11.516991
0.5 11.529622
2.5 11.530011
4.5 11.533766
3.5 11.533837
2.5 11.534056
3.5 11.534056
1.5 11.534869
2.5 11.534913
5.5 11.535004
4.5 11.53501
1.5 11.535402
0.5 11.535786
1.5 11.535818
2.5 11.541518
1.5 11.545059
3.5 11.560826
0.5 11.565566
3.5 11.566657
1.5 11.572103
1.5 11.572599
2.5 11.572988
3.5 11.580603
2.5 11.580857
4.5 11.581547
3.5 11.584
0.5 11.586508
1.5 11.586667
2.5 11.58927
0.5 11.591457
1.5 11.592541
2.5 11.598046
4.5 11.599582
3.5 11.599632
1.5 11.599711
3.5 11.599777
2.5 11.599777
1.5 11.60029
5.5 11.600429
4.5 11.600435
1.5 11.606147
0.5 11.611163
2.5 11.613838
3.5 11.615189
0.5 11.617503
3.5 11.629564
2.5 11.631648
4.5 11.632068
1.5 11.63238
3.5 11.637044
1.5 11.642939
4.5 11.644576
5.5 11.645259
4.5 11.64526
0.5 11.652429
0.5 11.652978
1.5 11.653071
3.5 11.653773
2.5 11.653861
2.5 11.656721
1.5 11.656772
1.5 11.664756
2.5 11.665547
4.5 11.667744
3.5 11.67019
4.5 11.676933
4.5 11.693867
2.5 11.7115
1.5 11.71287
3.5 11.741332
2.5 11.741354
+131
View File
@@ -0,0 +1,131 @@
2 0
1 0.38886
0 0.47579
2 1.49886
0 3.45508
2 11.64472
2 11.956017
1 12.20855
1 12.24954
0 12.42748
3 12.89902
2 12.90399
4 12.90547
1 12.91211
0 12.91809
1 13.56759
2 13.59871
3 13.68488
2 13.82761
1 13.93421
3 13.94309
2 14.00209
1 14.05226
1 14.2177
2 14.2346
3 14.27896
1 14.5747
2 14.59815
2 14.60024
0 14.60854
3 14.69301
4 14.80738
0 15.02086
1 15.07086
4 15.14955
2 15.20365
3 15.21527
1 15.50422
1 15.72004
2 15.83082
3 15.86241
1 15.95282
2 15.97984
2 16.11285
2 16.19258
3 16.19809
1 16.21914
3 16.27927
3 16.32619
4 16.33324
2 16.52349
0 16.56021
1 16.56346
2 16.83528
2 16.93679
1 17.06023
1 17.12444
3 17.26561
1 17.28957
2 17.37291
1 17.38436
0 17.38436
4 17.39296
3 17.39326
2 17.41944
1 17.61726
1 17.70931
2 17.71124
0 17.74753
0 17.7899
3 17.81685
1 17.91735
2 18.02363
1 18.05181
2 18.09159
5 18.09218
4 18.09223
3 18.09273
2 18.093
1 18.09314
3 18.11146
2 18.11221
4 18.1131
1 18.76511
2 18.7774
2 18.78281
3 18.89162
2 18.94772
1 19.10349
4 19.21453
1 19.23514
2 19.28982
3 19.34481
3 19.35501
4 19.35921
1 19.40397
4 19.42515
5 19.43411
4 19.45984
3 19.49252
1 19.51048
2 19.54297
1 19.55442
3 19.56466
2 19.62913
3 19.64014
1 19.80896
2 19.82537
2 19.89216
2 19.94658
3 19.9468
2 19.97769
2 19.9821
5 19.99706
4 20.02654
2 20.0724
4 20.1113
3 20.11683
2 20.12422
3 20.12787
3 20.13041
1 20.13446
1 20.49782
2 20.64143
1 20.75931
2 20.96885
2 20.9987
2 21.03677
3 21.04823
2 21.1641
1 21.17935
+271
View File
@@ -0,0 +1,271 @@
0 0
1 0.002033
2 0.005381
2 1.263725
0 2.684011
2 4.182632
0 7.480392
1 7.482772
2 7.487795
1 7.684766
3 7.945765
1 7.946129
2 7.946265
1 8.537097
1 8.640394
2 8.64302
3 8.647158
1 8.771132
0 8.846584
1 8.84812
2 8.850659
2 9.002582
0 9.171844
1 9.330303
2 9.330464
0 9.33057
2 9.63107
0 9.683783
1 9.685241
2 9.689128
2 9.695449
3 9.697487
4 9.701756
1 9.707156
2 9.708909
3 9.710225
1 9.712957
3 9.736432
1 9.761433
2 9.833292
1 9.834275
0 9.834818
1 9.98852
1 10.015755
2 10.018081
3 10.022214
1 10.055742
0 10.08128
1 10.083109
2 10.085369
2 10.138162
0 10.197912
2 10.352385
0 10.382444
2 10.383353
1 10.383975
3 10.385073
2 10.388765
4 10.389698
1 10.392372
2 10.394597
3 10.39593
1 10.399461
3 10.40471
2 10.404724
3 10.405523
4 10.405544
3 10.408155
3 10.412964
4 10.412993
3 10.416315
2 10.416334
5 10.416639
4 10.416687
1 10.418659
1 10.419172
2 10.419186
2 10.427455
1 10.429066
0 10.429702
1 10.520249
1 10.53064
2 10.532502
3 10.536793
0 10.559686
1 10.562084
2 10.563905
2 10.588227
0 10.616169
2 10.685603
2 10.702023
0 10.702556
3 10.703204
1 10.703758
1 10.707588
4 10.708449
2 10.708466
2 10.710918
3 10.711962
1 10.714287
3 10.718333
3 10.720853
4 10.720871
3 10.722483
2 10.722498
1 10.723568
1 10.724453
2 10.724464
2 10.725464
1 10.727047
0 10.727505
1 10.775821
1 10.78119
2 10.782342
3 10.786905
0 10.796217
1 10.79941
2 10.800661
2 10.813686
0 10.828909
2 10.8652
2 10.874432
0 10.874824
3 10.875073
1 10.875715
1 10.877791
2 10.880076
4 10.880929
4 10.881238
3 10.881255
2 10.882476
3 10.882982
1 10.884527
3 10.886672
3 10.889153
2 10.889163
1 10.889553
2 10.889847
2 10.890492
1 10.890492
1 10.891257
0 10.89163
1 10.918207
1 10.922017
2 10.922516
3 10.927448
0 10.930431
1 10.934452
2 10.935186
2 10.942891
0 10.952018
2 10.97243
2 10.97773
0 10.978027
3 10.97817
1 10.978684
1 10.97987
2 10.981882
2 10.983048
4 10.98457
2 10.985589
3 10.98584
1 10.986861
3 10.988099
3 10.989213
4 10.989224
2 10.98956
3 10.989748
1 10.989838
2 10.99062
1 10.99078
0 10.99109
1 11.005703
1 11.008662
2 11.00909
3 11.014275
2 11.018965
2 11.023876
0 11.029714
2 11.041309
2 11.0445
0 11.044713
3 11.04477
1 11.045183
1 11.04598
2 11.04721
3 11.047214
4 11.05157
2 11.052281
3 11.05237
1 11.053111
3 11.053898
4 11.054691
2 11.0547
1 11.055019
1 11.05567
0 11.05586
1 11.063409
3 11.071677
2 11.078
0 11.081907
2 11.08809
2 11.09006
3 11.09034
1 11.090612
1 11.091155
2 11.097879
3 11.09794
1 11.098433
3 11.098957
2 11.09936
1 11.099752
1 11.103471
3 11.111595
0 11.118668
3 11.122796
1 11.123366
2 11.130417
3 11.13046
3 11.131227
1 11.13171
1 11.132443
3 11.146774
1 11.14696
2 11.154444
3 11.15446
3 11.15502
1 11.15547
3 11.16498
1 11.16531
1 11.17301
3 11.17313
1 11.17343
3 11.17911
1 11.17951
1 11.18706
3 11.18718
1 11.18728
3 11.19037
1 11.19084
3 11.19829
1 11.19854
3 11.19942
3 11.20743
3 11.20743
1 11.20761
3 11.21286
3 11.21476
1 11.21489
3 11.21799
3 11.22083
1 11.22088
3 11.22233
3 11.22601
3 11.22601
1 11.22611
3 11.22929
3 11.23032
1 11.23034
3 11.23203
3 11.23416
1 11.23423
3 11.23721
3 11.23991
3 11.24239
3 11.24413
3 11.24636
3 11.24797
3 11.24942
3 11.2506
3 11.25204
+85
View File
@@ -0,0 +1,85 @@
0.5 0
1.5 0.007863
0.5 5.33173
1.5 5.33446
2.5 5.33797
2.5 9.290148
1.5 9.290461
0.5 11.963699
0.5 13.715649
1.5 13.720781
0.5 14.448827
0.5 16.33174
1.5 16.333123
1.5 17.60912
1.5 18.045809
2.5 18.045987
2.5 18.654858
1.5 18.655492
0.5 19.49454
0.5 20.14965
1.5 20.150478
0.5 20.701286
1.5 20.704212
2.5 20.709788
1.5 20.844687
2.5 20.844775
0.5 20.919795
1.5 20.922123
3.5 20.950644
2.5 20.950644
0.5 21.492393
0.5 21.732866
1.5 21.733779
0.5 22.04124
1.5 22.043589
1.5 22.130573
2.5 22.130647
3.5 22.187709
2.5 22.187709
4.5 22.202228
3.5 22.202228
0.5 22.473901
0.5 22.527515
1.5 22.529296
2.5 22.532398
3.5 22.536906
0.5 22.568082
1.5 22.570506
0.5 22.688269
1.5 22.688322
1.5 22.82234
2.5 22.822426
3.5 22.859718
2.5 22.859718
4.5 22.868795
3.5 22.868795
5.5 22.87093
4.5 22.87093
1.5 22.898763
0.5 23.027948
0.5 23.114045
1.5 23.116071
2.5 23.11884
0.5 23.15354
1.5 23.15359
1.5 23.22881
2.5 23.22881
2.5 23.26459
3.5 23.26459
4.5 23.27077
3.5 23.27077
5.5 23.272
4.5 23.272
1.5 23.381095
2.5 23.385288
3.5 23.53148
4.5 23.53148
1.5 24.270227
2.5 24.271872
3.5 24.274338
4.5 24.277799
0.5 24.37007
1.5 24.370757
2.5 24.371799
3.5 24.373057
+455
View File
@@ -0,0 +1,455 @@
0 0
0 1.8793402
1 1.8858075
2 1.8989349
1 2.5212633
2 2.5229867
3 2.5256821
2 2.7090093
1 2.9325119
1 3.910399
0 4.1308142
2 4.4300117
3 4.4409544
2 4.4430249
4 4.450647
0 4.5313358
1 4.5322112
2 4.5347368
1 4.5541398
2 4.6243982
1 4.6801799
2 4.6806349
3 4.681327
1 4.7352531
2 4.7385667
3 4.7435268
0 4.7631682
1 4.7690283
2 4.779784
0 4.8767178
1 4.8769583
2 4.8775482
1 5.0181663
3 5.0260581
0 5.0449709
2 5.0486175
1 5.1675384
0 5.1808379
2 5.2284401
3 5.2284828
4 5.2285408
3 5.2499356
0 5.2711689
1 5.2716479
2 5.2726253
1 5.2994568
2 5.2996693
3 5.3000005
2 5.3212843
2 5.3901915
3 5.3919635
4 5.3943154
1 5.4470569
1 5.4529201
0 5.489591
2 5.5498575
3 5.5498847
4 5.5499193
3 5.5550968
5 5.563774
4 5.563909
0 5.573793
1 5.5740388
2 5.5745474
2 5.578028
1 5.5853732
2 5.58554
3 5.5857824
1 5.6320266
1 5.670874
0 5.6892877
2 5.7236863
3 5.7237038
4 5.7237269
3 5.7258877
2 5.728086
0 5.738499
1 5.738637
2 5.738935
1 5.740713
2 5.7409208
3 5.7412196
1 5.7627623
1 5.7960483
0 5.8068067
2 5.820932
2 5.8280252
3 5.8280359
4 5.8280508
3 5.8291345
1 5.8317486
2 5.8322175
3 5.8328664
1 5.837843
2 5.838043
1 5.8501162
1 5.8746252
0 5.8814968
2 5.8829365
1 5.8838501
2 5.8850356
3 5.8862632
2 5.8954751
3 5.8954822
4 5.8954946
3 5.896097
1 5.902237
2 5.902363
1 5.909347
1 5.9205746
2 5.9211488
3 5.9221916
1 5.927213
2 5.927981
0 5.93187
2 5.941555
3 5.9415684
4 5.9415748
3 5.9419361
1 5.94639
2 5.946472
1 5.95093
1 5.955157
2 5.955361
3 5.9557312
2 5.961583
1 5.964138
0 5.967452
2 5.9744321
3 5.9744358
4 5.9744411
3 5.9746732
4 5.97631
5 5.977
1 5.977999
2 5.978067
1 5.981063
1 5.983267
2 5.983334
3 5.983513
2 5.987302
1 5.991058
0 5.993489
2 5.99869
3 5.9987003
4 5.9987027
3 5.9988562
4 6.00013
5 6.00066
1 6.001402
2 6.001449
1 6.003574
1 6.004928
2 6.004984
3 6.005109
2 6.007249
1 6.011287
0 6.013127
0 6.0162207
3 6.017082
4 6.017082
3 6.0172183
1 6.0178982
4 6.01821
5 6.01871
1 6.019222
2 6.019248
1 6.020809
2 6.0211093
1 6.021746
2 6.021782
3 6.021852
2 6.022944
1 6.026841
0 6.028301
4 6.031382
3 6.031496
4 6.03229
5 6.0327
2 6.0331
1 6.03429
1 6.034983
2 6.035011
3 6.035066
2 6.035423
1 6.039124
0 6.040265
3 6.042809
4 6.04341
5 6.04391
2 6.044111
1 6.045029
2 6.045487
1 6.045579
2 6.045618
3 6.045632
1 6.048945
0 6.049866
3 6.051928
2 6.052983
1 6.053719
2 6.053783
1 6.054132
2 6.054142
3 6.054207
1 6.056948
0 6.057693
3 6.05938
2 6.060262
2 6.060641
1 6.060851
2 6.061184
1 6.061203
3 6.06122
1 6.063522
0 6.064148
3 6.065549
2 6.06629
2 6.066397
1 6.066772
2 6.067048
1 6.067055
3 6.067082
1 6.069012
0 6.069539
3 6.070721
2 6.071271
2 6.071341
1 6.071745
1 6.071977
3 6.071992
2 6.071996
1 6.073657
0 6.074089
3 6.075088
2 6.075431
2 6.075624
1 6.07596
2 6.076165
1 6.076167
3 6.07618
1 6.077597
0 6.077956
3 6.078813
2 6.079013
2 6.07928
1 6.079563
2 6.079739
1 6.080956
0 6.081282
3 6.08202
2 6.082122
2 6.082419
1 6.082667
2 6.082817
1 6.083882
0 6.084151
3 6.084797
2 6.084832
2 6.085149
1 6.085361
2 6.085495
1 6.086434
0 6.086656
2 6.087193
3 6.08722
2 6.087531
1 6.087713
2 6.087811
1 6.088635
0 6.088845
2 6.089287
3 6.089341
2 6.089617
1 6.089779
2 6.089886
1 6.090602
0 6.090778
2 6.091138
3 6.09122
2 6.09146
1 6.091603
2 6.091687
1 6.092343
0 6.092498
2 6.092786
3 6.092879
2 6.093103
1 6.093222
2 6.093285
1 6.09386
0 6.09402
2 6.094256
3 6.094355
2 6.094555
1 6.094664
2 6.09474
1 6.095254
0 6.095369
2 6.095574
3 6.095682
2 6.09586
1 6.095956
2 6.095999
1 6.096479
0 6.096604
2 6.096762
2 6.097031
1 6.097119
2 6.097187
1 6.097602
0 6.097728
2 6.097835
2 6.098085
1 6.098165
2 6.098193
1 6.098581
2 6.098804
2 6.099041
1 6.099115
2 6.099162
1 6.099482
2 6.099688
2 6.09991
1 6.099975
2 6.100014
1 6.100329
2 6.100491
2 6.100701
1 6.10076
2 6.100787
1 6.10108
2 6.101223
2 6.101428
1 6.101476
2 6.101512
2 6.101896
2 6.102082
1 6.102133
2 6.102153
2 6.102515
2 6.102689
1 6.102734
2 6.102758
2 6.103085
2 6.103249
1 6.103289
2 6.103316
2 6.103608
2 6.103758
1 6.103798
2 6.103809
2 6.10409
2 6.104238
1 6.104273
2 6.104296
2 6.104542
2 6.104678
1 6.104712
2 6.104712
2 6.104957
2 6.105082
1 6.105117
2 6.105117
2 6.105345
2 6.105462
1 6.105494
2 6.10551
2 6.105701
2 6.105818
1 6.105847
2 6.105855
2 6.106038
2 6.106144
2 6.106167
1 6.106173
2 6.106352
2 6.106454
1 6.10648
2 6.106482
2 6.106643
2 6.106745
1 6.106768
2 6.106771
2 6.106921
2 6.107018
2 6.107034
1 6.107035
2 6.107181
2 6.107269
1 6.107288
2 6.107294
2 6.107422
2 6.107506
1 6.107525
2 6.107541
2 6.107649
2 6.107728
1 6.107747
2 6.107762
2 6.107872
2 6.107939
1 6.107956
3 6.107981
2 6.108053
2 6.108136
1 6.108155
2 6.108156
2 6.10825
2 6.108328
1 6.108342
2 6.108352
2 6.108434
2 6.108503
1 6.108518
2 6.108524
2 6.108618
2 6.108673
1 6.108687
2 6.108703
2 6.108751
2 6.108827
1 6.108843
2 6.108856
2 6.108923
2 6.108979
1 6.108993
2 6.10901
2 6.109085
2 6.109119
1 6.109135
2 6.109139
2 6.109233
2 6.109262
1 6.109272
2 6.109393
1 6.109398
2 6.109429
1 6.109521
1 6.109637
1 6.109748
1 6.109854
1 6.109954
1 6.11005
1 6.110142
1 6.110231
1 6.110314
1 6.110396
1 6.110474
1 6.110546
1 6.110618
1 6.110685
1 6.110752
1 6.110815
1 6.11088
+69
View File
@@ -0,0 +1,69 @@
0.5 0
1.5 1.692408
2.5 1.699932
0.5 3.123349
1.5 3.150984
0.5 6.467875
1.5 7.047169
2.5 7.049551
0.5 7.505138
1.5 7.514841
2.5 8.437981
3.5 8.437981
0.5 8.762908
1.5 9.016407
2.5 9.017486
0.5 9.234953
1.5 9.239519
2.5 9.675031
3.5 9.675031
3.5 9.69119
4.5 9.69119
0.5 9.850331
1.5 9.983397
2.5 9.983971
2.5 10.347483
3.5 10.347483
3.5 10.35764
4.5 10.35764
0.5 10.451978
1.5 10.53043
2.5 10.530773
2.5 10.752785
3.5 10.752785
3.5 10.75949
4.5 10.75949
0.5 10.819836
1.5 10.869934
2.5 10.870156
2.5 11.015662
3.5 11.015662
3.5 11.020278
4.5 11.020278
4.5 11.021035
5.5 11.021035
0.5 11.061142
1.5 11.095089
2.5 11.095238
2.5 11.19577
3.5 11.19577
3.5 11.199052
4.5 11.199052
1.5 11.252052
2.5 11.252161
2.5 11.32447
3.5 11.32447
4.5 11.32732
5.5 11.32732
1.5 11.36588
2.5 11.36588
1.5 11.45106
2.5 11.45106
1.5 11.51602
2.5 11.51602
2.5 11.56743
1.5 11.56743
2.5 11.60826
1.5 11.60826
2.5 11.64143
1.5 11.64143
+96
View File
@@ -0,0 +1,96 @@
0 0
0 3.7336589
1 3.8008703
2 3.9460391
1 5.4171652
1 6.3831999
0 6.6096101
0 7.23955
1 7.24831
2 7.2699
2 7.3423112
1 7.3752952
2 7.3767954
3 7.379041
1 7.427556
1 7.7568773
0 7.8217782
0 8.05846
1 8.06213
2 8.0705904
2 8.0756838
1 8.1027854
2 8.1034684
3 8.1045032
1 8.12114
2 8.132
1 8.2675178
0 8.2952422
0 8.4098055
2 8.4108897
1 8.411343
2 8.4154511
1 8.4296625
2 8.4300213
3 8.430566
1 8.4382892
2 8.44254
1 8.5155229
0 8.529959
2 8.5917433
0 8.59384
1 8.5947
2 8.59704
1 8.6046149
2 8.6048236
3 8.6051431
1 8.609355
2 8.6115
1 8.6549418
0 8.6634253
2 8.699912
0 8.70262
1 8.70316
2 8.70462
1 8.709157
2 8.7092774
3 8.7094859
1 8.712043
2 8.71329
1 8.741139
0 8.7465557
2 8.770115
1 8.7765748
2 8.7766684
3 8.776796
1 8.778484
2 8.77928
1 8.7981657
0 8.8019
2 8.817852
1 8.8225862
2 8.8226568
3 8.822755
1 8.823922
2 8.82448
1 8.83782
0 8.83995
2 8.8554386
3 8.8555123
3 8.8566
2 8.8567
1 8.8668
0 8.86834
2 8.87681
1 8.87956
1 8.88838
0 8.88872
2 8.89573
1 8.898
1 8.90437
2 8.91065
1 8.91207
1 8.9234
1 8.93265
1 8.94028
1 8.94617
+95
View File
@@ -0,0 +1,95 @@
0.50 0
0.50 5.472176
1.50 5.779964
2.50 8.58701
1.50 9.28563
0.50 10.28953
1.50 11.12005
2.50 11.139209
0.50 11.742594
1.50 11.826063
2.50 13.165783
0.50 13.303613
2.50 13.442301
3.50 13.443908
1.50 13.568937
3.50 13.605632
2.50 13.659105
1.50 13.659847
2.50 13.66896
0.50 13.910593
0.50 13.930996
1.50 13.947031
1.50 13.983581
3.50 14.232631
2.50 14.252269
1.50 14.410151
2.50 14.500411
0.50 14.628745
0.50 14.635175
3.50 14.685229
2.50 14.697802
3.50 14.725597
4.50 14.725597
1.50 14.761076
0.50 14.79057
3.50 14.800389
1.50 14.818929
2.50 14.823797
1.50 14.894869
0.50 14.954783
1.50 14.966279
2.50 15.037007
0.50 15.343228
3.50 15.370581
2.50 15.372601
3.50 15.392794
4.50 15.392794
1.50 15.45008
2.50 15.452956
0.50 15.525681
1.50 15.529577
0.50 15.764949
3.50 15.776876
2.50 15.781086
3.50 15.795168
4.50 15.795168
1.50 15.832463
2.50 15.834305
1.50 15.869572
0.50 15.87944
3.50 16.01746
0.50 16.036494
1.50 16.036719
2.50 16.045958
4.50 16.056255
3.50 16.056255
3.50 16.079089
1.50 16.081804
2.50 16.083064
0.50 16.11253
1.50 16.1448
0.50 16.221579
2.50 16.226879
3.50 16.232733
4.50 16.235246
3.50 16.235246
1.50 16.253448
2.50 16.254346
0.50 16.2743
1.50 16.28839
2.50 16.33098
0.50 16.3534
3.50 16.360176
2.50 16.361187
3.50 16.363245
4.50 16.363245
1.50 16.376672
2.50 16.377343
1.50 16.40068
3.50 16.453684
3.50 16.457943
4.50 16.457943
1.50 16.468108
2.50 16.468609
2.50 16.538222
@@ -0,0 +1,648 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CfLibs
{
public partial class CfLibsIdentifier
{
// --- 全局配置(对应 C++ 的 static 全局变量)---
private string _dataPath = ".";
private double _matchTol = 0.5;
private double _wavelengthCorr = 0.0; // 原代码未在 Identify 中使用
private int _gratingNo = 1;
private bool _enableGratingFix = true;
// --- 延迟加载的数据库 ---
private bool _dbLoaded = false;
private Dictionary<string, List<ElementLines>> _qualDb;
private SortedList<double, NistLine> _fullDb;
// --- 最近一次结果 ---
private List<SpecData> _lastSpec = new List<SpecData>();
private int _lastPeakCount = 0;
// --- 可选日志 ---
public Action<string> Log = null;
public int LastPeakCount => _lastPeakCount;
public IReadOnlyList<MatchedLine> LastMatchedLines
{
get
{
var list = new List<MatchedLine>(_lastSpec.Count);
foreach (var s in _lastSpec)
{
list.Add(new MatchedLine
{
Element = s.EleName,
WavelengthSource = s.WavelengthSource,
Wavelength = s.WaveLength,
Intensity = s.Intensity,
TransProb = s.TransPro,
UpperLevel = s.UpperLevel,
StatWeight = s.Statis,
Ionization = s.Ionization
});
}
return list;
}
}
// ---------- 配置接口 ----------
public void SetDataPath(string path) { _dataPath = string.IsNullOrEmpty(path) ? "." : path; }
public void SetMatchTolerance(double tol) { _matchTol = tol; }
public void SetWavelengthCorrection(double corr) { _wavelengthCorr = corr; }
public void SetGratingNo(int g) { _gratingNo = g; }
public void EnableGratingFix(bool enable) { _enableGratingFix = enable; }
private string GetPath(string f) => Path.Combine(_dataPath, f);
private void Print(string s) { Log?.Invoke(s); }
// =================================================================
// 定性分析主入口(对应 CF_LIBS_Identify)
// =================================================================
public int Identify(RawSpectrum spectrum, out SpectralLines outLines) =>
Identify(spectrum, null, out outLines);
/// <summary>
/// 定性分析,可指定段边界。边界索引表示下一段数据的起始位置,
/// 边界附近的点不参与寻峰,避免拼接光谱的接缝被识别成伪峰。
/// </summary>
public int Identify(
RawSpectrum spectrum,
IReadOnlyCollection<int>? segmentBoundaries,
out SpectralLines outLines)
{
outLines = null;
if (spectrum?.Points == null) return -1;
// 1. 延迟加载数据库
if (!_dbLoaded)
{
_qualDb = LoadElementDatabase(GetPath("element_lines.txt"));
_fullDb = LoadFullNistDb(GetPath("nist_full_lines.txt"));
_dbLoaded = true;
}
var spec = spectrum.Points;
// 2. 寻峰(拼接光谱的段边界处不参与寻峰)
var peaks = FindPeaks(spec, segmentBoundaries: segmentBoundaries);
_lastPeakCount = peaks.Count;
Print($"检测到 {peaks.Count} 个谱峰");
// 3. 定性粗匹配
var matches = MatchAgainstDatabase(peaks, _qualDb, _matchTol);
// ===== Step 1: 元素级粗过滤 =====
var detectedElems = new HashSet<string>();
var elemConfidence = new Dictionary<string, double>();
/*var rareElems = new HashSet<string>
{
"Pt","Ir","Au","Ag","Rh","Pd","Os","Ru","Bi","Ge","Sb","Te","Se","Ta",
"Hf","W","Mo","Tc","Sc","Y","Sr","Ba","In","Tl","Cs","La","Ce","Pr",
"Nd","Sm","Eu","Gd","Tb","Dy","Ho","Er","Tm","Yb","Lu","Ti","TiO",
"V","Co","Na","K"
};*/
var rareElems = new HashSet<string>
{
"Pt","Ir","Au","Ag","Rh","Pd","Os","Ru","Bi","Ge","Sb","Te","Se","Ta",
"Hf","W","Mo","Tc","Sc","Y","Sr","Ba","In","Tl","Cs","La","Ce","Pr",
"Nd","Sm","Eu","Gd","Tb","Dy","Ho","Er","Tm","Yb","Lu"
};
foreach (var m in matches)
{
double matchRate = m.TotalLines > 0 ? (double)m.MatchedLines / m.TotalLines : 0;
double intRatio = matchRate;
double combinedConf = matchRate * 0.7 + Math.Min(1.0, m.MatchedLines / 5.0) * 0.3;
if (combinedConf <= 0.55) continue;
if (m.MatchedLines >= 6 && intRatio <= 0.10) continue;
if (m.MatchedLines >= 7 && intRatio <= 0.08) continue;
if (combinedConf < 0.70 && m.MatchedLines < 5) continue;
bool isRare = rareElems.Contains(m.Element);
if (isRare && m.MatchedLines < 30) continue;
detectedElems.Add(m.Element);
if (!elemConfidence.ContainsKey(m.Element) || combinedConf > elemConfidence[m.Element])
elemConfidence[m.Element] = combinedConf;
}
Print($"粗过滤后元素数: {detectedElems.Count}");
// ===== Step 2: NIST 精确匹配(三层去重) =====
// --- 第一层:key = 元素 + NIST 库线波长,每条库线只匹配最强峰 ---
var bestMatch = new Dictionary<string, SpecData>();
var matchDist = new Dictionary<string, double>();
var fullKeys = _fullDb.Keys;
var fullVals = _fullDb.Values;
foreach (var p in peaks)
{
double tol = _matchTol;
int start = LowerBound(fullKeys, p.Wavelength - tol);
for (int idx = start; idx < fullKeys.Count; idx++)
{
double k = fullKeys[idx];
if (k > p.Wavelength + tol) break;
var nl = fullVals[idx];
if (!nl.HasFullParams) continue;
if (!detectedElems.Contains(nl.Element)) continue;
string key = nl.Element + nl.Wavelength.ToString("F6", CultureInfo.InvariantCulture);
double dist = Math.Abs(p.Wavelength - nl.Wavelength);
if (!bestMatch.TryGetValue(key, out var cur) || p.Intensity > cur.Intensity)
{
bestMatch[key] = new SpecData
{
EleName = nl.Element,
WavelengthSource = p.Wavelength, // 原始光谱中实际找到的峰位
WaveLength = nl.Wavelength, // 定性依据的谱线库(NIST)波长
Intensity = p.Intensity,
TransPro = nl.TransProb,
UpperLevel = nl.UpperLevel,
Statis = nl.StatWeight,
Ionization = nl.Ionization
};
matchDist[key] = dist;
}
}
}
// --- 第二层:同一峰 + 同一元素 + 同一电离态,只保留偏移最小者 ---
var dedupMap = new Dictionary<string, DedupEntry>();
foreach (var kv in bestMatch)
{
var sd = kv.Value;
double dist = matchDist[kv.Key];
string peakKey = $"{sd.EleName}_{sd.Ionization}_{sd.WavelengthSource.ToString("F3", CultureInfo.InvariantCulture)}";
if (!dedupMap.TryGetValue(peakKey, out var cur) || dist < cur.Dist)
dedupMap[peakKey] = new DedupEntry { Sd = sd, Dist = dist };
}
// --- 第三层:多元素竞争同一峰 ---
// 偏移差 < 0.02 nm 全部保留;否则按 评分 = dist / (1 + conf) 最小者胜出
var slTmp = new List<SpecData>();
var peakGroup = new Dictionary<double, List<DedupEntry>>();
foreach (var kv in dedupMap)
{
var sd = kv.Value.Sd;
if (!peakGroup.TryGetValue(sd.WavelengthSource, out var list))
{
list = new List<DedupEntry>();
peakGroup[sd.WavelengthSource] = list;
}
list.Add(kv.Value);
}
foreach (var g in peakGroup)
{
var cands = g.Value;
if (cands.Count == 1) { slTmp.Add(cands[0].Sd); continue; }
double bestScore = double.MaxValue;
int bestIdx = 0;
bool allClose = true;
double refDist = cands[0].Dist;
for (int k = 0; k < cands.Count; k++)
{
double d = cands[k].Dist;
double conf = elemConfidence.TryGetValue(cands[k].Sd.EleName, out var c) ? c : 0.0;
double score = d / (1.0 + conf);
if (Math.Abs(d - refDist) > 0.02) allClose = false;
if (score < bestScore) { bestScore = score; bestIdx = k; }
}
if (allClose) { foreach (var c in cands) slTmp.Add(c.Sd); }
else slTmp.Add(cands[bestIdx].Sd);
}
slTmp.Sort((a, b) => a.WaveLength.CompareTo(b.WaveLength)); // 按匹配到的库线波长排序
// ===== Step 2b: 元素级验证(通用 + 特异性规则) =====
{
var elemLineCount = new Dictionary<string, int>();
var elemAtomLineCount = new Dictionary<string, int>();
var elemMaxInt = new Dictionary<string, double>();
var elemTotalInt = new Dictionary<string, double>();
var elemLines = new Dictionary<string, List<SpecData>>();
double globalMaxInt = 0;
foreach (var s in slTmp)
{
Inc(elemLineCount, s.EleName);
if (!elemLines.TryGetValue(s.EleName, out var lst))
{
lst = new List<SpecData>();
elemLines[s.EleName] = lst;
}
lst.Add(s);
AddTo(elemTotalInt, s.EleName, s.Intensity);
if (s.Ionization == 0) Inc(elemAtomLineCount, s.EleName);
if (!elemMaxInt.TryGetValue(s.EleName, out var mx) || s.Intensity > mx)
elemMaxInt[s.EleName] = s.Intensity;
if (s.Intensity > globalMaxInt) globalMaxInt = s.Intensity;
}
var slClean = new List<SpecData>();
foreach (var s in slTmp)
{
string elem = s.EleName;
int nLines = elemLineCount[elem];
int nAtomLines = elemAtomLineCount.TryGetValue(elem, out var a) ? a : 0;
// 规则1:只有 1 条线 → 剔除;C 例外(> 全局 5% 保留)
if (nLines < 2)
{
if (elem == "C" && globalMaxInt > 0 &&
elemMaxInt.TryGetValue("C", out var cm) && cm > globalMaxInt * 0.05)
{
// 保留
}
else continue;
}
// 规则2:只有离子线 → 严格限定
if (nAtomLines == 0)
{
int nIonLines = nLines;
bool isTiOnly = (elem == "Ti");
if (!isTiOnly || nIonLines < 3) continue;
if (globalMaxInt > 0 && elemTotalInt[elem] < globalMaxInt * 0.02) continue;
}
// 规则3:只有 1 条原子线且强度 < 全局 3% → 剔除
if (nAtomLines == 1 && globalMaxInt > 0)
{
double atomMaxInt = 0;
foreach (var es in elemLines[elem])
if (es.Ionization == 0 && es.Intensity > atomMaxInt) atomMaxInt = es.Intensity;
if (atomMaxInt < globalMaxInt * 0.03) continue;
}
// 规则4:总强度 < 全局 2% → 剔除
if (globalMaxInt > 0 && elemTotalInt[elem] < globalMaxInt * 0.02) continue;
// 规则5:极罕见重金属要求 ≥4 条原子线;Be/Ga 要求 ≥2 条线
bool isVeryRareHeavy = elem == "Hg" || elem == "Cd" || elem == "Sb" || elem == "Zr";
if (isVeryRareHeavy && nAtomLines < 4) continue;
bool isTraceAlloy = elem == "Be" || elem == "Ga";
if (isTraceAlloy && nLines < 2) continue;
slClean.Add(s);
}
slTmp = slClean;
}
// ===== Step 3: 光栅修正 + 基线扣除(可选) =====
if (_enableGratingFix)
{
var fixLst = GetFixLst(_gratingNo);
if (fixLst.Count > 0)
{
var sortedInt = spec.Select(p => p.Intensity).OrderBy(x => x).ToList();
int noiseCount = Math.Max(1, Math.Min(sortedInt.Count, Math.Max(100, sortedInt.Count / 10)));
double baseline = 0;
for (int i = 0; i < noiseCount; i++) baseline += sortedInt[i];
baseline /= noiseCount;
FixIntensity(slTmp, fixLst, baseline);
}
}
_lastSpec = slTmp;
outLines = new SpectralLines
{
Lines = slTmp.Select(s => new MatchedLine
{
Element = s.EleName,
WavelengthSource = s.WavelengthSource,
Wavelength = s.WaveLength,
Intensity = s.Intensity,
TransProb = s.TransPro,
UpperLevel = s.UpperLevel,
StatWeight = s.Statis,
Ionization = s.Ionization
}).ToList()
};
return 0;
}
// =================================================================
// 寻峰
// =================================================================
private static List<DetectedPeak> FindPeaks(
IList<SpectrumPoint> spectrum,
double snrThreshold = 3.0,
IReadOnlyCollection<int>? segmentBoundaries = null)
{
var peaks = new List<DetectedPeak>();
int n = spectrum.Count;
if (n == 0) return peaks;
HashSet<int>? boundaries = segmentBoundaries is { Count: > 0 }
? new HashSet<int>(segmentBoundaries)
: null;
var sorted = spectrum.Select(p => p.Intensity).OrderBy(x => x).ToArray();
int noiseCount = Math.Max(1, Math.Min(n, Math.Max(100, n / 10)));
double mean = 0;
for (int i = 0; i < noiseCount; i++) mean += sorted[i];
mean /= noiseCount;
double variance = 0;
for (int i = 0; i < noiseCount; i++) variance += (sorted[i] - mean) * (sorted[i] - mean);
variance /= noiseCount;
double noiseStd = Math.Sqrt(variance);
if (noiseStd <= 1e-12) noiseStd = 1e-12;
double threshold = mean + snrThreshold * noiseStd;
for (int i = 1; i < n - 1; i++)
{
// 段边界附近(±2 个采样点)不生成峰,避免跨段比较
if (boundaries is not null && CrossesBoundary(boundaries, i))
{
continue;
}
double cur = spectrum[i].Intensity;
double left = spectrum[i - 1].Intensity;
double right = spectrum[i + 1].Intensity;
if (cur > left && cur >= right && cur > threshold)
{
const int window = 2;
bool isPeak = true;
for (int w = 1; w <= window && isPeak; w++)
{
if (i - w >= 0 && cur <= spectrum[i - w].Intensity) isPeak = false;
if (i + w < n && cur <= spectrum[i + w].Intensity) isPeak = false;
}
if (isPeak)
{
peaks.Add(new DetectedPeak
{
Wavelength = spectrum[i].Wavelength,
Intensity = cur,
Snr = (cur - mean) / noiseStd
});
}
}
}
return peaks;
}
private static bool CrossesBoundary(HashSet<int> boundaries, int index)
{
for (var offset = -2; offset <= 2; offset++)
{
if (boundaries.Contains(index + offset))
{
return true;
}
}
return false;
}
// =================================================================
// 粗匹配
// =================================================================
private static List<MatchResult> MatchAgainstDatabase(
IList<DetectedPeak> peaks,
Dictionary<string, List<ElementLines>> db,
double tolerance)
{
var dbUsed = new Dictionary<string, HashSet<double>>();
var resultMap = new Dictionary<string, MatchResult>();
foreach (var peak in peaks)
{
double wl = peak.Wavelength;
double bestWlDiff = tolerance;
string bestElement = null;
int bestIon = 0;
double bestDbWl = 0;
foreach (var kv in db)
{
foreach (var el in kv.Value)
{
string key = el.Element + (el.Ionization == 0 ? "I" : "II");
dbUsed.TryGetValue(key, out var used);
foreach (double dbWl in el.Wavelengths)
{
if (used != null && used.Contains(dbWl)) continue;
double diff = Math.Abs(wl - dbWl);
if (diff <= bestWlDiff)
{
bestWlDiff = diff;
bestElement = kv.Key;
bestIon = el.Ionization;
bestDbWl = dbWl;
}
}
}
}
if (!string.IsNullOrEmpty(bestElement))
{
string key = bestElement + (bestIon == 0 ? "I" : "II");
if (!dbUsed.TryGetValue(key, out var set))
{
set = new HashSet<double>();
dbUsed[key] = set;
}
set.Add(bestDbWl);
if (!resultMap.TryGetValue(key, out var mr))
{
mr = new MatchResult { Element = bestElement, Ionization = bestIon };
resultMap[key] = mr;
}
mr.MatchedLines++;
mr.MatchedWavelengths.Add(wl);
}
}
foreach (var kv in resultMap)
{
var mr = kv.Value;
if (db.TryGetValue(mr.Element, out var elList))
foreach (var el in elList)
if (el.Ionization == mr.Ionization) mr.TotalLines += el.Wavelengths.Count;
double matchRate = mr.TotalLines > 0
? Math.Min(1.0, (double)mr.MatchedLines / mr.TotalLines) : 0;
mr.Confidence = matchRate * 0.7 + Math.Min(1.0, mr.MatchedLines / 5.0) * 0.3;
if (mr.Confidence > 1.0) mr.Confidence = 1.0;
}
return resultMap.Values.OrderByDescending(r => r.Confidence).ToList();
}
// =================================================================
// 数据库加载
// =================================================================
private static Dictionary<string, List<ElementLines>> LoadElementDatabase(string filename)
{
var db = new Dictionary<string, List<ElementLines>>();
if (!File.Exists(filename))
{
Console.Error.WriteLine($"错误:无法打开谱线数据库文件 {filename}");
return db;
}
foreach (var raw in File.ReadLines(filename))
{
var line = raw.Trim();
if (line.Length == 0 || line[0] == '#') continue;
var parts = line.Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
if (parts.Length < 3) continue;
string element = parts[0];
string ionStr = parts[1];
int ionization = (ionStr == "II") ? 1 : 0;
var el = new ElementLines { Element = element, Ionization = ionization };
for (int i = 2; i < parts.Length; i++)
if (double.TryParse(parts[i], NumberStyles.Float, CultureInfo.InvariantCulture, out var w))
el.Wavelengths.Add(w);
if (el.Wavelengths.Count == 0) continue;
if (!db.TryGetValue(element, out var list))
{
list = new List<ElementLines>();
db[element] = list;
}
list.Add(el);
}
return db;
}
private static SortedList<double, NistLine> LoadFullNistDb(string filename)
{
var db = new SortedList<double, NistLine>();
if (!File.Exists(filename))
{
Console.Error.WriteLine($"错误:无法打开完整谱线库 {filename}");
return db;
}
foreach (var raw in File.ReadLines(filename))
{
var line = raw.Trim();
if (line.Length == 0 || line[0] == '#') continue;
var parts = line.Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
if (parts.Length < 7) continue;
try
{
var nl = new NistLine
{
Element = parts[0],
Wavelength = double.Parse(parts[1], CultureInfo.InvariantCulture),
Intensity = double.Parse(parts[2], CultureInfo.InvariantCulture),
TransProb = double.Parse(parts[3], CultureInfo.InvariantCulture),
UpperLevel = double.Parse(parts[4], CultureInfo.InvariantCulture),
StatWeight = double.Parse(parts[5], CultureInfo.InvariantCulture),
Ionization = int.Parse(parts[6], CultureInfo.InvariantCulture)
};
// 与 C++ 相同的数据库质量过滤
bool paramOk = nl.TransProb > 0 && nl.UpperLevel > 0 && nl.StatWeight > 0;
bool akiOk = nl.TransProb >= 1.0e7;
bool ekOk = nl.Ionization == 0 ? nl.UpperLevel <= 8.0 : nl.UpperLevel <= 10.0;
bool ionOk = nl.Ionization == 0 || nl.Ionization == 1;
nl.HasFullParams = paramOk && akiOk && ekOk && ionOk;
db[nl.Wavelength] = nl;
}
catch { /* 跳过坏行 */ }
}
return db;
}
// =================================================================
// 光栅修正
// =================================================================
private List<FixData> GetFixLst(int gratingNo)
{
string file = null;
switch (gratingNo)
{
case 1: file = GetPath("600c"); break;
case 2: file = GetPath("1200c"); break;
case 3: file = GetPath("2400c"); break;
default: break; // file 保持 null
}
var list = new List<FixData>();
if (file == null || !File.Exists(file)) return list;
foreach (var raw in File.ReadLines(file))
{
var parts = raw.Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
if (parts.Length < 2) continue;
if (double.TryParse(parts[0], NumberStyles.Float, CultureInfo.InvariantCulture, out var w) &&
double.TryParse(parts[1], NumberStyles.Float, CultureInfo.InvariantCulture, out var f))
list.Add(new FixData { Wavelength = w, Fix = f });
}
return list;
}
private static void FixIntensity(List<SpecData> list, List<FixData> fixLst, double baseline)
{
foreach (var item in list)
{
double v = item.Intensity - baseline;
item.Intensity = v < 0 ? 0 : v;
}
if (fixLst.Count == 0) return;
foreach (var item in list)
{
int ng = 0;
double best = double.MaxValue;
for (int j = 0; j < fixLst.Count; j++)
{
double d = Math.Abs(fixLst[j].Wavelength - item.WavelengthSource); // 按原始峰位匹配光栅曲线
if (d <= best) { best = d; ng = j; }
}
double fix = fixLst[ng].Fix;
if (fix > 1e-9) item.Intensity /= fix;
}
}
// =================================================================
// 工具函数
// =================================================================
private static int LowerBound(IList<double> keys, double key)
{
int lo = 0, hi = keys.Count;
while (lo < hi)
{
int mid = (lo + hi) >> 1;
if (keys[mid] < key) lo = mid + 1;
else hi = mid;
}
return lo;
}
private static void Inc(Dictionary<string, int> d, string k)
=> d[k] = d.TryGetValue(k, out var v) ? v + 1 : 1;
private static void AddTo(Dictionary<string, double> d, string k, double v)
=> d[k] = d.TryGetValue(k, out var cur) ? cur + v : v;
}
}
@@ -0,0 +1,416 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CfLibs
{
public partial class CfLibsIdentifier
{
// ===== 定量专用字段(与 C++ 全局变量 temprature / electroD / g_lastRsq 对应)=====
private double _temperature; // 全局等离子体温度 K
private double _electronDensity; // 全局电子密度 cm^-3
private double _lastRsq; // 最近一次 Boltzmann 拟合 R²
private double _forcedTemperature; // 强制温度(SetTemperature 用,0=自动)
private bool _enableCalibration; // 标样校正开关
private List<ElementData> _lastElem = new List<ElementData>();
// 懒加载缓存:避免每次定量都开文件
private Dictionary<string, double> _ionizationEnergies;
private Dictionary<string, double> _atomicWeights;
// ===== 对外只读属性 =====
public double Temperature => _temperature;
public double ElectronDensity => _electronDensity;
// 定量结果(对外的 MatchedLine 列表形式)
public IReadOnlyList<ElementResult> LastElements
{
get
{
var list = new List<ElementResult>(_lastElem.Count);
foreach (var e in _lastElem)
{
list.Add(new ElementResult
{
Element = e.EleName,
Abundance = e.Abundence,
RawAbundance = e.RawAbundence,
AbundanceAtom = 0,
Csa = e.Csa,
Csit = e.Csit,
Temperature = _temperature,
ElectronDensity = _electronDensity
});
}
return list;
}
}
// ===== 配置 =====
public void EnableCalibration(bool enable) => _enableCalibration = enable;
/// <summary>强制设置温度 K,0 = 使用自动计算</summary>
public void SetTemperature(double t) => _forcedTemperature = t;
// =================================================================
// Quantify 主入口(对应 CF_LIBS_Quantify)
// =================================================================
public int Quantify(SpectralLines lines, out Result outResult)
{
outResult = null;
if (lines?.Lines == null) return -1;
// 1. 对外结构 → 内部 SpecData
var spec = new List<SpecData>(lines.Lines.Count);
foreach (var l in lines.Lines)
{
spec.Add(new SpecData
{
EleName = l.Element,
WavelengthSource = l.WavelengthSource,
WaveLength = l.Wavelength,
Intensity = l.Intensity,
TransPro = l.TransProb,
UpperLevel = l.UpperLevel,
Statis = l.StatWeight,
Ionization = l.Ionization
});
}
if (spec.Count == 0) return -1;
// 2. 三步核心计算
var nameList = SpecNameLst(spec);
AverageTemperElect(spec, nameList);
var elem = CalculateConcentration(spec, nameList);
// 3. 低浓度过滤:<0.01% 归零
foreach (var e in elem)
if (e.Abundence < 0.01) e.Abundence = 0.0;
// 4. 输出
outResult = new Result
{
Status = 0,
ErrorMsg = "",
Temperature = _temperature,
ElectronDensity = _electronDensity,
Elements = new List<ElementResult>(elem.Count)
};
foreach (var e in elem)
{
outResult.Elements.Add(new ElementResult
{
Element = e.EleName,
Abundance = e.Abundence,
RawAbundance = e.RawAbundence,
AbundanceAtom = 0,
Csa = e.Csa,
Csit = e.Csit,
Temperature = _temperature,
ElectronDensity = _electronDensity
});
}
_lastElem = elem;
return 0;
}
// =================================================================
// specNameLst
// =================================================================
private static List<ElementCount> SpecNameLst(List<SpecData> specLst)
{
// 用 SortedDictionary 保证迭代顺序与 C++ std::map 一致
var count = new SortedDictionary<string, int>();
foreach (var s in specLst)
{
count.TryGetValue(s.EleName, out var c);
count[s.EleName] = c + 1;
}
var list = new List<ElementCount>(count.Count);
foreach (var kv in count)
list.Add(new ElementCount { EleName = kv.Key, Count = kv.Value });
return list;
}
// =================================================================
// averageTemperElect
// =================================================================
private void AverageTemperElect(List<SpecData> specLst, List<ElementCount> specName)
{
// ===== P0 优化:收集每个元素的 (T, R², 有效线数),R²·n 加权平均 =====
var elemTemps = new List<(double T, double R2, int N)>();
// count1 与 C++ 一致:每处理完一个元素重置为 0
int count1 = 0;
const int casee = 1;
var spect = new List<SpecData>();
foreach (var item in specName)
{
if (item.Count < 2) continue;
spect.Clear();
for (int j = 0; j < item.Count; j++)
{
while (true)
{
if (count1 >= specLst.Count) break; // 防御:C++ 里没有但加安全
if (specLst[count1].EleName == item.EleName)
{
spect.Add(specLst[count1]);
count1++;
break;
}
count1++;
}
}
CalculateElementTempne(spect, item, casee);
// _temperature / _lastRsq 已由 CalculateElementTempne 更新
double rsqNow = _lastRsq;
double tempNow = _temperature;
// 统一有效性判定:R² ≥ 0.3,温度 ∈ [3000, 25000]K
if (rsqNow >= 0.3 && tempNow >= 3000 && tempNow <= 25000)
{
elemTemps.Add((tempNow, rsqNow, item.Count));
}
count1 = 0;
}
if (elemTemps.Count == 0)
{
_temperature = 10000.0;
_electronDensity = 1.0e17;
return;
}
// ===== R² · n 加权平均(取代旧的等权 + Al 50/50 折中)=====
double sumW = 0, sumWT = 0;
foreach (var (T, R2, N) in elemTemps)
{
// 权重 = R² 贡献 + 有效谱线数贡献
double w = Math.Max(0.0, R2) * Math.Max(1, N);
sumW += w;
sumWT += w * T;
}
_temperature = sumW > 1e-12 ? sumWT / sumW : 10000.0;
// 简化 Saha:Ne ≈ 1e17·(T/1e4)^1.5
_electronDensity = 1.0e17 * Math.Pow(_temperature / 10000.0, 1.5);
// 物理范围钳位(从 [8500, 12000] 放宽到 [5000, 20000])
if (_temperature > 20000.0) _temperature = 20000.0;
if (_temperature < 5000.0) _temperature = 5000.0;
if (_electronDensity > 5.0e17) _electronDensity = 5.0e17;
if (_electronDensity < 1.0e16) _electronDensity = 1.0e16;
// 物理范围钳位
if (_temperature > 20000.0) _temperature = 20000.0;
if (_temperature < 5000.0) _temperature = 5000.0;
if (_electronDensity > 1.0e19) _electronDensity = 1.0e19;
if (_electronDensity < 1.0e15) _electronDensity = 1.0e15;
// 强制温度覆盖(若启用)
if (_forcedTemperature > 0)
{
_temperature = _forcedTemperature;
_electronDensity = 1.0e17 * Math.Pow(_temperature / 10000.0, 1.5);
}
}
// =================================================================
// calculateElementTempne — 单元素 Boltzmann 拟合 + Saha Ne
// =================================================================
private void CalculateElementTempne(List<SpecData> fixedLst, ElementCount specName, int casee)
{
const double Kb = 8.61738573e-5;
// 分原子线 / 离子线
var atomLines = new List<SpecData>();
var ionLines = new List<SpecData>();
foreach (var ln in fixedLst)
{
if (ln.Ionization == 0) atomLines.Add(ln);
else if (ln.Ionization == 1) ionLines.Add(ln);
}
// 读取电离能
double EiIon = 0.0;
var eis = LoadIonizationEnergies();
if (eis.TryGetValue(specName.EleName, out var eiVal)) EiIon = eiVal;
FitBoltzmann(atomLines, out double T_a, out double bsa_fit, out double R2_a, out int n_a, out double ekRa);
FitBoltzmann(ionLines, out double T_i, out double bsi_fit, out double R2_i, out int n_i, out double ekRi);
// 决策
const double minEkRange_a = 1.5;
const double minEkRange_i = 2.0;
const int minLines_a = 3;
const int minLines_i = 4;
bool ok_a = T_a > 5000 && T_a < 20000 && R2_a > 0.5 && ekRa >= minEkRange_a && n_a >= minLines_a;
bool ok_i = T_i > 5000 && T_i < 20000 && R2_i > 0.5 && ekRi >= minEkRange_i && n_i >= minLines_i;
double weight_a = ok_a ? R2_a * n_a * (ekRa + 0.1) : 0;
double weight_i = ok_i ? R2_i * n_i * (ekRi + 0.1) : 0;
double T_final, R2_final;
if (ok_a && ok_i)
{
T_final = (weight_a * T_a + weight_i * T_i) / (weight_a + weight_i);
R2_final = (weight_a * R2_a + weight_i * R2_i) / (weight_a + weight_i);
}
else if (ok_a) { T_final = T_a; R2_final = R2_a; }
else if (ok_i) { T_final = T_i; R2_final = R2_i; }
else
{
int n = fixedLst.Count;
T_final = 12000.0;
R2_final = n >= 3 ? 0.15 : 0.1;
if (T_final < 5000 || T_final > 25000) T_final = 12000;
}
// ===== Ne 计算 =====
double Ne_final;
if (ok_a && ok_i && EiIon > 0)
{
double u0 = CalculateU(specName.EleName, T_final, 0);
double u1 = CalculateU(specName.EleName, T_final, 1);
if (u0 <= 0 || u1 <= 0) u0 = u1 = 1.0;
double arg = bsa_fit - bsi_fit - EiIon / (Kb * T_final);
if (arg > 40) arg = 40;
if (arg < -40) arg = -40;
Ne_final = 4.83e15 * Math.Sqrt(Math.Pow(T_final, 3)) * (u1 / u0) * Math.Exp(arg);
if (Ne_final < 1e15) Ne_final = 1e15;
if (Ne_final > 1e19) Ne_final = 1e19;
}
else
{
Ne_final = 1.0e17 * Math.Pow(T_final / 10000.0, 1.5);
}
_temperature = T_final;
_electronDensity = Ne_final;
_lastRsq = R2_final;
}
// =================================================================
// fitBoltzmann — 4 轮 MAD 剔除 + 线性回归
// =================================================================
private static void FitBoltzmann(
List<SpecData> lines,
out double T_out, out double bs_out, out double R2_out,
out int n_out, out double ekRange_out)
{
int n = lines.Count;
if (n < 2)
{
T_out = 0; bs_out = 0; R2_out = 0; n_out = n; ekRange_out = 0;
return;
}
var xx = new double[n];
var yy = new double[n];
double ekMin = 1e9, ekMax = -1e9;
for (int k = 0; k < n; ++k)
{
yy[k] = Math.Log(lines[k].Intensity * lines[k].WaveLength * 1e7
/ (lines[k].Statis * lines[k].TransPro));
xx[k] = lines[k].UpperLevel;
if (xx[k] < ekMin) ekMin = xx[k];
if (xx[k] > ekMax) ekMax = xx[k];
}
ekRange_out = ekMax - ekMin;
var valid = new bool[n];
for (int k = 0; k < n; ++k) valid[k] = true;
double best_slope = 0, best_intercept = 0, best_R2 = 0;
for (int it = 0; it < 4; ++it)
{
double sx = 0, sx2 = 0, sy = 0, sxy = 0;
int nv = 0;
for (int k = 0; k < n; ++k)
{
if (!valid[k]) continue;
sx += xx[k]; sx2 += xx[k] * xx[k];
sy += yy[k]; sxy += xx[k] * yy[k]; nv++;
}
if (nv < 2) break;
double d = nv * sx2 - sx * sx;
if (Math.Abs(d) < 1e-12) break;
double slope = (nv * sxy - sx * sy) / d;
double intercept = (sy - slope * sx) / nv;
// 残差中位数 + MAD
var resid = new List<double>(nv);
for (int k = 0; k < n; ++k)
if (valid[k]) resid.Add(yy[k] - (slope * xx[k] + intercept));
resid.Sort();
int m = resid.Count;
double median_r = (m % 2 == 1) ? resid[m / 2]
: 0.5 * (resid[m / 2 - 1] + resid[m / 2]);
var absdev = new List<double>(m);
foreach (double r in resid) absdev.Add(Math.Abs(r - median_r));
absdev.Sort();
double mad = (m % 2 == 1) ? absdev[m / 2]
: 0.5 * (absdev[m / 2 - 1] + absdev[m / 2]);
if (mad < 0.1) mad = 0.1;
double thr = 2.0 * mad;
// 剔除(前 3 条不动,保守)
int removed = 0, remaining = 0;
for (int k = 0; k < n; ++k)
{
if (!valid[k]) continue;
double r = yy[k] - (slope * xx[k] + intercept);
if (Math.Abs(r - median_r) > thr && remaining > 2)
{
valid[k] = false; removed++;
}
else remaining++;
}
best_slope = slope;
best_intercept = intercept;
// R²
double meany = sy / nv;
double ss_tot = 0, ss_res = 0;
for (int k = 0; k < n; ++k)
{
if (!valid[k]) continue;
ss_tot += Math.Pow(yy[k] - meany, 2);
ss_res += Math.Pow(yy[k] - (slope * xx[k] + intercept), 2);
}
best_R2 = ss_tot > 1e-12 ? 1 - ss_res / ss_tot : 0;
if (removed == 0) break;
}
if (best_slope >= 0)
{
T_out = 0; bs_out = 0; R2_out = 0; n_out = n;
return;
}
T_out = -1 / best_slope * 11604.45; // eV → K
bs_out = best_intercept;
R2_out = best_R2;
int nv_final = 0;
foreach (bool v in valid) if (v) nv_final++;
n_out = nv_final;
}
}
}
@@ -0,0 +1,382 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CfLibs
{
public partial class CfLibsIdentifier
{
private List<ElementData> CalculateConcentration(
List<SpecData> tempneLst, List<ElementCount> elementNameLst)
{
const double Kb = 8.61738573e-5;
var elementLst = new List<ElementData>();
// ===== 第一步:残差自吸检测(P1 扩展:同时覆盖原子线 + 离子线)=====
var elementAtomLines = new Dictionary<string, List<SpecData>>();
var elementIonLines = new Dictionary<string, List<SpecData>>();
foreach (var s in tempneLst)
{
if (s.Ionization == 0)
{
if (!elementAtomLines.TryGetValue(s.EleName, out var list))
{ list = new List<SpecData>(); elementAtomLines[s.EleName] = list; }
list.Add(s);
}
else if (s.Ionization == 1)
{
if (!elementIonLines.TryGetValue(s.EleName, out var list))
{ list = new List<SpecData>(); elementIonLines[s.EleName] = list; }
list.Add(s);
}
}
var residualSelfAbsorbed = new Dictionary<string, HashSet<int>>();
// —— 原子线自吸 ——
foreach (var kv in elementAtomLines)
MarkResidualSelfAbsorbed(kv.Value, tempneLst, residualSelfAbsorbed);
// —— 离子线自吸(机制相同,离子线也会共振自吸)——
foreach (var kv in elementIonLines)
MarkResidualSelfAbsorbed(kv.Value, tempneLst, residualSelfAbsorbed);
// ===== 第二步:峰竞争检查(Cu/Sr 串色保护)=====
int nCuLines = 0, nSrLines = 0;
double cuMaxInt = 0, srMaxInt = 0, caMaxIonInt = 0;
for (int j = 0; j < tempneLst.Count; j++)
{
var s = tempneLst[j];
if (s.EleName == "Cu") { nCuLines++; if (s.Intensity > cuMaxInt) cuMaxInt = s.Intensity; }
if (s.EleName == "Sr") { nSrLines++; if (s.Intensity > srMaxInt) srMaxInt = s.Intensity; }
if (s.EleName == "Ca" && s.Ionization == 1 && s.Intensity > caMaxIonInt)
caMaxIonInt = s.Intensity;
}
var misMatchedLine = new bool[tempneLst.Count];
// Cu 串色:仅当 Cu 无其他线且共振线 > Al 最强 150% 时标记
{
double alMaxInt = 0, cuResInt = 0;
int cuNonResLines = 0;
for (int j = 0; j < tempneLst.Count; j++)
{
var s = tempneLst[j];
if (s.EleName == "Al" && s.Intensity > alMaxInt) alMaxInt = s.Intensity;
if (s.EleName == "Cu" && s.Ionization == 0)
{
double wl = s.WaveLength;
if (Math.Abs(wl - 324.75) < 0.5 || Math.Abs(wl - 327.40) < 0.5)
{ if (s.Intensity > cuResInt) cuResInt = s.Intensity; }
else cuNonResLines++;
}
}
if (cuNonResLines == 0 && alMaxInt > 0 && cuResInt > alMaxInt * 1.5)
{
for (int j = 0; j < tempneLst.Count; j++)
{
var s = tempneLst[j];
if (s.EleName == "Cu" && s.Ionization == 0)
{
double wl = s.WaveLength;
if (Math.Abs(wl - 324.75) < 0.5 || Math.Abs(wl - 327.40) < 0.5)
misMatchedLine[j] = true;
}
}
}
}
// Sr 串色:Ca 强线 > 15 倍时,全部 Sr 线标记
bool srSuspect = (caMaxIonInt > 0 && caMaxIonInt > srMaxInt * 15.0) || nSrLines == 0;
if (srSuspect)
{
for (int j = 0; j < tempneLst.Count; j++)
if (tempneLst[j].EleName == "Sr") misMatchedLine[j] = true;
}
// ===== 第三步:统一 Saha-Boltzmann 浓度计算 =====
var atomicWeightsMap = LoadAtomicWeights();
var ionizationEnergiesMap = LoadIonizationEnergies();
// 全局最强线(自吸判断参考)
double majorLineIntensity = 0;
for (int j = 0; j < tempneLst.Count; j++)
if (!misMatchedLine[j] && tempneLst[j].Intensity > majorLineIntensity)
majorLineIntensity = tempneLst[j].Intensity;
// 各元素最大强度
var elemMaxIntensity = new Dictionary<string, double>();
for (int j = 0; j < tempneLst.Count; j++)
{
if (misMatchedLine[j]) continue;
string en = tempneLst[j].EleName;
double cur = tempneLst[j].Intensity;
if (!elemMaxIntensity.TryGetValue(en, out var mx) || cur > mx)
elemMaxIntensity[en] = cur;
}
// calcNumberDensity 局部函数(captures _temperature)
double CalcNumberDensity(List<(double Ek, double LnIGA)> lines, double U)
{
if (lines.Count < 1 || U <= 0 || _temperature <= 0) return 0;
var bsArr = new List<double>();
foreach (var p in lines)
{
double bs = p.LnIGA + p.Ek / (Kb * _temperature);
if (bs > -50 && bs < 50) bsArr.Add(bs);
}
if (bsArr.Count == 0) return 0;
// ===== P1: MAD 剔除离群 bs(与 FitBoltzmann 同样的鲁棒策略,减少迭代次数到 3 轮)=====
var work = bsArr;
for (int iter = 0; iter < 3; ++iter)
{
work.Sort();
int m = work.Count;
if (m < 2) break;
double med = work[m / 2];
var ad = new List<double>(m);
foreach (double b in work) ad.Add(Math.Abs(b - med));
ad.Sort();
double mad = ad[ad.Count / 2];
if (mad < 0.1) mad = 0.1;
double thr = 2.5 * mad;
var filt = new List<double>();
foreach (double b in work) if (Math.Abs(b - med) < thr) filt.Add(b);
if (filt.Count >= 2 && filt.Count < m) work = filt;
else break;
}
// ===== P1: MAD 剔除后用均值(取代旧的中位数)=====
// 物理上所有合法点的 bs = ln(N/U) 应当一致;MAD 剔除去除自吸/噪声离群后,
// 均值比中位数利用了更多统计信息,且随谱线数增加快速收敛
double bsSum = 0;
foreach (double b in work) bsSum += b;
double bsMean = bsSum / work.Count;
double N = U * Math.Exp(bsMean);
return (N > 0 && N < 1e25) ? N : 0;
}
// 遍历每个元素
foreach (var item in elementNameLst)
{
string elemName = item.EleName;
var ed = new ElementData { EleName = elemName };
elementLst.Add(ed);
var atomLines = new List<(double Ek, double LnIGA)>();
var ionLines = new List<(double Ek, double LnIGA)>();
var atomLinesAll = new List<(double Ek, double LnIGA)>();
var ionLinesAll = new List<(double Ek, double LnIGA)>();
elemMaxIntensity.TryGetValue(elemName, out var elemMaxInt);
for (int j = 0; j < tempneLst.Count; j++)
{
if (misMatchedLine[j]) continue;
if (tempneLst[j].EleName != elemName) continue;
var s = tempneLst[j];
double Aki = s.TransPro, Ek = s.UpperLevel, g = s.Statis, wl = s.WaveLength;
double intensity = s.Intensity;
// 物理过滤:Aki 下限 + Ek 上限
if (Aki < 1.0e7) continue;
bool isLight = elemName == "C" || elemName == "B" || elemName == "N" || elemName == "O";
if (s.Ionization == 0)
{
if (isLight) { if (Ek > 11.0) continue; }
else { if (Ek > 5.5) continue; }
}
else
{
if (Ek > 8.0) continue;
}
double lnArg = intensity * wl / (Aki * g);
if (lnArg <= 0) continue;
double lnIGA = Math.Log(lnArg);
// 硬自吸判定
bool residualSA = residualSelfAbsorbed.TryGetValue(elemName, out var saSet) &&
saSet.Contains(j);
bool selfAbs = residualSA || IsSelfAbsorbedLine(elemName, wl, s.Ionization,
intensity, majorLineIntensity);
if (s.Ionization == 0)
{
atomLinesAll.Add((Ek, lnIGA));
if (!selfAbs) atomLines.Add((Ek, lnIGA));
}
else if (s.Ionization == 1)
{
ionLinesAll.Add((Ek, lnIGA));
if (!selfAbs) ionLines.Add((Ek, lnIGA));
}
}
// 全自吸退化
if (atomLines.Count == 0 && atomLinesAll.Count > 0) atomLines = atomLinesAll;
if (ionLines.Count == 0 && ionLinesAll.Count > 0) ionLines = ionLinesAll;
double u0 = CalculateU(elemName, _temperature, 0);
double u1 = CalculateU(elemName, _temperature, 1);
double Ei = ionizationEnergiesMap.TryGetValue(elemName, out var ev) ? ev : 0;
// Saha 因子
double sahaFactor = 0;
if (Ei > 0 && _temperature > 0 && _electronDensity > 0 && u0 > 0)
{
double arg = -Ei / (Kb * _temperature);
if (arg < -700) arg = -700;
if (arg > 700) arg = 700;
sahaFactor = 4.83e15 * Math.Sqrt(Math.Pow(_temperature, 3)) / _electronDensity
* (u1 / u0) * Math.Exp(arg);
if (double.IsNaN(sahaFactor) || double.IsInfinity(sahaFactor)) sahaFactor = 0;
}
double csa = 0, csit = 0;
int nAtom = atomLines.Count;
int nIon = ionLines.Count;
if (nAtom >= 1)
{
if (u0 > 0) csa = CalcNumberDensity(atomLines, u0);
}
else if (nIon >= 3 && sahaFactor > 0 && u1 > 0)
{
double N_ion = CalcNumberDensity(ionLines, u1);
if (N_ion > 0) { csit = N_ion; csa = csit / sahaFactor; }
}
// 用 Saha 反推 csit(如果还没填)
if (csit <= 0 && sahaFactor > 0 && csa > 0)
csit = csa * sahaFactor;
// 校准因子(当前全为 1.0)
double calibFactor = 1.0;
csa *= calibFactor;
csit *= calibFactor;
if (double.IsNaN(csa) || csa < 0) csa = 0;
if (double.IsNaN(csit) || csit < 0) csit = 0;
ed.Csa = csa;
ed.Csit = csit;
ed.Bsa = (csa > 0 && u0 > 0) ? Math.Log(csa / u0) : 0;
ed.Bsi = (csit > 0 && u1 > 0) ? Math.Log(csit / u1) : 0;
ed.AtomNum = nAtom;
ed.IonNum = nIon;
}
// ===== 归一化到重量百分比 =====
double sumWeighted = 0;
var weightProps = new double[elementLst.Count];
for (int i = 0; i < elementLst.Count; i++)
{
string elemName = elementLst[i].EleName;
double atomicWeight = atomicWeightsMap.TryGetValue(elemName, out var aw) ? aw : 1.0;
double effectiveCsa = elementLst[i].Csa;
bool isIonDominated = elementLst[i].Csit > elementLst[i].Csa * 3.0 && elementLst[i].Csit > 0;
if (isIonDominated || (elementLst[i].AtomNum == 0 && elementLst[i].Csit > 0))
effectiveCsa = elementLst[i].Csa + elementLst[i].Csit;
if (effectiveCsa <= 0) weightProps[i] = 0;
else
{
weightProps[i] = effectiveCsa * atomicWeight;
sumWeighted += weightProps[i];
}
}
if (sumWeighted <= 0) sumWeighted = 1.0;
for (int i = 0; i < elementLst.Count; i++)
{
elementLst[i].RawAbundence = weightProps[i] / sumWeighted * 100.0;
elementLst[i].Abundence = elementLst[i].RawAbundence;
}
// ===== P0 移除:地质硬编码系数校正 =====
// 原代码(2025-11-16 前):对含 Si/Al/Ca/Mg/K 且非合金样品,按硬编码系数对各元素乘 0.005~2.0 的修正因子。
// 这些系数仅对特定地质样品集(如硅酸盐岩石)经验拟合,破坏 CF-LIBS 无标样特性,
// 导致钢铁、陶瓷、有机物等其他样品类型的定量结果严重失真。
// 应用专属校正应通过 EnableCalibration + calibration_factors.txt 传入,保持此处物理无偏。
// ===== 标样线性校正(可选)=====
if (!_enableCalibration) return elementLst;
string calibFile = GetPath("calibration_factors.txt");
if (!File.Exists(calibFile)) return elementLst;
var linCalib = new Dictionary<string, (double A, double B)>();
foreach (var raw in File.ReadLines(calibFile))
{
if (string.IsNullOrWhiteSpace(raw) || raw[0] == '#') continue;
var parts = raw.Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
if (parts.Length < 3) continue;
string elem = parts[0];
var dllVals = new List<double>();
var stdVals = new List<double>();
for (int k = 1; k + 1 < parts.Length; k += 2)
{
if (double.TryParse(parts[k], NumberStyles.Float, CultureInfo.InvariantCulture, out var dv) &&
double.TryParse(parts[k + 1], NumberStyles.Float, CultureInfo.InvariantCulture, out var sv))
{
dllVals.Add(dv);
stdVals.Add(sv);
}
}
if (dllVals.Count < 1) continue;
double a, b;
if (dllVals.Count >= 2)
{
double sum_x = 0, sum_y = 0, sum_xy = 0, sum_xx = 0;
int nn = dllVals.Count;
for (int k = 0; k < nn; k++)
{
sum_x += dllVals[k]; sum_y += stdVals[k];
sum_xy += dllVals[k] * stdVals[k];
sum_xx += dllVals[k] * dllVals[k];
}
double denom = nn * sum_xx - sum_x * sum_x;
if (Math.Abs(denom) > 1e-12)
{
a = (nn * sum_xy - sum_x * sum_y) / denom;
b = (sum_y - a * sum_x) / nn;
}
else { a = 0; b = sum_y / nn; }
}
else
{
if (Math.Abs(dllVals[0]) > 1e-12) { a = stdVals[0] / dllVals[0]; b = 0; }
else { a = 0; b = stdVals[0]; }
}
linCalib[elem] = (a, b);
}
double sumCal = 0;
for (int i = 0; i < elementLst.Count; i++)
{
if (linCalib.TryGetValue(elementLst[i].EleName, out var lin))
{
double cal = lin.A * elementLst[i].Abundence + lin.B;
elementLst[i].Abundence = cal > 0 ? cal : 0;
}
sumCal += elementLst[i].Abundence;
}
if (sumCal > 0)
for (int i = 0; i < elementLst.Count; i++)
elementLst[i].Abundence = elementLst[i].Abundence / sumCal * 100;
return elementLst;
}
}
}
@@ -0,0 +1,330 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CfLibs
{
public partial class CfLibsIdentifier
{
// ===== 经验配分函数表(T=10000K 参考值 + 温度系数)=====
private static readonly Dictionary<string, double> ExpUI_a = new Dictionary<string, double>();
private static readonly Dictionary<string, double> ExpUI_b = new Dictionary<string, double>();
private static readonly Dictionary<string, double> ExpUI_c = new Dictionary<string, double>();
private static readonly Dictionary<string, double> ExpUII_a = new Dictionary<string, double>();
private static readonly Dictionary<string, double> ExpUII_b = new Dictionary<string, double>();
private static readonly Dictionary<string, double> ExpUII_c = new Dictionary<string, double>();
static CfLibsIdentifier()
{
ExpUI_a["Al"] = 5.85; ExpUI_b["Al"] = 0.10; ExpUI_c["Al"] = 0.000;
ExpUI_a["Cu"] = 1.97; ExpUI_b["Cu"] = 0.02; ExpUI_c["Cu"] = 0.000;
ExpUI_a["Fe"] = 26.4; ExpUI_b["Fe"] = 0.50; ExpUI_c["Fe"] = 0.020;
ExpUI_a["Mg"] = 1.10; ExpUI_b["Mg"] = 0.00; ExpUI_c["Mg"] = 0.000;
ExpUI_a["Si"] = 9.45; ExpUI_b["Si"] = 0.30; ExpUI_c["Si"] = 0.010;
ExpUI_a["Ca"] = 1.32; ExpUI_b["Ca"] = 0.01; ExpUI_c["Ca"] = 0.000;
ExpUI_a["Mn"] = 6.20; ExpUI_b["Mn"] = 0.15; ExpUI_c["Mn"] = 0.005;
ExpUI_a["Zn"] = 1.05; ExpUI_b["Zn"] = 0.00; ExpUI_c["Zn"] = 0.000;
ExpUI_a["Ni"] = 28.5; ExpUI_b["Ni"] = 0.50; ExpUI_c["Ni"] = 0.020;
ExpUI_a["Ti"] = 21.5; ExpUI_b["Ti"] = 0.50; ExpUI_c["Ti"] = 0.020;
ExpUI_a["Cr"] = 9.30; ExpUI_b["Cr"] = 0.20; ExpUI_c["Cr"] = 0.005;
ExpUI_a["Pb"] = 1.90; ExpUI_b["Pb"] = 0.02; ExpUI_c["Pb"] = 0.000;
ExpUI_a["Sn"] = 2.40; ExpUI_b["Sn"] = 0.05; ExpUI_c["Sn"] = 0.000;
ExpUI_a["Na"] = 2.05; ExpUI_b["Na"] = 0.00; ExpUI_c["Na"] = 0.000;
ExpUI_a["K"] = 2.10; ExpUI_b["K"] = 0.00; ExpUI_c["K"] = 0.000;
ExpUI_a["Sr"] = 1.55; ExpUI_b["Sr"] = 0.02; ExpUI_c["Sr"] = 0.000;
ExpUI_a["Zr"] = 25.0; ExpUI_b["Zr"] = 0.50; ExpUI_c["Zr"] = 0.020;
ExpUI_a["Sb"] = 4.60; ExpUI_b["Sb"] = 0.05; ExpUI_c["Sb"] = 0.000;
ExpUI_a["Be"] = 1.05; ExpUI_b["Be"] = 0.00; ExpUI_c["Be"] = 0.000;
ExpUI_a["C"] = 9.30; ExpUI_b["C"] = 0.10; ExpUI_c["C"] = 0.000;
ExpUII_a["Al"] = 1.00; ExpUII_b["Al"] = 0.00; ExpUII_c["Al"] = 0.000;
ExpUII_a["Cu"] = 1.10; ExpUII_b["Cu"] = 0.00; ExpUII_c["Cu"] = 0.000;
ExpUII_a["Fe"] = 31.5; ExpUII_b["Fe"] = 0.60; ExpUII_c["Fe"] = 0.020;
ExpUII_a["Mg"] = 2.05; ExpUII_b["Mg"] = 0.02; ExpUII_c["Mg"] = 0.000;
ExpUII_a["Si"] = 9.20; ExpUII_b["Si"] = 0.20; ExpUII_c["Si"] = 0.005;
ExpUII_a["Ca"] = 1.85; ExpUII_b["Ca"] = 0.02; ExpUII_c["Ca"] = 0.000;
ExpUII_a["Mn"] = 7.20; ExpUII_b["Mn"] = 0.15; ExpUII_c["Mn"] = 0.005;
ExpUII_a["Zn"] = 2.00; ExpUII_b["Zn"] = 0.02; ExpUII_c["Zn"] = 0.000;
ExpUII_a["Ni"] = 32.0; ExpUII_b["Ni"] = 0.60; ExpUII_c["Ni"] = 0.020;
ExpUII_a["Ti"] = 31.5; ExpUII_b["Ti"] = 0.70; ExpUII_c["Ti"] = 0.020;
ExpUII_a["Cr"] = 11.5; ExpUII_b["Cr"] = 0.20; ExpUII_c["Cr"] = 0.005;
ExpUII_a["Pb"] = 2.40; ExpUII_b["Pb"] = 0.02; ExpUII_c["Pb"] = 0.000;
ExpUII_a["Sn"] = 3.20; ExpUII_b["Sn"] = 0.05; ExpUII_c["Sn"] = 0.000;
ExpUII_a["Na"] = 1.00; ExpUII_b["Na"] = 0.00; ExpUII_c["Na"] = 0.000;
ExpUII_a["K"] = 1.00; ExpUII_b["K"] = 0.00; ExpUII_c["K"] = 0.000;
ExpUII_a["Sr"] = 2.10; ExpUII_b["Sr"] = 0.02; ExpUII_c["Sr"] = 0.000;
ExpUII_a["Zr"] = 28.0; ExpUII_b["Zr"] = 0.50; ExpUII_c["Zr"] = 0.020;
ExpUII_a["Sb"] = 5.00; ExpUII_b["Sb"] = 0.05; ExpUII_c["Sb"] = 0.000;
ExpUII_a["Be"] = 1.05; ExpUII_b["Be"] = 0.00; ExpUII_c["Be"] = 0.000;
ExpUII_a["C"] = 5.95; ExpUII_b["C"] = 0.05; ExpUII_c["C"] = 0.000;
}
// =================================================================
// calculateU
// =================================================================
private double CalculateU(string element, double temperature, int ionization)
{
double Tk = temperature / 1000.0;
if (ionization == 0)
{
if (ExpUI_a.TryGetValue(element, out var a) &&
ExpUI_b.TryGetValue(element, out var b) &&
ExpUI_c.TryGetValue(element, out var c))
return a + b * Tk + c * Tk * Tk;
}
else
{
if (ExpUII_a.TryGetValue(element, out var a) &&
ExpUII_b.TryGetValue(element, out var b) &&
ExpUII_c.TryGetValue(element, out var c))
return a + b * Tk + c * Tk * Tk;
}
// 兜底:从 db/*I.dat 或 *II.dat 读
string file = GetPath(element + (ionization == 0 ? "I.dat" : "II.dat"));
if (!File.Exists(file)) return 0;
var gew = new List<double>();
var gei = new List<double>();
foreach (var raw in File.ReadLines(file))
{
var parts = raw.Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
if (parts.Length < 2) continue;
if (double.TryParse(parts[0], NumberStyles.Float, CultureInfo.InvariantCulture, out var g) &&
double.TryParse(parts[1], NumberStyles.Float, CultureInfo.InvariantCulture, out var e))
{ gew.Add(g); gei.Add(e); }
}
const double Kb = 8.61738573e-5;
double U = 0;
for (int j = 0; j < gew.Count; j++)
U += (2.0 * gew[j] + 1.0) * Math.Exp(-gei[j] / (Kb * temperature));
return U;
}
// =================================================================
// isSelfAbsorbedLine — 硬编码共振线表
// =================================================================
private static bool IsSelfAbsorbedLine(string elem, double wavelength, int ionization,
double lineIntensity, double majorLineIntensity)
{
if (ionization != 0) return false;
// 痕量元素不标记(<参考线 5%)
if (majorLineIntensity > 0 && lineIntensity < 0.05 * majorLineIntensity)
return false;
if (elem == "Al")
{
if (Math.Abs(wavelength - 394.40) < 0.8 || Math.Abs(wavelength - 396.15) < 0.8) return true;
if (Math.Abs(wavelength - 308.22) < 0.5 || Math.Abs(wavelength - 309.27) < 0.5)
if (majorLineIntensity > 0 && lineIntensity > 0.30 * majorLineIntensity) return true;
}
if (elem == "Ca")
{
if (Math.Abs(wavelength - 422.67) < 0.8 || Math.Abs(wavelength - 430.25) < 0.8) return true;
if (Math.Abs(wavelength - 442.54) < 0.8) return true;
if (Math.Abs(wavelength - 393.37) < 0.8 || Math.Abs(wavelength - 396.85) < 0.8) return true;
}
if (elem == "Na")
{
if (Math.Abs(wavelength - 589.23) < 0.5 || Math.Abs(wavelength - 589.86) < 0.5) return true;
}
if (elem == "Mg")
{
if (Math.Abs(wavelength - 285.26) < 0.5) return true;
if (Math.Abs(wavelength - 279.53) < 0.5 || Math.Abs(wavelength - 280.25) < 0.5) return true;
}
if (elem == "K")
{
if (Math.Abs(wavelength - 766.5) < 0.5 || Math.Abs(wavelength - 769.9) < 0.5) return true;
}
if (elem == "Pb")
{
if (Math.Abs(wavelength - 368.34) < 0.8 || Math.Abs(wavelength - 405.78) < 0.8) return true;
}
if (elem == "Ni")
{
if (Math.Abs(wavelength - 341.48) < 0.5) return true;
}
return false;
}
// =================================================================
// detectSelfAbsorptionByResiduals
// =================================================================
private List<int> DetectSelfAbsorptionByResiduals(
List<SpecData> atomLines,
out List<double> bsValues,
out List<double> residuals,
out double rmse)
{
var result = new List<int>();
bsValues = new List<double>();
residuals = new List<double>();
rmse = 0;
if (atomLines.Count < 3) return result;
const double Kb = 8.61738573e-5;
double invKt = 1.0 / (Kb * _temperature);
foreach (var line in atomLines)
{
double arg = line.Intensity * line.WaveLength / (line.Statis * line.TransPro);
bsValues.Add(arg <= 0 ? 0 : Math.Log(arg) + line.UpperLevel * invKt);
}
double sum_x = 0, sum_x2 = 0, sum_y = 0, sum_xy = 0;
int n = 0;
for (int i = 0; i < atomLines.Count; i++)
{
if (bsValues[i] == 0) continue;
sum_x += atomLines[i].UpperLevel;
sum_x2 += atomLines[i].UpperLevel * atomLines[i].UpperLevel;
sum_y += bsValues[i];
sum_xy += atomLines[i].UpperLevel * bsValues[i];
n++;
}
if (n < 3) return result;
double denom = n * sum_x2 - sum_x * sum_x;
if (Math.Abs(denom) < 1e-12) return result;
double slope = (n * sum_xy - sum_x * sum_y) / denom;
double intercept = (sum_y - slope * sum_x) / n;
double sum_res2 = 0;
for (int i = 0; i < atomLines.Count; i++)
{
if (bsValues[i] == 0) { residuals.Add(0); continue; }
double fitted = slope * atomLines[i].UpperLevel + intercept;
double res = bsValues[i] - fitted;
residuals.Add(res);
sum_res2 += res * res;
}
rmse = Math.Sqrt(sum_res2 / n);
double threshold = -2.0 * rmse;
for (int i = 0; i < residuals.Count; i++)
if (residuals[i] < threshold && residuals[i] < 0)
result.Add(i);
return result;
}
// =================================================================
// MarkResidualSelfAbsorbed — DetectSelfAbsorptionByResiduals + 全局索引回映射
// =================================================================
private void MarkResidualSelfAbsorbed(
List<SpecData> subset,
List<SpecData> fullList,
Dictionary<string, HashSet<int>> residualSelfAbsorbed)
{
var saIdx = DetectSelfAbsorptionByResiduals(subset, out _, out _, out _);
foreach (int localIdx in saIdx)
{
if (localIdx < 0 || localIdx >= subset.Count) continue;
var sa = subset[localIdx];
// 全局回映射
for (int j = 0; j < fullList.Count; j++)
{
if (fullList[j].EleName == sa.EleName &&
fullList[j].Ionization == sa.Ionization &&
Math.Abs(fullList[j].WaveLength - sa.WaveLength) < 0.01 &&
Math.Abs(fullList[j].Intensity - sa.Intensity) < 0.01)
{
if (!residualSelfAbsorbed.TryGetValue(sa.EleName, out var set))
{
set = new HashSet<int>();
residualSelfAbsorbed[sa.EleName] = set;
}
set.Add(j);
break;
}
}
}
}
// =================================================================
// 数据加载(懒缓存)
// =================================================================
private Dictionary<string, double> LoadIonizationEnergies()
{
if (_ionizationEnergies != null) return _ionizationEnergies;
_ionizationEnergies = new Dictionary<string, double>();
string file = GetPath("ionization energy");
if (!File.Exists(file)) return _ionizationEnergies;
foreach (var raw in File.ReadLines(file))
{
var parts = raw.Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
if (parts.Length < 2) continue;
if (double.TryParse(parts[1], NumberStyles.Float, CultureInfo.InvariantCulture, out var v))
_ionizationEnergies[parts[0]] = v;
}
return _ionizationEnergies;
}
private Dictionary<string, double> LoadAtomicWeights()
{
if (_atomicWeights != null) return _atomicWeights;
_atomicWeights = new Dictionary<string, double>();
string file = GetPath("atomic weight");
if (!File.Exists(file)) return _atomicWeights;
foreach (var raw in File.ReadLines(file))
{
var parts = raw.Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
if (parts.Length < 2) continue;
if (double.TryParse(parts[1], NumberStyles.Float, CultureInfo.InvariantCulture, out var v))
_atomicWeights[parts[0]] = v;
}
return _atomicWeights;
}
// ===== 备用:Saha / CS 法(保持对外一致)=====
private double Saha(string element, double temperature, double electronDensity, double csa)
{
double Ei = LoadIonizationEnergies().TryGetValue(element, out var v) ? v : 0;
if (Ei <= 0 || electronDensity <= 0 || temperature <= 0) return 0;
double u0 = CalculateU(element, temperature, 0);
double u1 = CalculateU(element, temperature, 1);
if (u0 <= 0 || u1 <= 0) return 0;
const double Kb = 8.6173303e-5;
double expArg = -Ei / (Kb * temperature);
if (expArg < -700) return 0;
if (expArg > 700) expArg = 700;
double csit = 4.83e15 * Math.Sqrt(Math.Pow(temperature, 3)) / electronDensity
* (u1 / u0) * Math.Exp(expArg) * csa;
if (double.IsNaN(csit) || csit < 0 || csit > 1e20) return 0;
return csit;
}
private double CalculateConcentrationByIntercept(
double inten, double transpro, double upplevel, double statis,
double waveLength, double temperature)
{
const double Kb = 8.61738573e-5;
if (transpro <= 0 || statis <= 0 || temperature <= 0 || inten <= 0 || waveLength <= 0) return 0;
double arg = inten * waveLength / (transpro * statis);
if (arg <= 0) return 0;
return Math.Log(arg) + upplevel / (Kb * temperature);
}
private double CalculateConcentrationByCS(
string element, double temperature, int ionization,
double electronDensity, double bs)
{
if (bs == 0 || electronDensity <= 0 || temperature <= 0) return 0;
if (bs > 200.0) bs = 200.0;
if (bs < -200.0) return 0;
double u = CalculateU(element, temperature, ionization);
if (u <= 0) return 0;
double cs = u * Math.Exp(bs);
if (double.IsNaN(cs) || cs > 1e20) return 0;
return cs;
}
}
}
@@ -0,0 +1,147 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CfLibs
{
// ==================== 对外数据结构 ====================
public class SpectrumPoint
{
public double Wavelength;
public double Intensity;
}
public class RawSpectrum
{
public List<SpectrumPoint> Points = new List<SpectrumPoint>();
}
public class MatchedLine
{
public string Element; //元素名称
public double WavelengthSource; //原始测量波长(nm):原始光谱中实际找到的谱峰位置,用于回溯/按波长取强度
public double Wavelength; //波长(nm):定性时匹配到的谱线库(如 NIST)波长
public double Intensity; //强度
public double TransProb; //跃迁概率 A (s^-1)
public double UpperLevel; //上能级 Ek (eV)
public double StatWeight; //统计权重 g
public int Ionization; //电离状态: 0=原子线(I), 1=离子线(II)
}
public class SpectralLines
{
public List<MatchedLine> Lines = new List<MatchedLine>();
}
// ==================== 内部数据结构 ====================
internal class ElementLines
{
public string Element; //元素名称
public int Ionization; //电离状态: 0=原子线(I), 1=离子线(II)
public List<double> Wavelengths = new List<double>();
}
internal class DetectedPeak
{
public double Wavelength;
public double Intensity;
public double Snr;
}
internal class MatchResult
{
public string Element;
public int Ionization;
public int MatchedLines;
public int TotalLines;
public double Confidence;
public List<double> MatchedWavelengths = new List<double>();
public string SpeciesLabel => Element + (Ionization == 0 ? " I" : " II");
}
internal class NistLine
{
public string Element;
public double Wavelength;
public double Intensity;
public double TransProb;
public double UpperLevel;
public double StatWeight;
public int Ionization;
public bool HasFullParams;
}
internal class SpecData
{
public string EleName;
public double WavelengthSource; //原始测量波长(谱峰位置)
public double WaveLength; //匹配到的谱线库波长
public double Intensity;
public double TransPro;
public double UpperLevel;
public double Statis;
public int Ionization;
}
internal class FixData
{
public double Wavelength;
public double Fix;
}
internal class DedupEntry
{
public SpecData Sd;
public double Dist;
}
// ==================== 对外的定量结果 ====================
/// <summary>单个元素的定量结果</summary>
public class ElementResult
{
public string Element; // 元素名称
public double Abundance; // 最终重量百分比(可能含标样校正)
public double RawAbundance; // 校正前重量百分比
public double AbundanceAtom; // 原子数百分比(原C++固定为0)
public double Csa; // 原子态浓度 cm^-3
public double Csit; // 离子态浓度(Saha 修正后)cm^-3
public double Temperature; // 该元素对应温度 K
public double ElectronDensity; // 该元素对应电子密度 cm^-3
}
/// <summary>定量分析完整结果</summary>
public class Result
{
public List<ElementResult> Elements = new List<ElementResult>();
public double Temperature;
public double ElectronDensity;
public int Status;
public string ErrorMsg = "";
}
// ==================== 内部数据结构 ====================
internal class ElementCount
{
public string EleName;
public int Count;
}
internal class ElementData
{
public string EleName;
public int AtomNum;
public int IonNum;
public int AtomNumCS;
public int IonNumCS;
public double Bsa;
public double Bsi;
public double Csa;
public double Csit;
public double Abundence;
public double RawAbundence;
}
}
@@ -0,0 +1,251 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CfLibs
{
/// <summary>
/// 光谱 CSV 加载器(对应 C++ 的 readCsvSpectrumAuto 家族)
/// 自动识别 长格式 / 宽格式 / 无表头宽格式
/// </summary>
public static class SpectrumLoader
{
/// <summary>简短别名,等价于 LoadSpectrumFromCsv</summary>
public static RawSpectrum LoadCsv(string filePath)
=> LoadSpectrumFromCsv(filePath);
public static RawSpectrum LoadSpectrumFromCsv(string filePath)
{
if (string.IsNullOrEmpty(filePath) || !File.Exists(filePath))
throw new FileNotFoundException("光谱文件不存在: " + filePath);
// 1. 读第 1 行做格式探测(与 C++ 的 header 启发式一致)
string firstLine;
using (var reader = new StreamReader(filePath))
{
firstLine = reader.ReadLine();
}
if (string.IsNullOrEmpty(firstLine)) return new RawSpectrum();
int commaCount = 0;
foreach (char c in firstLine) if (c == ',') commaCount++;
char c0 = firstLine[0];
bool firstIsDigit = char.IsDigit(c0) || c0 == '.' || c0 == '-' || c0 == '+';
bool looksWide = commaCount >= 99 && !firstIsDigit;
// 2. 宽格式优先
if (looksWide)
{
var wide = ReadWideFormatCsv(filePath);
if (wide != null && wide.Points.Count > 0) return wide;
// 失败 → 回退长格式
}
// 3. 长格式
return ReadLongFormatCsv(filePath);
}
// =====================================================================
// 长格式:波长,强度(也支持 Tab/空格分隔)
// =====================================================================
private static RawSpectrum ReadLongFormatCsv(string filePath)
{
var spectrum = new RawSpectrum();
using (var reader = new StreamReader(filePath))
{
string line;
while ((line = reader.ReadLine()) != null)
{
line = line.Trim('\r', '\n', ' ', '\t');
if (line.Length == 0) continue;
char c0 = line[0];
if (!(char.IsDigit(c0) || c0 == '-' || c0 == '+' || c0 == '.')) continue;
double wl = 0, intensity = 0;
int comma = line.IndexOf(',');
int tab = line.IndexOf('\t');
int sep = comma >= 0 ? comma : tab;
bool ok = false;
if (sep >= 0)
{
ok = double.TryParse(line.Substring(0, sep),
NumberStyles.Float, CultureInfo.InvariantCulture, out wl)
&& double.TryParse(line.Substring(sep + 1),
NumberStyles.Float, CultureInfo.InvariantCulture, out intensity);
}
else
{
var parts = line.Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
if (parts.Length >= 2)
{
ok = double.TryParse(parts[0],
NumberStyles.Float, CultureInfo.InvariantCulture, out wl)
&& double.TryParse(parts[1],
NumberStyles.Float, CultureInfo.InvariantCulture, out intensity);
}
}
if (!ok) continue;
spectrum.Points.Add(new SpectrumPoint { Wavelength = wl, Intensity = intensity });
}
}
return spectrum;
}
// =====================================================================
// 宽格式:表头 = 波长列;每行 = 一张光谱(多行平均后输出单张平均光谱)
// =====================================================================
private static RawSpectrum ReadWideFormatCsv(string filePath)
{
var spectrum = new RawSpectrum();
using (var reader = new StreamReader(filePath))
{
string header = reader.ReadLine();
if (header == null) return spectrum;
header = header.TrimEnd('\r', '\n');
if (header.Length == 0) return spectrum;
var headerCols = header.Split(',');
if (headerCols.Length < 10) return spectrum;
// 扫描表头,提取能解析为波长(nm) 的列
var wavelengths = new List<double>();
int firstWlCol = -1;
for (int i = 0; i < headerCols.Length; i++)
{
string h = headerCols[i].Trim();
if (h.Length == 0) continue;
// 去 BOM
if (h.Length >= 3 &&
(byte)h[0] == 0xEF && (byte)h[1] == 0xBB && (byte)h[2] == 0xBF)
h = h.Substring(3);
if (double.TryParse(h, NumberStyles.Float, CultureInfo.InvariantCulture, out var v)
&& v > 50.0 && v < 20000.0)
{
if (firstWlCol < 0) firstWlCol = i;
wavelengths.Add(v);
}
}
// 波长列不足 50 → 不是标准宽格式,走"无表头宽格式"分支
if (wavelengths.Count < 50)
return ReadWideFormatNoHeader(filePath);
int nWl = wavelengths.Count;
var sumIntensity = new double[nWl];
int validRows = 0;
string line;
while ((line = reader.ReadLine()) != null)
{
line = line.TrimEnd('\r', '\n');
if (line.Length == 0) continue;
char c0 = line[0];
if (!(char.IsDigit(c0) || c0 == '-' || c0 == '+' || c0 == '.')) continue;
var cells = line.Split(',');
if (cells.Length < firstWlCol + nWl) continue;
for (int i = 0; i < nWl; ++i)
{
double.TryParse(cells[firstWlCol + i],
NumberStyles.Float, CultureInfo.InvariantCulture, out var val);
sumIntensity[i] += val;
}
validRows++;
}
if (validRows <= 0 || nWl <= 0) return spectrum;
double invN = 1.0 / validRows;
spectrum.Points.Capacity = nWl;
for (int i = 0; i < nWl; ++i)
{
spectrum.Points.Add(new SpectrumPoint
{
Wavelength = wavelengths[i],
Intensity = sumIntensity[i] * invN
});
}
}
return spectrum;
}
// =====================================================================
// 宽格式变体(表头无波长):前 4 行是 X/Y 元数据;
// 从第 5 行起每行:第 1 列 = 波长,后面 N 列 = 空间强度
// =====================================================================
private static RawSpectrum ReadWideFormatNoHeader(string filePath)
{
var spectrum = new RawSpectrum();
using (var reader = new StreamReader(filePath))
{
// 跳过 4 行元数据
for (int i = 0; i < 4; i++)
if (reader.ReadLine() == null) return spectrum;
var wlList = new List<double>();
var intList = new List<double>();
string line;
while ((line = reader.ReadLine()) != null)
{
line = line.TrimEnd('\r', '\n');
if (line.Length == 0) continue;
char c0 = line[0];
if (!(char.IsDigit(c0) || c0 == '-' || c0 == '+' || c0 == '.')) continue;
var cells = line.Split(',');
if (cells.Length < 2) continue;
if (!double.TryParse(cells[0], NumberStyles.Float,
CultureInfo.InvariantCulture, out var wl))
continue;
if (wl < 50.0 || wl > 20000.0) continue;
wlList.Add(wl);
double sumInt = 0;
int cnt = 0;
for (int i = 1; i < cells.Length; i++)
{
if (double.TryParse(cells[i], NumberStyles.Float,
CultureInfo.InvariantCulture, out var v))
{
sumInt += v;
cnt++;
}
}
intList.Add(cnt > 0 ? sumInt / cnt : 0);
}
if (wlList.Count >= 50)
{
spectrum.Points.Capacity = wlList.Count;
for (int i = 0; i < wlList.Count; i++)
{
spectrum.Points.Add(new SpectrumPoint
{
Wavelength = wlList[i],
Intensity = intList[i]
});
}
}
}
return spectrum;
}
}
}
+256
View File
@@ -0,0 +1,256 @@
1.5 0
0.5 0.10939764
2.5 8.9216999
1.5 8.9874369
0.5 9.0294019
1.5 9.2028319
0.5 9.2821596
2.5 10.2806324
1.5 10.3069179
0.5 10.3359336
3.5 10.4015348
2.5 10.4295833
1.5 10.4297828
2.5 10.431071
1.5 10.4748432
2.5 10.4950267
0.5 10.5000527
1.5 10.5372285
0.5 10.5689498
1.5 10.5935111
0.5 10.622835
1.5 10.6297964
0.5 10.6524665
3.5 10.9080665
2.5 10.9205333
1.5 10.933987
0.5 10.944422
4.5 11.182586
3.5 11.219066
2.5 11.251487
1.5 11.27618
0.5 11.291119
3.5 11.293652
2.5 11.298312
1.5 11.304074
2.5 11.325151
1.5 11.349327
0.5 11.352526
2.5 11.364463
1.5 11.366994
2.5 11.39499
1.5 11.4239197
0.5 11.425315
1.5 11.430623
0.5 11.481271
1.5 11.6934711
0.5 11.7126454
2.5 11.7143042
1.5 11.7367991
3.5 11.745308
2.5 11.7570681
0.5 11.7752359
2.5 11.7964297
3.5 11.8008679
1.5 11.8173987
2.5 11.8281831
0.5 11.8448208
0.5 11.8525908
1.5 11.8544213
3.5 11.8653961
1.5 11.8660978
2.5 11.8760436
1.5 11.8897826
0.5 11.9019326
1.5 11.9413309
2.5 11.9623536
1.5 11.9627638
4.5 11.9638207
0.5 11.9761415
3.5 11.9931367
0.5 12.0178107
2.5 12.0197145
1.5 12.0269731
0.5 12.0449808
3.5 12.0493146
2.5 12.055941
1.5 12.0586796
2.5 12.0684838
1.5 12.0703646
1.5 12.0860619
2.5 12.0926908
4.5 12.1091212
3.5 12.1092137
3.5 12.1100439
2.5 12.110073
1.5 12.113707
2.5 12.1137447
5.5 12.114822
4.5 12.114826
0.5 12.118096
1.5 12.118131
2.5 12.126612
1.5 12.1309589
1.5 12.1560282
0.5 12.1628919
1.5 12.196694
2.5 12.196751
4.5 12.197991
3.5 12.198027
0.5 12.198897
3.5 12.202387
2.5 12.202413
2.5 12.23524
3.5 12.236374
2.5 12.2364
1.5 12.246959
3.5 12.247819
2.5 12.253755
0.5 12.263955
1.5 12.276846
3.5 12.2992797
2.5 12.3078023
1.5 12.318409
0.5 12.3250096
0.5 12.328503
2.5 12.331938
4.5 12.3386586
0.5 12.3406951
1.5 12.340789
1.5 12.3449144
0.5 12.347135
3.5 12.3573051
1.5 12.3589788
0.5 12.3626266
2.5 12.3693958
1.5 12.376512
0.5 12.386347
0.5 12.394966
2.5 12.396994
1.5 12.4047102
3.5 12.4166233
4.5 12.4189562
3.5 12.419028
3.5 12.4194772
2.5 12.419498
1.5 12.4196186
1.5 12.421384
2.5 12.4214096
5.5 12.421812
4.5 12.421813
5.5 12.422097
4.5 12.422097
3.5 12.42215
4.5 12.42215
2.5 12.422925
3.5 12.422925
6.5 12.423378
5.5 12.423378
0.5 12.423508
1.5 12.42354
1.5 12.423921
2.5 12.423921
1.5 12.4290259
2.5 12.4293707
2.5 12.4414648
1.5 12.4607678
2.5 12.4714851
1.5 12.4857331
0.5 12.489877
1.5 12.505711
2.5 12.505768
4.5 12.5064359
3.5 12.5064787
1.5 12.507242
2.5 12.508567
3.5 12.508567
3.5 12.5087477
2.5 12.508782
5.5 12.508831
4.5 12.508831
4.5 12.509885
3.5 12.509885
0.5 12.51571
3.5 12.5211629
0.5 12.5272905
1.5 12.5280311
2.5 12.5289553
4.5 12.5386325
3.5 12.539909
4.5 12.5399632
1.5 12.5437978
3.5 12.5442464
2.5 12.544267
4.5 12.546373
3.5 12.546373
2.5 12.550093
0.5 12.550626
3.5 12.551033
2.5 12.5752465
1.5 12.579457
4.5 12.5870414
3.5 12.587094
3.5 12.587394
2.5 12.587409
1.5 12.588484
2.5 12.588489
4.5 12.588665
5.5 12.588665
1.5 12.589658
0.5 12.595886
0.5 12.596353
1.5 12.612338
3.5 12.6159261
2.5 12.622018
1.5 12.62725
2.5 12.628901
0.5 12.6315
0.5 12.639594
1.5 12.639594
2.5 12.644918
1.5 12.646433
1.5 12.64965
3.5 12.649889
2.5 12.651976
4.5 12.657958
1.5 12.659883
0.5 12.663512
3.5 12.6646793
2.5 12.666062
2.5 12.669636
1.5 12.673464
2.5 12.673501
4.5 12.673923
3.5 12.67396
2.5 12.675315
1.5 12.68294
4.5 12.688303
3.5 12.688332
3.5 12.688413
5.5 12.689274
4.5 12.689283
0.5 12.697416
0.5 12.71162
3.5 12.711636
2.5 12.711646
0.5 12.72197
3.5 12.72332
2.5 12.726523
3.5 12.732084
4.5 12.733523
1.5 12.73657
3.5 12.7394049
2.5 12.74301
2.5 12.749105
0.5 12.752471
1.5 12.752471
4.5 12.753845
4.5 12.754538
5.5 12.754553
1.5 12.774699
2.5 12.774714
4.5 12.774951
3.5 12.77498
2.5 12.782937
1.5 12.783034
0.5 12.94104
+274
View File
@@ -0,0 +1,274 @@
2 0
1 0.086293
0 0.123547
2 1.44486
0 3.456434
2 11.576102
1 11.6545
0 11.695905
2 13.375373
4 13.675065
3 13.675174
2 13.675526
1 13.675844
0 13.676017
1 13.961781
1 14.339736
2 14.853347
3 14.854698
1 14.858677
0 15.528511
2 15.626167
3 15.649377
4 15.678806
1 15.712108
2 15.714373
3 15.719258
1 15.947218
2 15.952249
3 15.960587
2 16.002263
1 16.335677
2 16.337232
0 16.337325
3 16.386264
4 16.387625
5 16.389858
4 16.662642
0 17.081522
1 17.085785
2 17.094863
2 17.187276
1 17.390103
1 17.449759
2 17.483208
3 17.525308
4 17.853486
3 17.875598
2 17.896568
0 17.999462
1 18.029936
1 18.036001
2 18.103522
1 18.142826
2 18.143296
3 18.160045
2 18.232572
3 18.241494
4 18.250504
3 18.300981
2 18.572848
1 18.591949
0 18.600221
3 18.682358
1 18.698444
2 18.724101
3 18.733276
1 18.73839
2 18.874723
2 19.001646
1 19.048308
0 19.1702
1 19.170325
2 19.170557
3 19.170879
4 19.171014
2 19.475251
1 19.547949
0 19.584337
1 19.611669
2 19.622988
1 19.679461
2 19.685043
3 19.687234
1 19.769491
2 19.771346
3 19.774341
1 19.784891
0 19.817923
1 19.837648
2 19.855484
3 19.899186
2 20.00486
2 20.04042
1 20.042863
0 20.04485
3 20.060417
2 20.074208
1 20.084395
1 20.235732
5 20.349901
4 20.349958
3 20.350011
2 20.350058
1 20.350098
2 20.359717
3 20.359729
4 20.359785
0 20.668166
2 20.913032
1 20.984072
0 21.052517
1 21.052542
2 21.052575
3 21.052638
4 21.052739
1 21.103604
1 21.141375
2 21.143903
3 21.1489
3 21.198125
2 21.20215
1 21.207813
2 21.227451
1 21.330867
2 21.331742
3 21.333172
2 21.396543
3 21.406179
4 21.417426
3 21.477139
4 21.479803
5 21.483945
4 21.526136
5 21.597136
4 21.597188
2 21.597277
1 21.597306
3 21.597608
2 21.605217
3 21.605231
4 21.605283
3 21.630382
6 21.630385
5 21.630387
4 21.630388
3 21.630406
4 21.630406
5 21.630522
1 21.670956
2 21.675245
3 21.679225
2 21.903066
1 21.939903
0 21.978431
1 21.978459
2 21.97849
3 21.978532
4 21.978586
1 21.997954
1 22.000344
2 22.004606
3 22.013239
1 22.016118
2 22.024345
3 22.029748
0 22.0315
4 22.035785
1 22.039042
2 22.046793
3 22.049696
2 22.088033
1 22.091177
0 22.092483
1 22.131737
2 22.132244
3 22.132942
2 22.136287
1 22.15872
2 22.163524
3 22.167518
3 22.238552
5 22.276289
4 22.27633
3 22.276387
2 22.276432
1 22.276463
2 22.282116
3 22.282126
4 22.282167
6 22.297783
4 22.297797
2 22.297797
3 22.297797
5 22.297799
4 22.297803
3 22.297803
5 22.297902
1 22.300922
2 22.301462
4 22.505014
3 22.577021
4 22.579571
2 22.587493
3 22.588073
5 22.588879
4 22.589861
5 22.593113
4 22.59398
3 22.596519
5 22.597037
6 22.59723
1 22.598344
2 22.598615
2 22.599008
3 22.599103
1 22.599913
4 22.603009
2 22.603994
3 22.604112
1 22.604339
2 22.605311
0 22.607259
1 22.608241
0 22.609151
1 22.611545
2 22.62101
5 22.685747
3 22.685847
1 22.685847
4 22.685847
2 22.685847
2 22.690079
3 22.690083
4 22.690107
3 22.700221
4 22.700221
6 22.700227
5 22.700233
4 22.700234
3 22.700242
5 22.700337
1 22.732377
4 22.891236
3 22.894596
2 22.894962
3 22.951198
4 22.951198
2 22.951198
5 22.951198
3 22.954356
4 22.954359
3 22.961371
3 22.961385
4 22.961385
6 22.961396
4 22.961406
5 22.961408
5 22.961494
2 23.032192
3 23.04465
1 23.045182
5 23.133046
4 23.135374
1 23.165946
2 23.168043
3 23.172666
2 23.202776
5 23.262953
1 23.320186
4 23.320566
5 23.324986
3 23.339746
2 23.410458
3 23.414216
+329
View File
@@ -0,0 +1,329 @@
4.5 0
3.5 0.101171
2.5 0.174426
1.5 0.224328
4.5 0.431815
3.5 0.513624
2.5 0.581508
1.5 0.629323
3.5 0.922741
2.5 1.049007
2.5 1.710426
1.5 1.740277
0.5 1.785283
2.5 1.882581
1.5 1.955732
0.5 2.008008
4.5 2.041759
1.5 2.042094
2.5 2.080227
3.5 2.136704
1.5 2.280016
0.5 2.327805
1.5 2.541764
0.5 2.630436
5.5 2.700434
2.5 2.717745
4.5 2.786589
1.5 2.870553
4.5 2.874478
3.5 2.877395
5.5 2.927488
4.5 2.95772
3.5 3.016053
4.5 3.053457
2.5 3.066536
1.5 3.104708
6.5 3.116824
0.5 3.128467
3.5 3.132988
5.5 3.170112
2.5 3.191345
4.5 3.215851
1.5 3.231414
3.5 3.25236
0.5 3.254646
2.5 3.279385
1.5 3.297687
2.5 3.409201
4.5 3.514439
1.5 3.529893
3.5 3.567927
5.5 3.576351
2.5 3.622368
4.5 3.628984
3.5 3.632058
1.5 3.665366
3.5 3.686692
2.5 3.713173
2.5 3.732291
1.5 3.774529
0.5 3.811603
4.5 3.930261
3.5 3.951519
3.5 3.970904
5.5 4.020881
4.5 4.025113
2.5 4.048642
3.5 4.058383
2.5 4.064414
4.5 4.071888
1.5 4.11016
3.5 4.112972
4.5 4.145997
0.5 4.14717
2.5 4.148862
3.5 4.149363
2.5 4.175091
2.5 4.208755
3.5 4.232026
1.5 4.23979
1.5 4.259157
3.5 4.395309
2.5 4.474892
2.5 4.504329
1.5 4.571933
3.5 4.915869
2.5 5.00226
1.5 5.036439
1.5 5.061998
3.5 5.088489
0.5 5.095974
2.5 5.096365
4.5 5.111343
5.5 5.148881
3.5 5.19722
2.5 5.203479
0.5 5.203604
1.5 5.205186
4.5 5.240728
2.5 5.261174
1.5 5.306111
3.5 5.307942
3.5 5.329848
0.5 5.347468
2.5 5.356074
2.5 5.361442
1.5 5.363999
4.5 5.367936
3.5 5.380743
2.5 5.384102
0.5 5.385326
1.5 5.397988
3.5 5.400159
3.5 5.436457
1.5 5.444315
2.5 5.44562
5.5 5.449361
3.5 5.451573
4.5 5.478036
2.5 5.48034
1.5 5.502582
3.5 5.504213
0.5 5.511657
2.5 5.514834
1.5 5.524204
2.5 5.525786
1.5 5.53689
4.5 5.552276
0.5 5.56163
3.5 5.59238
4.5 5.593111
5.5 5.646275
5.5 5.663102
2.5 5.664609
3.5 5.674339
2.5 5.687971
1.5 5.691455
3.5 5.693972
0.5 5.697978
3.5 5.699701
2.5 5.703624
4.5 5.707253
1.5 5.726385
4.5 5.730923
1.5 5.735511
2.5 5.744142
1.5 5.749788
1.5 5.75968
0.5 5.765532
1.5 5.77306
2.5 5.786583
1.5 5.788256
3.5 5.790909
2.5 5.795765
3.5 5.811479
2.5 5.838496
0.5 5.838557
2.5 5.843246
3.5 5.855167
1.5 5.872478
2.5 5.876098
4.5 5.892283
0.5 5.892775
1.5 5.903158
3.5 5.931299
0.5 5.939495
0.5 5.948506
0.5 5.954507
3.5 5.976237
3.5 5.978186
3.5 5.990566
1.5 5.992698
2.5 6.006261
1.5 6.018946
0.5 6.022132
2.5 6.027561
2.5 6.040333
1.5 6.044691
2.5 6.054008
0.5 6.055106
1.5 6.056824
1.5 6.078377
1.5 6.08495
4.5 6.099742
3.5 6.13524
0.5 6.1688
2.5 6.18025
1.5 6.212234
4.5 6.225346
5.5 6.245817
3.5 6.270963
4.5 6.27278
3.5 6.274991
5.5 6.286381
2.5 6.287542
4.5 6.290735
3.5 6.290735
3.5 6.291164
2.5 6.299209
4.5 6.311119
1.5 6.313909
0.5 6.316433
2.5 6.328434
3.5 6.329763
2.5 6.340475
6.5 6.340866
2.5 6.343035
4.5 6.344289
5.5 6.344802
3.5 6.346085
3.5 6.347939
1.5 6.348065
5.5 6.348456
4.5 6.356413
2.5 6.392719
1.5 6.428242
2.5 6.430215
2.5 6.445853
1.5 6.44897
1.5 6.451302
0.5 6.452279
2.5 6.455857
3.5 6.458957
5.5 6.461301
4.5 6.462206
4.5 6.466577
3.5 6.467266
0.5 6.479911
1.5 6.479971
0.5 6.491208
2.5 6.504223
3.5 6.506274
1.5 6.508943
1.5 6.512399
2.5 6.512399
0.5 6.525861
1.5 6.534309
3.5 6.536038
3.5 6.541863
2.5 6.542931
4.5 6.543324
2.5 6.545886
3.5 6.553393
4.5 6.554351
0.5 6.560738
2.5 6.56752
3.5 6.57934
4.5 6.57934
1.5 6.580451
3.5 6.58403
2.5 6.595461
4.5 6.605385
1.5 6.613723
3.5 6.617474
3.5 6.62858
5.5 6.634621
6.5 6.647795
5.5 6.653038
3.5 6.657278
3.5 6.658215
2.5 6.658465
4.5 6.661076
6.5 6.661468
4.5 6.668959
3.5 6.669001
7.5 6.673087
2.5 6.687296
4.5 6.714757
1.5 6.715647
2.5 6.727228
2.5 6.730201
5.5 6.734285
3.5 6.738826
4.5 6.739341
5.5 6.740702
3.5 6.744567
1.5 6.748043
2.5 6.750395
6.5 6.751235
3.5 6.754296
3.5 6.758958
2.5 6.764794
4.5 6.779817
4.5 6.79324
4.5 6.801888
4.5 6.803519
3.5 6.806307
2.5 6.807351
3.5 6.81074
2.5 6.812547
5.5 6.812644
1.5 6.812928
3.5 6.817844
2.5 6.826755
1.5 6.828896
3.5 6.834046
2.5 6.839666
3.5 6.846797
3.5 6.852452
2.5 6.854221
4.5 6.857933
3.5 6.858067
2.5 6.867126
1.5 6.867451
1.5 6.869605
2.5 6.87492
2.5 6.882212
3.5 6.883682
2.5 6.887984
1.5 6.890704
2.5 6.893365
1.5 6.896353
2.5 6.90402
1.5 6.908525
2.5 6.908525
1.5 6.910615
1.5 6.920663
0.5 6.921642
2.5 6.93348
1.5 6.93348
2.5 7.01075
6.5 7.18142
4.5 7.214317
3.5 7.214317
5.5 7.245764
4.5 7.274615
3.5 7.3541
3.5 7.363284
2.5 7.363284
+480
View File
@@ -0,0 +1,480 @@
4 0
3 0.1178252
2 0.1980272
5 0.4154083
4 0.4995308
3 0.5654658
2 0.6137295
1 0.6453003
4 1.2166396
3 1.3276638
2 1.4037317
2 1.4445742
2 1.6441158
1 1.661924
0 1.6853529
3 2.203386
2 2.235612
1 2.2737016
4 2.3524423
5 2.6810997
4 2.7288109
3 2.7790352
2 2.9848476
1 3.0087719
0 3.0266376
2 3.0855203
4 3.1178595
1 3.138972
0 3.2063953
6 3.3606839
5 3.4057204
3 3.4076279
1 3.4201212
4 3.459427
2 3.4854279
1 3.6288658
5 3.7898464
2 3.8682341
4 5.0455404
2 5.0549694
3 5.0684203
4 5.0892164
3 5.1223017
2 5.174871
1 5.208406
0 5.224
0 5.33
3 5.466559
5 5.6038019
4 5.6262484
3 5.699806
4 5.7430512
2 5.7594007
1 5.8007754
3 5.8321057
6 5.8369893
5 5.8701366
2 5.893882
4 5.9273736
1 5.9324927
0 5.9506952
3 5.9699556
2 5.9994021
5 6.0201831
4 6.1184099
4 6.1617273
3 6.2037164
3 6.2465376
2 6.3125717
3 6.3867072
2 6.4756605
1 6.5320621
2 6.9444138
1 7.484
2 7.507
3 7.547
3 7.5928847
2 7.5953115
1 7.6064637
4 7.6111729
0 7.6198362
1 7.741583
5 7.8490287
3 7.8536963
2 7.8565479
4 7.8742587
3 7.8837815
6 7.8850721
2 7.8873775
1 7.8934777
4 7.9092888
1 7.9182718
2 7.923
3 7.9796291
4 7.9847508
5 8.0095996
0 8.0100644
2 8.0483883
5 8.0537013
2 8.06107
1 8.0625079
4 8.0780715
3 8.080628
2 8.1096036
0 8.1224516
1 8.1404613
3 8.185145
2 8.3328859
3 8.3719115
1 8.4091524
0 8.4198825
2 8.4234083
5 8.4560957
6 8.4694985
7 8.5070792
5 8.5337642
4 8.5354972
3 8.5623404
1 8.5942222
3 8.5990778
6 8.6314692
2 8.6338904
4 8.7019493
1 8.7118631
3 8.7356213
2 8.7749653
1 8.7851548
6 8.8529235
5 8.8900339
2 8.9078233
4 8.9279672
3 8.9932071
2 9.0079636
1 9.068742
4 9.0690772
0 9.1094328
5 9.2215469
1 9.2396639
4 9.955784
3 9.986064
2 10.016513
1 10.03916
0 10.05095
5 10.163016
4 10.209254
3 10.244481
2 10.269602
1 10.28573
3 10.3044044
4 10.3401164
3 10.397663
5 10.3995252
5 10.4164308
4 10.432107
3 10.4415403
2 10.4635934
1 10.4666902
4 10.4874349
3 10.544089
3 10.5594421
4 10.5983786
2 10.6125724
2 10.626971
1 10.6473005
1 10.67923
3 10.7056269
2 10.7792047
3 10.784289
4 10.800565
2 10.847384
3 10.865098
1 10.8917
3 10.897725
2 10.96239
5 11.1500806
4 11.1832708
6 11.1961172
3 11.2161795
7 11.2413861
5 11.2450523
3 11.2519708
2 11.2785436
6 11.2795293
4 11.2886906
5 11.3230964
4 11.3263135
1 11.3270713
3 11.3332088
2 11.3352271
6 11.3598605
5 11.3627112
3 11.3653013
4 11.3964043
2 11.3977419
1 11.3981256
3 11.4013846
2 11.4121147
4 11.4215036
0 11.4419449
2 11.4458948
5 11.4510788
1 11.4565366
3 11.4568836
3 11.4710153
1 11.485877
4 11.5168198
2 11.614644
4 11.6221284
3 11.7002133
1 11.7047942
0 11.7438967
2 11.7467214
4 11.7829814
5 11.8350414
3 11.8632251
4 11.8995791
6 11.9023261
2 11.928004
5 11.9318169
3 11.9639919
4 12.0118754
2 12.0129487
5 12.0192922
4 12.0342588
1 12.0455284
3 12.0680868
3 12.0880164
2 12.104383
4 12.1138829
3 12.1464463
3 12.184989
2 12.1861142
2 12.2308571
3 12.2772287
2 12.3035918
1 12.3429443
2 12.439507
1 12.4723622
0 12.508368
5 12.5513673
4 12.57833
3 12.6489129
4 12.6924619
2 12.9455163
1 12.9671589
2 12.9782471
1 12.9784748
3 12.9979793
5 13.0565446
4 13.0673291
1 13.0717075
3 13.0808759
4 13.091629
2 13.0958498
1 13.1100593
4 13.1698343
3 13.1815466
4 13.1954973
0 13.1986381
2 13.2045799
1 13.2063802
3 13.2150086
2 13.2225658
6 13.2545435
0 13.255769
2 13.2561702
3 13.258747
5 13.2806924
3 13.2855114
1 13.2941604
2 13.3170777
3 13.3222492
6 13.3249959
2 13.3327165
5 13.3337025
4 13.3437546
5 13.3464587
3 13.3496086
6 13.3535098
2 13.3548014
4 13.364284
5 13.3929218
5 13.4172135
3 13.4235317
6 13.4333768
4 13.4385011
5 13.4491072
4 13.4492007
1 13.4523923
5 13.4647053
2 13.4808727
4 13.491943
3 13.4932084
2 13.5034412
2 13.5443375
4 13.5529709
4 13.5690875
3 13.5797696
6 13.6393133
2 13.6411043
6 13.6469664
5 13.6478779
5 13.6499232
7 13.650221
4 13.6505839
4 13.6543705
3 13.6544
7 13.6566189
8 13.6579347
3 13.658444
2 13.658482
3 13.6596618
2 13.6623449
1 13.6630325
1 13.6802113
1 13.693216
2 13.7031519
3 13.709736
2 13.724873
4 13.7282007
1 13.7448182
0 13.7453257
3 13.7479255
5 13.7531129
4 13.7532998
6 13.7538575
3 13.7541387
5 13.7549029
4 13.7551435
2 13.7585951
3 13.7593598
6 13.7598737
7 13.7605204
4 13.7614015
2 13.7617841
1 13.7622738
3 13.7629805
5 13.7639616
1 13.7640212
0 13.7656
2 13.7684357
6 13.7797245
4 13.7803321
7 13.7979594
2 13.8034673
5 13.8056503
3 13.8163448
6 13.8166365
2 13.8234492
5 13.829046
3 13.8293665
4 13.8295943
3 13.8304799
4 13.8311441
2 13.8312364
1 13.8320164
3 13.833251
6 13.8349499
5 13.8350036
2 13.8369093
0 13.8391
1 13.8394877
1 13.8499265
2 13.8696537
4 13.878856
3 13.8799938
2 13.8838785
3 13.8843177
5 13.8862945
4 13.8872013
5 13.8893291
2 13.890716
1 13.8913872
6 13.905523
5 13.912342
2 13.9296827
2 13.9390296
3 13.9625534
5 13.9857784
7 13.9879094
2 14.0000109
3 14.0061206
5 14.0094556
3 14.0339803
4 14.0416996
4 14.0443101
3 14.0543072
1 14.0636671
6 14.0641317
3 14.0750851
7 14.09795
3 14.1000498
6 14.1098416
2 14.1120687
4 14.1129981
1 14.1165729
5 14.1174101
6 14.1274147
1 14.1654347
2 14.166533
5 14.1809061
3 14.1819782
4 14.1997801
5 14.2035191
6 14.2288846
1 14.2401225
3 14.2491293
4 14.2549988
2 14.27658
4 14.318299
0 14.3555777
1 14.3757548
3 14.3985799
2 14.4296111
2 14.5577977
4 14.572513
5 14.792763
4 14.815776
4 14.903056
7 14.9033826
6 14.9033891
6 14.9034433
5 14.9034508
5 14.9040781
4 14.9041116
7 14.9042105
8 14.9042189
4 14.90492
3 14.9049535
3 14.9057894
2 14.9058023
8 14.9059843
9 14.9059859
3 14.906412
2 14.9064549
1 14.9064698
1 14.9068689
0 14.90689
6 14.962621
7 14.972371
6 14.982697
3 14.985588
6 15.0080463
5 15.0080525
5 15.0082596
4 15.0082676
7 15.0084539
6 15.0084546
4 15.0088235
3 15.0088247
2 15.0094945
3 15.0095128
7 15.0098768
8 15.0098776
2 15.0101615
1 15.0101818
1 15.010665
6 15.077949
5 15.082866
5 15.0839142
4 15.0839213
6 15.0840052
5 15.0840093
3 15.0842981
4 15.0843013
2 15.0849791
3 15.0849833
6 15.0852849
7 15.0852891
4 15.1350955
5 15.1350958
3 15.1356575
4 15.1356597
5 15.13688
6 15.1368809
3 15.137371
2 15.137378
4 15.147032
7 15.612177
6 15.61823
+482
View File
@@ -0,0 +1,482 @@
3 0
2 0.94143041
0 0.96097008
1 0.96841323
2 0.98287741
3 1.00367492
4 1.03000806
2 2.54383612
6 2.54410012
3 2.54426768
4 2.54460567
5 2.54463926
3 2.70791525
2 2.70878627
1 2.70991376
0 2.8718733
1 2.91511321
2 2.98716592
2 2.88945204
3 2.89953683
4 2.91348179
4 2.96741994
5 2.98256886
6 3.00044213
0 3.00997113
4 3.0106275
1 3.01114739
2 3.01279639
3 3.01329984
3 3.07899823
4 3.08689203
5 3.10437809
2 3.0922395
3 3.11278387
4 3.12159402
0 3.0960208
1 3.10092409
2 3.11067049
3 3.12514543
4 3.1441914
5 3.16762382
6 3.1952485
3 3.32122222
2 3.32231392
1 3.32301217
0 3.3677958
1 3.36940784
2 3.37521458
1 3.38478636
2 3.39495685
3 3.40961129
4 3.42812537
5 3.44990005
3 3.42162176
4 3.43483022
5 3.44884093
2 3.43793438
3 3.44926486
4 3.46352846
3 3.55053092
1 3.55579535
2 3.55614017
1 3.64772227
2 3.66801927
3 3.69779036
1 3.81713641
2 3.82599755
3 3.83921777
4 3.85669175
5 3.87826471
3 3.84462236
2 3.84701379
1 3.8495542
7 3.84945605
6 3.84961206
5 3.85036368
1 3.88720002
2 3.88753929
3 3.88866922
4 3.89035909
5 3.89227271
4 3.965856
6 3.97955771
2 4.096434
3 4.0989995
4 4.105515
0 4.13341695
1 4.1440211
2 4.15869016
3 4.17473729
4 4.19265376
0 4.18602051
1 4.20272341
2 4.23907327
6 4.18603657
1 4.203875
3 4.2073736
2 4.2074797
4 4.38878724
3 4.40158499
2 4.41047986
1 4.41612873
0 4.41887657
2 4.4395898
3 4.440331
4 4.446416
4 4.4473699
5 4.4490806
6 4.4552365
2 4.45075785
3 4.46766546
4 4.48973236
3 4.53188713
2 4.5326696
4 4.53505114
3 4.57449689
3 4.6129376
5 4.6163561
4 4.6176688
2 4.69694307
5 4.7780523
1 4.78541704
2 4.80198705
3 4.82438687
4 4.855053
1 5.0717494
2 5.07978877
3 5.0940418
4 5.11121666
5 5.1321332
1 5.07470722
2 5.0812183
3 5.08872636
0 5.1112177
1 5.11919757
2 5.13405965
3 5.1546553
4 5.18032401
3 5.21049734
4 5.21722109
5 5.2263677
6 5.2385978
7 5.2553504
0 5.2344046
1 5.24364403
2 5.2617345
3 5.28771
4 5.31995958
2 5.2368392
3 5.2388241
4 5.241456
2 5.23887699
3 5.23908701
4 5.23936893
5 5.23972416
2 5.27122959
3 5.27413183
4 5.27735987
5 5.28038432
6 5.28243451
2 5.3467945
4 5.46162523
3 5.46384063
2 5.46534707
1 5.4663365
0 5.46682324
1 5.47089128
2 5.47846027
3 5.4874392
4 5.4858739
5 5.493488
6 5.504033
7 5.519076
8 5.5379441
3 5.50158709
4 5.5215654
5 5.52862606
6 5.547829
1 5.5379638
2 5.56380699
3 5.59330993
1 5.60429248
2 5.60719383
3 5.61095249
4 5.61474401
5 5.61727041
6 5.62251959
5 5.62319789
4 5.62374759
3 5.64946437
4 5.65551987
5 5.66152238
6 5.66698612
7 5.67121946
3 5.6590394
1 5.6684604
0 5.6688702
2 5.67032639
2 5.69910221
3 5.70332531
4 5.71048871
2 5.6992815
1 5.71282476
2 5.71681487
3 5.72489449
0 5.7133474
1 5.74025065
2 5.74659535
3 5.74893268
4 5.75564677
1 5.75889597
2 5.7683547
3 5.78227962
4 5.80035925
5 5.82217709
2 5.78723064
1 5.7873809
3 5.78860229
5 5.79067037
4 5.79260011
3 5.80825645
4 5.81548351
5 5.82550247
3 5.8122004
2 5.82325044
1 5.82994912
2 5.83314461
3 5.8428348
4 5.85080324
6 5.85480757
5 5.85561989
3 5.83326011
4 5.8340649
5 5.83411876
1 5.8382161
5 5.89991596
6 5.90541382
7 5.91312742
3 5.9042965
4 5.912619
5 5.9256654
6 5.94407506
7 5.9686118
1 5.9053267
2 5.90557526
3 5.9061712
4 5.90661494
5 5.90722001
2 5.91387
3 5.915081
4 5.916424
1 5.91406
2 5.9141584
3 5.9143425
4 5.914619
5 5.9152672
1 5.92300658
2 5.92472075
0 5.924956
3 5.92822781
4 5.93468467
1 5.9360653
2 5.94106481
3 5.94808623
5 5.9494793
4 5.95302351
4 5.95653792
1 5.9772804
2 5.9782504
3 5.9824772
0 5.9792831
1 5.9923102
2 6.0080979
4 5.98699301
5 5.98971997
6 6.00645093
0 6.0117579
1 6.014152
2 6.0204746
3 6.03325805
4 6.05346439
3 6.0150923
4 6.02094281
5 6.048713
3 6.03010045
1 6.0553607
2 6.07862226
3 6.1137637
3 6.097279
2 6.1150956
3 6.1211766
4 6.131498
5 6.14192672
2 6.1330897
3 6.13966211
4 6.146262
5 6.15179196
6 6.1539785
1 6.13436424
2 6.147939
3 6.1642225
4 6.1822808
1 6.1482314
3 6.1759542
2 6.1493502
4 6.1521658
3 6.15583177
2 6.15615294
2 6.17720767
1 6.2015446
2 6.206343
3 6.211865
4 6.225333
5 6.2306144
1 6.21228901
2 6.2220466
3 6.23199859
3 6.22207
4 6.223615
4 6.26832991
3 6.27707782
2 6.28038382
0 6.281182
1 6.2813778
2 6.3095654
3 6.31703609
4 6.33059648
2 6.3276116
0 6.3451194
1 6.3537986
2 6.35871995
5 6.372943
2 6.388838
3 6.3890985
4 6.389445
0 6.44713
1 6.447558
2 6.448712
3 6.451111
4 6.455145
2 6.4895
3 6.4895
4 6.4895
5 6.52054088
6 6.5290667
7 6.5312088
4 6.5364442
3 6.553475
2 6.553475
4 6.553475
5 6.5569272
6 6.56061576
4 6.566621
1 6.5726134
2 6.5758067
3 6.5803074
4 6.585733
5 6.592514
1 6.589552
2 6.593194
3 6.5994881
4 6.6082029
5 6.6199388
6 6.6353642
7 6.653317
2 6.5953469
3 6.606415
4 6.6177028
5 6.649
1 6.5978632
2 6.6058511
3 6.6188592
4 6.6364022
5 6.6586967
6 6.6861469
2 6.59807
4 6.59807
3 6.59807
4 6.631232
3 6.631232
2 6.631232
2 6.638258
3 6.650619
4 6.668215
3 6.654412
2 6.654412
4 6.654412
3 6.6709339
4 6.686159
5 6.704815
3 6.672306
4 6.672306
2 6.672306
2 6.686217
4 6.686217
3 6.686217
1 6.690556
2 6.6992
3 6.71162
3 6.697266
2 6.697266
4 6.697266
3 6.70618
4 6.70618
2 6.70618
2 6.71346
4 6.71346
3 6.71346
3 6.719519
2 6.719519
4 6.719519
1 6.719715
2 6.726402
3 6.7359396
4 6.747877
5 6.761658
4 6.724621
2 6.724621
3 6.724621
2 6.72892
4 6.72892
3 6.72892
1 6.731928
2 6.7426692
3 6.7542002
4 6.766166
5 6.7770061
3 6.73264
2 6.73264
4 6.73264
6 6.7344271
7 6.7453513
8 6.7569224
3 6.735713
2 6.735713
4 6.735713
2 6.738484
4 6.738484
3 6.738484
4 6.740851
3 6.740851
2 6.740851
3 6.742948
2 6.742948
4 6.742948
2 6.744807
4 6.744807
3 6.744807
4 6.746412
3 6.746412
2 6.746412
3 6.747883
2 6.747883
4 6.747883
3 6.749221
4 6.749221
2 6.749221
2 6.750323
4 6.750323
3 6.750323
3 6.75136
2 6.75136
4 6.75136
2 6.752389
4 6.752389
3 6.752389
2 6.753236
4 6.753236
3 6.753236
3 6.754016
2 6.754016
4 6.754016
3 6.754736
2 6.754736
4 6.754736
2 6.755325
4 6.755325
3 6.755325
2 6.75605
4 6.75605
3 6.75605
+911
View File
@@ -0,0 +1,911 @@
2.5 0
0.5 1.48306753
1.5 1.4918454
2.5 1.50613167
3.5 1.52547925
4.5 1.54936313
0.5 2.42119184
1.5 2.43395929
2.5 2.45462171
3.5 2.48266102
2.5 2.54317167
5.5 2.54317575
3.5 2.54388197
4.5 2.54406515
2.5 2.70564567
0.5 2.70579641
1.5 2.70584856
3.5 3.10377922
0.5 3.103987
1.5 3.10490644
2.5 3.10539678
0.5 3.71355189
1.5 3.7576346
2.5 3.82670193
5.5 3.73728627
6.5 3.73810802
3.5 3.73895846
4.5 3.74665102
5.5 3.75653122
6.5 3.76810679
1.5 3.85378645
2.5 3.85805661
3.5 3.86441082
4.5 3.87070385
2.5 3.8870129
1.5 3.90936757
3.5 4.01158977
2.5 4.04230007
3.5 4.07122603
1.5 4.07222461
4.5 4.07340778
2.5 4.07349335
2.5 4.14330153
3.5 4.15608549
4.5 4.16821683
5.5 4.17754117
4.5 4.29368625
5.5 4.31625273
0.5 4.29719821
1.5 4.38357244
2.5 4.41001656
3.5 4.41476844
4.5 4.41511554
5.5 4.42716179
3.5 4.47601845
4.5 4.49721894
3.5 4.74482185
2.5 4.75043404
1.5 4.75632937
0.5 4.7605208
3.5 4.7744978
4.5 4.78120293
3.5 4.9201538
4.5 4.93759131
2.5 4.92738497
3.5 4.94412214
6.5 4.98442588
5.5 4.98767263
0.5 5.0108313
2.5 5.31866856
1.5 5.32965854
0.5 5.4933774
2.5 5.6698706
0.5 5.80535004
2.5 5.8322508
3.5 5.85542879
4.5 5.884855
5.5 5.92044384
2.5 5.8711931
1.5 5.8734333
1.5 6.00069531
2.5 6.01212477
3.5 6.0296068
0.5 6.04414009
1.5 6.07595062
2.5 6.16279084
2.5 6.11883508
0.5 6.13631406
1.5 6.14521522
3.5 6.15529539
4.5 6.17917153
3.5 6.28193525
2.5 6.28446409
1.5 6.39561329
2.5 6.40618983
3.5 6.42099465
4.5 6.44006951
3.5 6.48409741
4.5 6.4869745
1.5 6.5775271
2.5 6.604763
3.5 6.64136865
4.5 6.68566396
0.5 6.74696646
1.5 6.75707561
2.5 6.7727105
3.5 6.79240603
4.5 6.80270402
1.5 6.8028266
2.5 6.8046843
3.5 6.80524287
2.5 6.82198583
1.5 6.86855969
0.5 6.8967565
1.5 7.3312259
0.5 7.3803673
3.5 7.3857579
2.5 7.3866917
4.5 7.7724395
3.5 7.7740239
3.5 7.88550166
4.5 7.89856841
5.5 7.91622935
6.5 7.93877081
0.5 7.91040877
1.5 7.942637
2.5 7.99062658
3.5 8.04960718
0.5 8.06260991
2.5 8.07837506
3.5 8.09081833
4.5 8.1065708
5.5 8.1469324
4.5 8.08594026
5.5 8.11098612
6.5 8.13558834
7.5 8.15972848
3.5 8.12628369
4.5 8.14328321
0.5 8.16837812
1.5 8.18422741
2.5 8.21476628
0.5 8.21475177
1.5 8.22694129
2.5 8.27306655
1.5 8.26347131
0.5 8.29105012
2.5 8.30843838
1.5 8.3156746
3.5 8.35572275
4.5 8.36255316
3.5 8.34832435
2.5 8.34959263
4.5 8.35074076
5.5 8.35269991
1.5 8.35396781
2.5 8.35493434
5.5 8.36968826
6.5 8.37995213
0.5 8.413513
2.5 8.41453306
1.5 8.41483359
3.5 8.41547314
1.5 8.46880902
4.5 8.4900505
5.5 8.52239742
2.5 8.50324724
3.5 8.5251285
3.5 8.53547791
4.5 8.55396076
5.5 8.57603066
6.5 8.60303415
1.5 8.59807381
2.5 8.67319695
2.5 8.61416169
4.5 8.61668025
3.5 8.61765371
1.5 8.63408476
3.5 8.66692721
4.5 8.69223732
2.5 8.71817466
3.5 8.73183392
4.5 8.76309033
5.5 8.78796551
4.5 8.72776163
5.5 8.72833848
2.5 8.75134936
3.5 8.78454845
3.5 9.00726909
4.5 9.01572389
0.5 9.10129439
1.5 9.10191311
2.5 9.10491919
3.5 9.1110541
3.5 9.18900915
2.5 9.22890133
1.5 9.20872056
2.5 9.21436204
3.5 9.2273595
4.5 9.23733092
5.5 9.2271187
6.5 9.2669739
6.5 9.22741847
7.5 9.29371298
4.5 9.23134295
5.5 9.26253503
2.5 9.23482749
1.5 9.26379639
0.5 9.2889443
0.5 9.2806951
1.5 9.2969174
3.5 9.38764881
4.5 9.39923884
3.5 9.53177713
2.5 9.54525134
5.5 9.55656013
4.5 9.58028594
1.5 9.6352179
0.5 9.6431556
2.5 9.6627332
1.5 9.68433951
1.5 9.9544457
2.5 9.97082909
2.5 10.07159328
3.5 10.09630796
0.5 10.123141
1.5 10.130402
2.5 10.143877
3.5 10.163907
4.5 10.190531
0.5 10.133805
1.5 10.144892
2.5 10.161977
3.5 10.1843894
4.5 10.211592
5.5 10.242649
0.5 10.25250284
1.5 10.26138675
2.5 10.27594638
3.5 10.29581132
4.5 10.32049665
0.5 10.2725739
1.5 10.28075851
0.5 10.4406824
1.5 10.45436466
2.5 10.4761208
3.5 10.50476906
2.5 10.48963898
3.5 10.49862321
0.5 10.5989331
1.5 10.6113762
2.5 10.6351971
3.5 10.672413
3.5 10.60971501
4.5 10.65507979
1.5 10.68313174
2.5 10.7255407
1.5 10.77658285
2.5 10.7328729
3.5 10.7614868
4.5 10.7981014
5.5 10.8424719
1.5 10.73633392
2.5 10.74374802
3.5 10.75417526
4.5 10.76765681
5.5 10.78415504
6.5 10.80361379
1.5 10.74542744
2.5 10.74837826
3.5 10.75960269
0.5 10.84285028
1.5 10.84496493
2.5 10.85045206
3.5 10.85951122
4.5 10.87186544
0.5 10.8603419
1.5 10.86922424
2.5 10.88073685
3.5 10.89306168
4.5 10.90422831
5.5 10.9107753
1.5 10.8645781
2.5 10.8816692
3.5 10.9002769
4.5 10.9197142
1.5 10.9855268
2.5 11.054991
2.5 11.04152993
3.5 11.05616583
4.5 11.07492299
5.5 11.09763941
0.5 11.06614383
1.5 11.06905148
2.5 11.07635269
1.5 11.0869551
2.5 11.090762
0.5 11.0975725
0.5 11.1153843
1.5 11.12437976
2.5 11.13531826
3.5 11.14432071
3.5 11.1856565
2.5 11.1905887
1.5 11.2144475
0.5 11.2175154
1.5 11.1910764
2.5 11.2133482
3.5 11.2193091
4.5 11.23154915
1.5 11.22212102
2.5 11.2340789
3.5 11.24856702
4.5 11.2640838
2.5 11.2462128
3.5 11.2615831
2.5 11.29232
3.5 11.2977927
4.5 11.30605275
5.5 11.3187611
2.5 11.3353837
1.5 11.3515417
3.5 11.3758199
4.5 11.42442
2.5 11.40100828
1.5 11.4356753
2.5 11.45836605
3.5 11.48754091
1.5 11.4824494
0.5 11.52914317
1.5 11.53639324
2.5 11.54836587
3.5 11.56485355
4.5 11.58559691
5.5 11.61029927
3.5 11.59645159
2.5 11.6137219
1.5 11.6259952
0.5 11.629777
1.5 11.60174908
2.5 11.62675759
3.5 11.65035196
4.5 11.67647973
4.5 11.6100641
3.5 11.6299085
1.5 11.6223085
2.5 11.65129356
2.5 11.6409611
3.5 11.6816216
0.5 11.65063152
1.5 11.6666785
2.5 11.68748141
3.5 11.710633
4.5 11.73587488
1.5 11.6548236
2.5 11.67241803
3.5 11.69958125
1.5 11.6862612
2.5 11.69979282
3.5 11.71927229
4.5 11.74740722
1.5 11.7020191
0.5 11.7319671
0.5 11.75856802
1.5 11.77018461
2.5 11.78800953
3.5 11.80957822
0.5 11.932899
2.5 12.0352657
3.5 12.0496645
4.5 12.0677693
5.5 12.0876558
0.5 12.047355
2.5 12.0491006
1.5 12.062925
4.5 12.0859974
5.5 12.137973
3.5 12.1167554
4.5 12.1385918
2.5 12.1349549
2.5 12.1761668
1.5 12.1895077
1.5 12.222175
2.5 12.230031
3.5 12.239637
4.5 12.251193
3.5 12.2830228
2.5 12.3046796
0.5 12.3584782
1.5 12.4034002
2.5 12.479066
3.5 12.40695698
4.5 12.41525395
5.5 12.42589371
6.5 12.43835204
1.5 12.484194
2.5 12.5316429
3.5 12.5861551
0.5 12.4954769
1.5 12.5835057
4.5 12.52510637
5.5 12.54655404
1.5 12.5419641
3.5 12.543522
4.5 12.55917
5.5 12.619479
6.5 12.634062
1.5 12.5527804
2.5 12.5566913
3.5 12.5623035
4.5 12.5698823
4.5 12.608716
5.5 12.6379854
3.5 12.629547
2.5 12.664444
4.5 12.638709
3.5 12.661513
1.5 12.64477353
2.5 12.68322
3.5 12.707454
4.5 12.7363439
2.5 12.6648256
3.5 12.676535
1.5 12.7210653
0.5 12.723212
2.5 12.727711
3.5 12.749492
2.5 12.7305733
3.5 12.7598271
4.5 12.7951445
5.5 12.8340439
1.5 12.731242
3.5 12.83576423
4.5 12.8481149
5.5 12.86174868
1.5 12.8504277
2.5 12.8679681
3.5 12.8987794
4.5 12.94360659
4.5 12.86403065
5.5 12.87492954
6.5 12.88793993
7.5 12.9030239
3.5 12.8880676
4.5 12.89732686
5.5 12.90755797
6.5 12.9179768
0.5 12.9072522
1.5 12.9135498
2.5 12.9352775
3.5 12.97174295
1.5 12.928401
2.5 12.9523562
3.5 12.978762
3.5 12.94169521
4.5 12.95929076
1.5 12.9435378
0.5 12.9769717
0.5 12.9488642
1.5 12.9707617
2.5 13.0021122
3.5 13.04397
1.5 12.9497444
2.5 12.9724782
3.5 13.0028801
4.5 13.0435662
5.5 12.95141029
6.5 12.96130561
7.5 12.97285006
8.5 12.98542395
3.5 12.9616938
4.5 12.9769736
2.5 13.0005464
1.5 13.0030719
3.5 13.0095793
4.5 13.02601599
2.5 13.0074299
1.5 13.0244908
2.5 13.0150198
3.5 13.0646788
0.5 13.03060124
1.5 13.03926559
2.5 13.0537146
3.5 13.07376089
4.5 13.09899556
2.5 13.03347178
3.5 13.0398421
6.5 13.03381838
7.5 13.053728
2.5 13.03873244
3.5 13.04280153
3.5 13.04301233
4.5 13.0499945
5.5 13.06023669
6.5 13.07219371
2.5 13.0490346
3.5 13.0529296
4.5 13.06365737
5.5 13.07082835
4.5 13.05100149
3.5 13.05336397
1.5 13.05348265
2.5 13.0544392
4.5 13.0601522
5.5 13.07418492
5.5 13.06394541
4.5 13.0687909
0.5 13.0669929
1.5 13.06902286
4.5 13.06770432
3.5 13.07041087
1.5 13.072271
2.5 13.0932562
2.5 13.0726815
3.5 13.08126527
1.5 13.07450088
2.5 13.08431443
6.5 13.08131846
5.5 13.08770716
0.5 13.0835263
1.5 13.08989631
0.5 13.08587099
0.5 13.0870887
1.5 13.09762298
2.5 13.10905203
3.5 13.11563566
2.5 13.09214489
1.5 13.09400772
3.5 13.09389303
2.5 13.10233868
4.5 13.09564738
3.5 13.10818617
5.5 13.09753212
4.5 13.12624882
0.5 13.1027474
1.5 13.10476447
7.5 13.10297569
6.5 13.11040496
2.5 13.11317688
1.5 13.1178658
4.5 13.11628215
3.5 13.14053251
2.5 13.1183986
1.5 13.11933013
3.5 13.12576055
4.5 13.13744612
3.5 13.120475
2.5 13.13029372
6.5 13.12936859
5.5 13.14630916
5.5 13.12968032
4.5 13.14796148
2.5 13.13283272
3.5 13.1461574
4.5 13.16076576
5.5 13.1787066
0.5 13.1328328
1.5 13.13990088
2.5 13.15417899
3.5 13.1764423
5.5 13.16033129
6.5 13.18483856
5.5 13.162539
4.5 13.1628247
1.5 13.1924654
0.5 13.2060902
2.5 13.2087173
3.5 13.2279463
1.5 13.2200833
2.5 13.2319106
2.5 13.231499
3.5 13.2389254
4.5 13.240515
5.5 13.2449032
1.5 13.2323479
3.5 13.2495422
4.5 13.25688718
1.5 13.25107932
2.5 13.25755306
3.5 13.26708406
4.5 13.28016567
5.5 13.29690744
6.5 13.31739433
1.5 13.25698455
2.5 13.2690544
3.5 13.285282
2.5 13.26943934
1.5 13.27331091
3.5 13.28053342
4.5 13.28498656
5.5 13.30711817
1.5 13.292638
2.5 13.3103818
1.5 13.29852227
2.5 13.30466024
3.5 13.31418665
4.5 13.32278154
5.5 13.35325668
2.5 13.3001995
3.5 13.34046106
0.5 13.30626568
1.5 13.31771606
2.5 13.33070374
3.5 13.34408948
4.5 13.35263376
2.5 13.31599951
3.5 13.32834401
4.5 13.34469473
5.5 13.36476458
1.5 13.33037288
2.5 13.3564177
3.5 13.37176417
4.5 13.38384564
2.5 13.34040298
3.5 13.35511449
4.5 13.35393387
5.5 13.36062446
6.5 13.37128216
7.5 13.38802613
4.5 13.3579617
3.5 13.3801934
3.5 13.3691549
4.5 13.38067904
5.5 13.39252275
6.5 13.40318192
5.5 13.371714
6.5 13.394122
2.5 13.3888361
2.5 13.4560709
5.5 13.4855783
6.5 13.5431278
6.5 13.5053679
5.5 13.5312726
3.5 13.5257261
4.5 13.527875
5.5 13.5391727
2.5 13.5564974
1.5 13.5653107
2.5 13.5631797
1.5 13.5696097
2.5 13.5710509
0.5 13.5745353
0.5 13.5843156
1.5 13.5900524
2.5 13.6003606
3.5 13.6149517
4.5 13.6340017
5.5 13.6573522
1.5 13.5962732
2.5 13.6350348
0.5 13.5998411
1.5 13.6210866
2.5 13.6355442
3.5 13.647096
1.5 13.6030051
2.5 13.6091299
3.5 13.618806
4.5 13.6437123
1.5 13.6100289
2.5 13.6215086
3.5 13.6502935
1.5 13.6276573
2.5 13.63124
0.5 13.6287628
1.5 13.639192
2.5 13.6553952
3.5 13.6719947
4.5 13.6860863
2.5 13.6748771
3.5 13.6799478
4.5 13.6843264
5.5 13.6850066
2.5 13.6773176
3.5 13.696695
4.5 13.7207692
1.5 13.7537711
2.5 13.7724502
3.5 13.7956161
5.5 13.951836
4.5 13.953049
6.5 13.9930277
3.5 14.0006471
4.5 14.0080358
4.5 14.0172634
4.5 14.0309683
3.5 14.0851444
4.5 14.0917773
1.5 14.0982029
2.5 14.0982112
0.5 14.0983414
3.5 14.1338258
2.5 14.1393044
0.5 14.1397133
1.5 14.1403515
0.5 14.2768392
1.5 14.3044036
5.5 14.282908
6.5 14.3097816
2.5 14.2840105
3.5 14.2890846
3.5 14.2852675
0.5 14.2872503
1.5 14.2956324
2.5 14.3099827
3.5 14.3302843
4.5 14.3559186
4.5 14.2934748
5.5 14.326135
4.5 14.2939826
3.5 14.2965061
1.5 14.2951865
2.5 14.2965641
3.5 14.3041977
4.5 14.3042122
4.5 14.3069576
5.5 14.3073758
3.5 14.3075759
4.5 14.3115455
2.5 14.3087753
3.5 14.3136732
4.5 14.3092323
3.5 14.3092553
1.5 14.3116024
2.5 14.3154287
5.5 14.3132158
4.5 14.3132173
2.5 14.3141535
3.5 14.3141632
6.5 14.3259428
5.5 14.3307283
5.5 14.326968
4.5 14.3269828
3.5 14.3271375
4.5 14.3271534
2.5 14.3276744
3.5 14.3276799
6.5 14.3277166
5.5 14.3277299
1.5 14.3283992
2.5 14.3284205
2.5 14.328957
1.5 14.3333015
3.5 14.3314721
4.5 14.3316247
3.5 14.3360077
5.5 14.3324342
4.5 14.3415967
1.5 14.3375757
2.5 14.3596507
3.5 14.3880946
0.5 14.3473593
1.5 14.3473861
7.5 14.3478941
6.5 14.3479171
1.5 14.3480854
2.5 14.3481079
3.5 14.3489297
2.5 14.3489509
7.5 14.3492819
6.5 14.3552364
4.5 14.3497138
3.5 14.3497194
6.5 14.3500528
5.5 14.3500766
5.5 14.3502103
4.5 14.3502288
1.5 14.3508655
2.5 14.3532845
3.5 14.3570227
2.5 14.3586437
4.5 14.3603974
3.5 14.3675541
6.5 14.3618997
5.5 14.3717707
5.5 14.3623757
4.5 14.3731562
0.5 14.3698005
0.5 14.3710205
1.5 14.3710288
1.5 14.3730585
2.5 14.3730677
8.5 14.3731112
7.5 14.3731401
0.5 14.3751725
1.5 14.3780174
2.5 14.387316
3.5 14.3753892
2.5 14.3753922
4.5 14.3775296
3.5 14.3775453
7.5 14.3782919
6.5 14.3783305
5.5 14.3790802
4.5 14.3791076
6.5 14.3795865
5.5 14.3796205
1.5 14.4034451
2.5 14.408612
3.5 14.4171131
4.5 14.4303803
5.5 14.4480241
6.5 14.4700196
1.5 14.4135676
2.5 14.4187389
3.5 14.429973
3.5 14.4228991
2.5 14.4279063
1.5 14.4262388
0.5 14.4269121
1.5 14.4353731
2.5 14.4413592
3.5 14.4531271
4.5 14.456751
5.5 14.4849409
0.5 14.4541663
1.5 14.4585601
2.5 14.4651043
3.5 14.4678188
1.5 14.4542826
2.5 14.4673578
3.5 14.4801416
4.5 14.4852775
2.5 14.4909116
3.5 14.5043225
4.5 14.5236935
5.5 14.5485937
2.5 14.5151707
3.5 14.5388058
2.5 14.5344703
4.5 14.5667066
3.5 14.5707043
1.5 14.5534558
2.5 14.5658071
2.5 14.5895265
1.5 14.7073203
2.5 14.7095049
0.5 14.7121841
3.5 14.723576
1.5 14.8411899
0.5 14.96521
1.5 14.97197
2.5 14.9860463
3.5 15.006596
4.5 15.032679
4.5 14.9735178
5.5 14.9735196
4.5 14.9774278
5.5 14.9797665
4.5 14.9797752
5.5 14.9802818
4.5 14.9802854
5.5 14.9818026
6.5 14.9818064
3.5 14.9819067
4.5 14.9819082
5.5 14.9938561
4.5 14.9938667
4.5 14.9938987
6.5 14.9944703
5.5 14.9944895
5.5 14.996031
6.5 14.9960322
4.5 14.9960314
5.5 14.9960327
6.5 14.9964414
7.5 14.9964431
2.5 14.996624
3.5 14.9966243
7.5 15.0151943
6.5 15.0152214
6.5 15.0162155
5.5 15.0162433
5.5 15.0163736
4.5 15.0163947
2.5 15.0172991
7.5 15.017464
8.5 15.017466
2.5 15.017543
3.5 15.0175433
4.5 15.0178015
3.5 15.0178019
6.5 15.0179823
7.5 15.0179837
4.5 15.0180156
5.5 15.018017
5.5 15.0181105
6.5 15.0181116
8.5 15.0412013
7.5 15.0412349
2.5 15.0433358
4.5 15.0436259
3.5 15.043654
8.5 15.0439158
9.5 15.0439187
7.5 15.0440274
6.5 15.0440678
3.5 15.0442754
5.5 15.044543
4.5 15.0445745
6.5 15.0448273
5.5 15.0448647
7.5 15.0454483
8.5 15.0454499
4.5 15.0455943
5.5 15.0455957
6.5 15.0459954
5.5 15.0459963
6.5 15.0460195
7.5 15.0460203
3.5 15.412567
4.5 15.4389823
+174
View File
@@ -0,0 +1,174 @@
0.5 0
0.5 1.385928606
1.5 1.45462068
1.5 1.79767872
2.5 1.80977778
0.5 2.29811264
0.5 2.6985592
1.5 2.7210064
1.5 2.80065684
2.5 2.80597146
0.5 3.014942251
3.5 3.03414692
2.5 3.03416941
0.5 3.187489333
1.5 3.1977394
1.5 3.22951982
2.5 3.2321159
0.5 3.33649692
3.5 3.34399682
2.5 3.34401536
3.5 3.34857191
4.5 3.34857226
0.5 3.42655084
1.5 3.43209065
1.5 3.44815427
2.5 3.44959747
0.5 3.50878114
3.5 3.51239885
2.5 3.51241197
3.5 3.51525506
4.5 3.51525526
0.5 3.56167077
1.5 3.56500155
1.5 3.574301
2.5 3.575182517
0.5 3.611874168
3.5 3.613880001
2.5 3.613889139
3.5 3.615760083
4.5 3.61576021
0.5 3.645559814
1.5 3.6477173
1.5 3.65360201
2.5 3.654178805
0.5 3.678462772
3.5 3.679688522
2.5 3.679695106
3.5 3.68098394
4.5 3.68098405
0.5 3.701229763
1.5 3.7027068
1.5 3.70667371
2.5 3.70707127
0.5 3.723963113
3.5 3.724767372
2.5 3.724772195
3.5 3.725694529
4.5 3.72569469
0.5 3.740066168
1.5 3.7411212
1.5 3.74392555
2.5 3.744210954
0.5 3.756429211
3.5 3.756986041
2.5 3.756989653
3.5 3.757670994
4.5 3.75767111
0.5 3.76823582
1.5 3.7690158
1.5 3.77107276
2.5 3.771284458
0.5 3.780405071
3.5 3.780807074
2.5 3.780809834
4.5 3.78132654
3.5 3.781326707
0.5 3.789317734
1.5 3.7899103
1.5 3.79146486
2.5 3.791626152
0.5 3.798613304
3.5 3.798913359
2.5 3.798915518
3.5 3.799316552
0.5 3.805505759
1.5 3.8059666
1.5 3.80717039
2.5 3.807296044
0.5 3.812766269
3.5 3.812996391
2.5 3.812998112
3.5 3.813315307
0.5 3.818205815
1.5 3.8185709
1.5 3.81952269
2.5 3.819622452
0.5 3.823984809
3.5 3.824165317
2.5 3.82416671
3.5 3.824421789
0.5 3.828352755
1.5 3.82864724
1.5 3.82941261
2.5 3.829493102
0.5 3.83302758
3.5 3.833171897
2.5 3.83317304
3.5 3.833381166
0.5 3.836587907
1.5 3.836829
1.5 3.83745363
2.5 3.837519524
0.5 3.840422955
3.5 3.840540227
2.5 3.840541175
3.5 3.840713147
0.5 3.84336
1.5 3.84356
1.5 3.84407921
2.5 3.844134046
0.5 3.846548172
3.5 3.846644777
2.5 3.846645564
3.5 3.846789293
0.5 3.84900425
1.5 3.8491717
1.5 3.8496034
2.5 3.849649446
0.5 3.851678268
3.5 3.85175884
2.5 3.851759509
3.5 3.851880832
0.5 3.85375095
1.5 3.853896
1.5 3.85425737
2.5 3.854296393
0.5 3.856017709
3.5 3.856085662
2.5 3.856086234
3.5 3.856189385
0.5 3.857782849
1.5 3.85790349
1.5 3.858214775
2.5 3.8582481
0.5 3.859721037
3.5 3.859778848
2.5 3.85977934
3.5 3.859868061
0.5 3.86123656
1.5 3.861344
1.5 3.86160797
2.5 3.861636618
0.5 3.862906751
3.5 3.86295638
2.5 3.86295682
3.5 3.863033409
0.5 3.864217621
1.5 3.864307547
1.5 3.86453962
2.5 3.864564108
3.5 3.865709976
2.5 3.865710348
3.5 3.865777144
1.5 3.867088899
2.5 3.867110589
3.5 3.86811177
2.5 3.86811209
3.5 3.868170497
3.5 3.87021927
2.5 3.870219564
3.5 3.870271087
3.5 3.87207866
2.5 3.87207892
3.5 3.872124448
+303
View File
@@ -0,0 +1,303 @@
0 0
2 13.31609624
0 13.33723565
1 13.37965035
1 13.75658736
4 13.91667349
2 13.98595072
3 14.10019758
2 14.34193809
3 14.66417882
0 15.17254329
1 15.23461389
1 15.33009816
1 15.68741455
2 15.70853839
2 15.88224075
2 15.90966524
3 16.00843129
3 16.04608118
1 16.11781059
2 16.2140514
0 16.51006964
1 17.2646616
1 17.55180716
1 17.77453747
2 17.77975922
0 17.91972942
2 18.50108514
1 18.54981859
0 18.80622004
1 18.86805382
4 18.91483119
2 18.94483755
3 18.95039906
2 19.008167
3 19.05477741
1 19.27556709
1 19.31154633
2 19.3383922
2 19.35696489
5 19.38251086
1 19.39217449
3 19.40630046
4 19.41415792
3 19.43690255
1 19.44355233
2 19.4743497
3 19.52179088
4 19.53645066
2 19.55884408
0 19.59662191
0 20.21364134
1 20.23290072
2 20.38969768
1 20.4159909
1 20.55552656
0 20.5557686
1 20.55941998
2 20.5688969
2 20.59236752
3 20.59711294
2 20.59876818
4 20.60046521
5 20.65312898
3 20.65475683
3 20.65697648
2 20.66767356
1 20.67615214
4 20.68132802
2 20.70172862
3 20.70848041
3 20.74875222
1 20.76721166
4 20.77486258
2 20.79248591
2 20.81760904
3 20.82234346
1 20.83651901
2 20.85833967
0 20.89939705
2 20.95753268
3 20.95824205
6 20.96098608
5 20.96102419
4 20.97122421
3 20.97131294
4 20.97632678
5 20.97634043
1 20.9772063
1 21.05820649
3 21.11910289
3 21.13190685
2 21.13659796
1 21.13832933
4 21.15692551
0 21.18540048
2 21.1980473
2 21.32192415
1 21.33273255
1 21.34060728
2 21.40015029
5 21.40296819
0 21.41497298
1 21.42855618
4 21.42860899
4 21.43868158
3 21.44532065
2 21.44568699
3 21.44655587
2 21.45860843
3 21.46888638
3 21.48072621
4 21.49467485
2 21.52455314
1 21.5368966
2 21.549792
1 21.55050788
3 21.5599631
1 21.5691074
2 21.5794018
0 21.6119445
2 21.63060148
3 21.63070554
6 21.63322463
5 21.63326636
4 21.63914154
3 21.63922032
3 21.64004691
4 21.64006125
6 21.6412327
7 21.6412336
4 21.64209767
5 21.64211111
4 21.64469152
5 21.64469278
5 21.6459841
6 21.64598498
1 21.83701839
2 21.84892597
2 21.85353644
1 21.85530774
5 21.87478089
3 21.8816622
4 21.88795145
0 21.90681088
1 21.91330576
3 21.91845764
4 21.92096993
2 21.92349395
3 21.92417239
2 21.93221495
4 21.932987
3 21.93878863
2 21.958603
1 21.97691666
2 21.9871824
2 22.0064633
2 22.0366707
3 22.0367028
6 22.0384707
5 22.038505
4 22.04218224
3 22.04224241
3 22.04303225
4 22.04304121
7 22.04378892
6 22.0437892
4 22.04404814
5 22.04405894
4 22.0449531
5 22.044955
7 22.0453871
4 22.0459674
5 22.0459675
5 22.0467725
5 22.04678
6 22.0467811
6 22.0471892
0 22.10660303
1 22.11559023
1 22.1609222
2 22.165171
3 22.17467144
2 22.1771501
1 22.1822054
5 22.1847124
4 22.19086068
3 22.20754377
0 22.2157945
1 22.21816
4 22.22211418
2 22.22363858
4 22.2247585
3 22.2258971
2 22.230911
3 22.23613317
2 22.241579
1 22.2508885
2 22.2984788
3 22.2992673
6 22.3013285
5 22.3013556
4 22.3037976
3 22.3038262
3 22.3044969
4 22.3045083
7 22.3050159
6 22.3050162
4 22.305056
5 22.3050614
4 22.3058175
5 22.3058197
7 22.3061234
4 22.3064739
5 22.3064748
5 22.3070186
6 22.3070199
5 22.3070485
2 22.3169309
2 22.3284929
3 22.34343032
3 22.35046784
3 22.37117051
2 22.3738488
4 22.3868983
1 22.39297
2 22.3963398
5 22.3967193
1 22.398875
2 22.4159889
0 22.42251
1 22.428571
4 22.4286802
3 22.4310077
2 22.432299
3 22.434246
3 22.4365843
3 22.4449543
4 22.4454798
1 22.4771
2 22.4807609
3 22.4808935
6 22.4814198
5 22.481443
4 22.4831199
3 22.4831741
4 22.4840203
5 22.4840302
1 22.4840782
5 22.547198
2 22.5487611
1 22.5507339
1 22.5543161
3 22.5605992
3 22.5651703
4 22.5682358
1 22.570658
4 22.5722591
3 22.5734787
2 22.5738354
2 22.575973
3 22.5778776
1 22.59592
2 22.6096175
3 22.6096713
6 22.6101448
5 22.610161
4 22.6113336
3 22.61137
4 22.6119957
5 22.61201
2 22.6596971
1 22.6607
1 22.6757372
4 22.6771704
3 22.6779215
3 22.6812421
4 22.6829137
5 22.682941
4 22.6834553
3 22.6836776
1 22.692902
2 22.704916
3 22.704962
6 22.7053298
5 22.705351
4 22.7068246
1 22.74341
4 22.756208
3 22.7593623
1 22.76728
1 22.80705
1 22.81663
4 22.817202
1 22.82537
1 22.85692
1 22.86528
1 22.87148
1 22.89719
1 22.90875
1 22.93933
1 22.96448
1 23.04192
+152
View File
@@ -0,0 +1,152 @@
0.5 0
2.5 1.3889476
1.5 1.6422256
0.5 3.7858976
1.5 3.816692
2.5 4.837701
1.5 4.973503
4.5 5.072089
0.5 5.076382
3.5 5.10238
2.5 5.153147
1.5 5.244851
0.5 5.3483347
3.5 5.39505
2.5 5.421363
2.5 5.505682
1.5 5.522772
0.5 5.568835
3.5 5.574734
0.5 5.681072
1.5 5.688311
1.5 5.724709
2.5 5.777459
1.5 6.1227048
0.5 6.1227444
1.5 6.1911751
2.5 6.1920251
0.5 6.55241
1.5 6.7923583
0.5 6.8225729
1.5 6.8671954
2.5 6.8676455
3.5 6.87199205
2.5 6.87235974
3.5 6.946821
1.5 6.985719
2.5 7.02388
0.5 7.0263552
0.5 7.119078
1.5 7.1778165
2.5 7.1780681
2.5 7.1793195
3.5 7.1802166
4.5 7.1816766
3.5 7.1816766
1.5 7.1847067
2.5 7.205883
0.5 7.236296
0.5 7.261618
1.5 7.276745
1.5 7.345981
2.5 7.3461333
3.5 7.3472246
2.5 7.3472874
4.5 7.3481358
3.5 7.3481358
4.5 7.3483475
1.5 7.349162
0.5 7.35508
0.5 7.395393
1.5 7.447174
2.5 7.447282
1.5 7.447752
3.5 7.4479137
2.5 7.4479333
3.5 7.4485061
4.5 7.4485061
4.5 7.448643
0.5 7.449569
7.51267
7.512763
7.512825
7.512835
7.51359
7.55762
7.557694
7.557744
7.557999
7.589709
7.58984
7.589923
7.613467
7.613558
7.63153
7.631562
7.645592
7.645597
7.656732
7.656738
7.665725
7.673078
7.679171
7.68153
7.684278
7.68625
7.688595
7.69026
7.692282
7.69372
7.695452
7.696685
7.6982
7.69928
7.7006
7.701571
7.702704
7.70352
7.704557
7.705299
7.706209
7.706852
7.70768
7.70827
7.708993
7.709521
7.710172
7.710647
7.711242
7.71166
7.712206
7.712594
7.713079
7.71342
7.713867
7.7142
7.714586
7.71485
7.715254
7.71551
7.715868
7.71609
7.716429
7.71662
7.716944
7.71712
7.717424
7.717866
7.718274
7.718654
7.719014
7.719345
7.719654
7.719947
7.720211
7.720471
7.720715
7.72093
7.72114
7.72133
7.72154
7.72171
7.72187
+351
View File
@@ -0,0 +1,351 @@
0 0
3 2.718819
2 2.8326832
1 2.97542
2 3.2563914
2 8.2348676
1 8.4205796
3 8.4864382
4 8.5215446
0 8.5363442
4 8.6422812
2 8.6625258
3 8.7832228
2 8.864108
3 8.8687805
3 8.9169561
2 9.0166041
1 9.0634975
2 9.094649
1 9.1247178
2 10.5868581
2 10.9554913
1 10.985631
0 11.0254181
4 11.8486281
4 13.3831998
3 13.3921327
2 13.4319025
3 13.548499
1 13.6487344
2 13.6833571
2 13.6836588
5 13.7165188
1 13.77769
4 13.7893609
3 13.8709065
5 13.9360245
2 13.9388833
4 14.0477583
3 14.1342529
2 14.1939178
1 14.1975827
1 14.227927
4 14.302758
5 14.32589
5 14.3287278
2 14.3373832
4 14.3403284
1 14.3406503
3 14.392112
3 14.4225738
4 14.4281862
3 14.4287108
2 14.4302452
0 14.4536521
3 14.4620058
2 14.5223102
1 14.5348399
4 14.5888013
3 14.5988091
4 14.6156402
1 14.6212343
1 14.6389754
3 14.6478583
2 14.6503766
3 14.6901193
2 14.6960819
4 14.7530439
2 14.759033
2 14.8895566
3 14.962997
4 14.9760273
2 14.986715
1 14.9921148
3 15.0119011
3 15.0671617
2 15.123821
0 15.1538459
0 15.1776434
2 15.2185566
1 15.2336571
3 15.2521412
1 15.2878484
2 15.3190927
3 15.5265524
2 15.5287863
1 15.5686111
2 15.9153208
3 15.9393226
1 15.9405414
4 15.9664412
2 15.975864
0 16.0070747
3 16.0084594
1 16.088157
2 16.1658518
1 16.2345498
2 16.2349432
3 16.2474229
4 16.2806645
3 16.5635724
2 16.5801626
2 16.5922988
3 16.6119384
5 16.6276276
1 16.6584969
2 16.6976356
4 16.7059845
1 16.754624
0 16.7978829
1 16.8202554
3 16.8287994
2 16.8321134
4 16.8413514
1 16.8449486
0 16.8497161
2 16.8507807
6 16.8532961
5 16.8536535
2 16.855932
1 16.8566656
3 16.8605991
2 16.8635812
3 16.8662301
4 16.8783116
5 16.8817635
4 16.895325
1 16.9036191
3 16.9166278
4 16.9478881
5 16.9518443
2 16.9553472
4 16.9567422
1 16.9577107
2 16.9610541
3 16.9758347
3 16.990146
4 16.9913471
2 16.994965
3 16.9955283
5 16.9960211
1 17.0122145
0 17.0619791
2 17.0662748
1 17.0990873
4 17.1022436
2 17.1101752
1 17.1133375
5 17.1177903
4 17.1189416
3 17.1260019
2 17.1317482
4 17.137077
3 17.1422498
3 17.1596542
1 17.1833456
2 17.2022883
3 17.2113705
4 17.2192846
1 17.2211975
2 17.2314761
2 17.2373615
3 17.2486096
2 17.2514135
1 17.2636989
3 17.2748603
4 17.2828746
2 17.3218927
3 17.3256875
0 17.4308557
1 17.4794785
0 17.5008857
3 17.5068948
1 17.5120954
2 17.548971
2 17.5727969
1 17.88356
3 17.9547599
2 17.9631999
0 18.0879707
1 18.0894052
2 18.0926695
5 18.094946
6 18.0956816
1 18.0961677
3 18.0989818
2 18.0998567
3 18.1043296
4 18.1046498
4 18.1053301
5 18.1056912
1 18.1080297
2 18.1080438
6 18.1102279
7 18.1102345
3 18.1107143
2 18.1107185
3 18.1133372
4 18.1133399
5 18.1144891
6 18.1144933
4 18.1149704
5 18.1149733
1 18.1284274
5 18.1516222
2 18.1532203
4 18.1541634
1 18.1547497
3 18.163201
3 18.1706744
4 18.1710875
2 18.172995
1 18.2115619
2 18.2177811
0 18.2378064
2 18.2662999
3 18.2866632
1 18.2954383
4 18.2996517
2 18.3059803
3 18.3202747
2 18.3480919
1 18.3516631
5 18.3532223
4 18.3538216
3 18.3572808
2 18.3578439
3 18.3624282
4 18.3627226
3 18.3662436
2 18.3662525
5 18.3677355
6 18.3677396
3 18.3704343
4 18.3704379
4 18.3718715
5 18.3718755
1 18.3944855
3 18.4093915
4 18.4135799
1 18.4143267
2 18.4190858
3 18.4279064
2 18.4293182
0 18.4987645
2 18.62861
3 18.6897367
2 18.694641
0 18.7621875
5 18.7677759
1 18.7679627
2 18.7681457
6 18.7684399
3 18.7715308
2 18.7716951
4 18.7735647
4 18.773908
5 18.7740646
1 18.7742114
1 18.776175
2 18.7761864
3 18.7764017
6 18.7774564
7 18.777466
3 18.7777382
2 18.7777395
3 18.7792382
4 18.7792394
5 18.779899
6 18.779901
4 18.7801648
5 18.7801671
1 18.7900761
5 18.8029861
2 18.8038119
4 18.8044754
1 18.8048887
3 18.8094371
3 18.8138024
4 18.8139712
2 18.8155435
0 18.8677965
1 18.9465239
2 18.9498028
3 19.0204406
2 19.0224752
5 19.0253291
4 19.0260167
1 19.0263337
2 19.0300438
4 19.0310596
3 19.0314282
3 19.0337921
2 19.033803
5 19.0346624
6 19.0346667
3 19.0362088
4 19.0362106
4 19.0370347
5 19.0370365
1 19.0512335
3 19.0602041
4 19.062676
1 19.0630326
2 19.0655302
3 19.0707078
2 19.0714903
0 19.0754343
3 19.1252829
2 19.1284357
5 19.1730876
6 19.1737894
3 19.1768975
4 19.1769774
4 19.1771989
5 19.1772851
3 19.1777349
1 19.1788686
2 19.1788799
6 19.179683
7 19.1796864
3 19.179858
3 19.1807993
4 19.180803
5 19.1812106
4 19.1813756
1 19.1885413
5 19.1963142
2 19.1968018
4 19.19727
1 19.1975844
3 19.2002839
3 19.2030562
4 19.2031218
2 19.2042725
0 19.2479059
1 19.3820662
2 19.3839215
3 19.4045804
2 19.4068038
5 19.4297983
4 19.4309647
5 19.4359417
3 19.4361381
2 19.436145
6 19.436638
5 19.4367062
3 19.4376725
4 19.4382224
4 19.4547003
2 19.4603236
+225
View File
@@ -0,0 +1,225 @@
1.5 0
0.5 0.050102
2.5 12.69669
1.5 12.730752
0.5 12.750582
1.5 12.984995
0.5 13.025319
2.5 14.371989
1.5 14.387235
0.5 14.399969
3.5 14.504588
2.5 14.526486
1.5 14.544408
0.5 14.554747
2.5 14.583383
1.5 14.614379
0.5 14.680382
1.5 14.683178
1.5 14.746284
0.5 14.764264
2.5 15.364252
1.5 15.364371
2.5 15.577088
1.5 15.606794
0.5 15.630344
1.5 15.657044
0.5 15.694066
3.5 15.877925
2.5 15.880867
1.5 15.885193
2.5 15.887395
0.5 15.892913
4.5 15.897146
1.5 15.897233
3.5 15.897298
0.5 15.911973
3.5 15.933798
0.5 15.934476
1.5 15.934856
2.5 15.935112
2.5 15.945123
1.5 15.945846
2.5 15.956505
1.5 15.958291
2.5 16.041306
1.5 16.054052
0.5 16.069229
3.5 16.075729
2.5 16.08978
1.5 16.110176
2.5 16.119942
0.5 16.12531
1.5 16.135508
0.5 16.136428
1.5 16.145361
1.5 16.164422
0.5 16.178689
2.5 16.439747
1.5 16.458279
1.5 16.489697
0.5 16.49103
0.5 16.517578
3.5 16.557413
2.5 16.559011
1.5 16.561487
2.5 16.562252
4.5 16.564984
3.5 16.565096
0.5 16.565951
1.5 16.567246
0.5 16.571619
0.5 16.602772
1.5 16.6039
3.5 16.604344
2.5 16.605428
2.5 16.609627
1.5 16.610334
2.5 16.62439
1.5 16.6252
3.5 16.645708
2.5 16.812735
1.5 16.822829
1.5 16.857684
0.5 16.861264
3.5 16.870639
2.5 16.871551
1.5 16.87299
2.5 16.873287
4.5 16.874381
3.5 16.874454
0.5 16.875418
1.5 16.875961
0.5 16.877262
0.5 16.880598
0.5 16.913932
1.5 16.914767
3.5 16.915056
2.5 16.915765
2.5 16.917828
1.5 16.918274
2.5 16.934313
1.5 16.934752
2.5 17.007507
1.5 17.013383
3.5 17.040198
2.5 17.040765
1.5 17.041623
2.5 17.041794
4.5 17.042332
3.5 17.042374
1.5 17.043204
1.5 17.05129
0.5 17.05359
0.5 17.058684
2.5 17.058875
3.5 17.059979
1.5 17.060879
0.5 17.07148
1.5 17.083497
3.5 17.083667
2.5 17.08412
2.5 17.085283
2.5 17.102559
2.5 17.121937
1.5 17.12591
4.5 17.143498
2.5 17.14354
1.5 17.14354
3.5 17.143543
0.5 17.14452
1.5 17.16513
0.5 17.16722
0.5 17.18442
2.5 17.18575
1.5 17.18575
1.5 17.196058
2.5 17.197045
1.5 17.1975
2.5 17.20425
1.5 17.20425
4.5 17.209124
2.5 17.20934
1.5 17.20934
0.5 17.21041
1.5 17.23762
1.5 17.24621
1.5 17.25145
2.5 17.25145
2.5 17.2543
1.5 17.2543
0.5 17.25528
0.5 17.25663
1.5 17.26986
2.5 17.26986
1.5 17.2802
2.5 17.28639
1.5 17.28639
0.5 17.28653
1.5 17.29647
2.5 17.29647
1.5 17.30492
0.5 17.30554
1.5 17.31017
2.5 17.31017
1.5 17.31474
2.5 17.31474
1.5 17.32465
2.5 17.32825
1.5 17.32825
2.5 17.32835
1.5 17.32835
0.5 17.33943
1.5 17.33943
2.5 17.34219
1.5 17.34219
2.5 17.34683
1.5 17.34683
1.5 17.35124
2.5 17.35215
1.5 17.35215
1.5 17.35321
2.5 17.35321
1.5 17.3607
2.5 17.3622
1.5 17.3622
0.5 17.36551
1.5 17.36839
2.5 17.36953
1.5 17.36953
1.5 17.37031
2.5 17.37031
1.5 17.37067
2.5 17.37067
1.5 17.37471
1.5 17.37573
2.5 17.37573
1.5 17.38077
2.5 17.38077
1.5 17.38447
2.5 17.38447
2.5 17.38509
1.5 17.38509
0.5 17.38509
2.5 17.38892
1.5 17.38892
2.5 17.38892
1.5 17.38892
2.5 17.39209
1.5 17.39209
1.5 17.39475
2.5 17.39475
1.5 17.39545
2.5 17.39545
0.5 17.39948
2.5 17.40298
1.5 17.40298
1.5 17.40458
2.5 17.40458
0.5 17.41149
2.5 17.41157
1.5 17.41157
1.5 17.41457
2.5 17.41457
2.5 17.41801
1.5 17.41801
+205
View File
@@ -0,0 +1,205 @@
2 0
1 0.04228
0 0.06074
2 2.58797
0 5.56913
2 20.432333
1 20.470617
0 20.492008
2 21.882458
1 22.672296
1 25.10052
2 25.101926
3 25.104353
1 25.751402
0 25.751771
2 25.751988
3 26.268052
2 26.270663
1 26.272284
2 26.66523
1 28.172733
2 28.460586
1 28.460794
0 28.461124
4 28.640059
3 28.640176
2 28.640322
1 28.640448
0 28.640507
1 28.772187
2 28.772289
3 28.772556
2 29.154956
1 29.215944
1 29.281339
2 29.281671
3 29.284465
1 29.379398
4 29.447195
3 29.447267
2 29.447353
3 29.548333
1 29.70727
2 29.767682
1 29.775141
0 29.778428
1 30.185056
2 30.185537
3 30.186342
2 30.535278
0 30.58129
1 30.582191
2 30.584682
1 31.406745
4 31.426852
3 31.426929
0 31.427013
1 31.427013
2 31.427013
1 31.493825
2 31.493895
3 31.494029
5 31.559105
4 31.559112
2 31.559117
3 31.559119
1 31.559129
4 31.559698
3 31.559722
2 31.559742
3 31.578976
2 31.580843
1 31.581661
2 31.677789
1 31.691135
1 31.772495
0 31.895287
1 31.89708
2 31.899998
2 32.103242
1 32.134178
2 32.134405
3 32.134771
2 32.297483
1 32.299391
0 32.300437
4 32.716247
2 32.716289
3 32.716289
0 32.71632
1 32.71632
3 32.740832
2 32.74117
1 32.741457
5 32.787745
4 32.787745
2 32.787757
3 32.787757
1 32.787757
4 32.78836
3 32.788388
2 32.788388
4 32.792697
6 32.792697
3 32.792697
5 32.792697
2 32.792697
3 32.792706
5 32.792706
4 32.792706
2 32.849947
3 32.850641
4 32.851557
2 32.852002
0 32.855101
5 32.887508
4 32.888962
3 32.891628
4 32.894215
1 32.900144
3 32.914371
2 32.917607
1 32.919859
2 33.013286
0 33.02179
1 33.024505
2 33.03607
1 33.041632
0 33.043826
3 33.047799
1 33.092916
2 33.093037
3 33.093233
1 33.153367
2 33.172029
1 33.172462
2 33.41315
3 33.41315
4 33.41315
3 33.419813
2 33.421668
1 33.422871
3 33.442716
2 33.442988
1 33.443099
1 33.455236
3 33.455236
5 33.455236
2 33.455236
4 33.455236
3 33.455597
2 33.455597
4 33.455597
6 33.458284
3 33.458284
5 33.458284
2 33.458284
4 33.458284
3 33.458285
5 33.458285
4 33.458285
2 33.49352
1 33.522074
2 33.538753
1 33.635828
2 33.635901
3 33.636019
1 33.857631
3 33.857631
5 33.857631
2 33.857631
4 33.857631
3 33.857766
2 33.857766
4 33.857766
3 33.859572
5 33.859572
4 33.859572
3 33.859619
5 33.859619
2 33.859619
4 33.859619
6 33.859619
4 34.118727
1 34.118727
3 34.118727
5 34.118727
2 34.118727
2 34.120092
4 34.120092
6 34.120092
3 34.120092
5 34.120092
1 34.367038
3 34.407822
1 34.408142
2 34.408315
4 34.452933
3 34.454292
2 34.455554
3 34.487346
2 34.513234
1 34.516843
0 34.519205
2 34.746597
+846
View File
@@ -0,0 +1,846 @@
4 0
3 0.0515691
2 0.0872857
1 0.1101143
0 0.1212657
5 0.8589957
4 0.9146022
3 0.9581573
2 0.9901111
1 1.0110557
4 1.4848644
3 1.5573573
2 1.6078958
3 2.1759451
2 2.1978664
1 2.2227121
2 2.2786046
5 2.3992047
6 2.4040744
1 2.4241983
4 2.4254333
5 2.4326947
3 2.4495598
4 2.4534304
2 2.4688347
1 2.4821184
0 2.4843725
4 2.5591715
3 2.5881059
2 2.6085019
5 2.6924076
4 2.7275445
3 2.7585776
6 2.8082936
2 2.8315911
5 2.8325267
1 2.8450426
4 2.8512242
0 2.8580527
3 2.8653912
2 2.8755035
1 2.8819926
0 2.8851599
4 2.9398458
5 2.9487929
4 2.9903524
3 2.9980448
2 3.0172504
3 3.0176225
2 3.0384704
4 3.0468689
1 3.0713388
0 3.1109618
4 3.2111893
6 3.2367201
3 3.2409691
3 3.2514817
2 3.2657061
5 3.2671125
1 3.2739844
1 3.2830248
0 3.2918398
2 3.3009224
4 3.3014027
5 3.3320195
4 3.3682564
3 3.3965088
1 3.4148971
2 3.4169528
1 3.43019
2 3.54652
5 3.5732189
3 3.602525
6 3.6343498
1 3.6352199
2 3.6397723
3 3.6416405
2 3.6536933
1 3.6863894
4 3.6945972
4 3.8816036
3 3.883509
2 3.9286068
3 3.9433262
1 3.9597236
2 3.9841071
4 4.0758109
4 4.1033737
3 4.1426489
3 4.1543538
5 4.1776968
2 4.1863644
2 4.1908608
2 4.2088832
1 4.2175832
4 4.2203621
0 4.2305396
3 4.2562228
1 4.2604532
2 4.2833082
0 4.284348
2 4.2944149
1 4.3012781
5 4.3124706
6 4.3201
4 4.371351
5 4.3864627
3 4.4152787
4 4.4346127
2 4.4456272
3 4.473272
4 4.5485061
3 4.5585228
2 4.5800494
3 4.5843886
4 4.5931104
2 4.606951
3 4.6075932
1 4.6381937
2 4.652031
3 4.7331407
2 4.7954656
1 4.834855
4 4.9129735
3 4.9556301
2 4.9658194
3 4.9850439
2 4.9880499
5 4.9912708
1 5.0095217
4 5.0116815
0 5.0202793
4 5.0330681
3 5.0637817
2 5.0674092
2 5.0703325
2 5.0855901
1 5.0995443
1 5.1054724
0 5.112427
3 5.2733878
6 5.3045835
5 5.3084894
2 5.3139352
6 5.3194008
5 5.3203996
5 5.330291
4 5.3341703
1 5.3411181
4 5.3448245
3 5.3483667
4 5.3515703
2 5.3573603
6 5.3711313
3 5.3717349
3 5.3852074
4 5.3862089
5 5.3883682
4 5.3932512
2 5.4098686
1 5.4260419
3 5.4457167
4 5.4580974
3 5.4759116
2 5.4780717
5 5.4855178
2 5.4906965
1 5.5022131
1 5.506282
4 5.5067673
0 5.5122052
2 5.5187613
3 5.5236615
2 5.5376395
4 5.5392427
1 5.5496252
0 5.5578272
3 5.5868927
3 5.6066498
2 5.6142317
5 5.6158451
2 5.6206841
4 5.632404
1 5.6424157
1 5.6476993
3 5.6490888
0 5.6530701
6 5.654716
5 5.6693175
4 5.6825954
3 5.6925481
2 5.6989283
7 5.7005464
6 5.7066171
5 5.7201126
3 5.7202709
2 5.7421467
1 5.7541538
1 5.777765
0 5.7866574
4 5.7926461
2 5.7934188
3 5.7956404
2 5.8134351
4 5.8135126
1 5.815086
6 5.8250652
5 5.8279399
5 5.8282951
3 5.8293883
3 5.8387521
4 5.8404596
2 5.8441295
0 5.8485244
1 5.8492315
2 5.8516834
1 5.8609843
6 5.8723102
4 5.8741177
2 5.8792918
5 5.8793589
4 5.883387
1 5.8961441
4 5.9004139
5 5.9024058
3 5.913208
3 5.9209319
4 5.9279471
2 5.9303071
3 5.9306875
5 5.9307283
6 5.9332815
4 5.9425622
4 5.9463987
3 5.9470985
2 5.9557883
6 5.9634283
3 5.9664826
2 5.9715062
1 5.9786822
5 5.9799165
2 5.9808547
1 5.9871809
2 5.9890124
1 5.9947111
4 5.9961091
5 5.9986782
0 6.0082882
3 6.010219
1 6.0152344
3 6.0171843
4 6.0383447
2 6.0663469
4 6.0887271
3 6.0919664
2 6.1053068
3 6.1053397
1 6.1121277
5 6.1189104
2 6.1289271
6 6.129055
5 6.1323702
3 6.1343819
4 6.1444999
5 6.1501651
4 6.1530734
4 6.1653609
6 6.1692233
3 6.1750648
3 6.1806854
0 6.1931773
2 6.2002665
1 6.2045676
5 6.2056811
1 6.2181322
4 6.2222391
2 6.2223743
4 6.236805
6 6.2416285
5 6.2460645
4 6.2516722
3 6.2528981
4 6.2581381
6 6.2640467
3 6.2654667
2 6.2681156
3 6.2719735
3 6.2749966
4 6.2753341
1 6.277002
3 6.2771181
7 6.2800019
0 6.2810001
2 6.2858277
5 6.2864786
4 6.2993887
5 6.302543
2 6.3060008
3 6.3060614
1 6.3083286
2 6.310941
6 6.3192056
4 6.3206622
0 6.3208399
2 6.3230261
5 6.3252596
6 6.3260658
1 6.3291586
5 6.331714
4 6.3326947
5 6.3359881
3 6.3416489
2 6.3416566
4 6.3470329
2 6.3481507
1 6.3489825
3 6.3503485
5 6.351531
3 6.3596727
4 6.3609601
2 6.3642393
4 6.3647177
4 6.3666495
3 6.3680008
3 6.3684869
2 6.3690862
5 6.369553
4 6.3704887
4 6.373919
3 6.380291
4 6.3804339
2 6.3901108
1 6.3934686
3 6.3938771
3 6.3980933
3 6.3999497
2 6.4013042
5 6.4013262
4 6.4060386
3 6.4089924
2 6.4106047
2 6.4110129
2 6.4149325
1 6.4167398
2 6.4176794
3 6.418731
3 6.4255769
2 6.4257802
1 6.4258349
3 6.4269983
0 6.4399301
2 6.4403324
1 6.4404604
3 6.4433473
1 6.4496169
1 6.4521242
2 6.4533555
2 6.4555434
1 6.460891
1 6.4695971
3 6.4736154
1 6.4737537
0 6.4790851
2 6.4839917
6 6.5006709
1 6.5107148
6 6.5108516
5 6.5231917
7 6.5283869
2 6.5318496
4 6.5424902
5 6.5472336
1 6.5535324
5 6.5586398
2 6.5607844
4 6.5654132
5 6.5787649
6 6.5797616
5 6.581675
6 6.5827586
4 6.590398
3 6.5910735
6 6.5921339
1 6.5996715
7 6.6052808
5 6.6060874
5 6.6100238
4 6.6119328
6 6.6149275
3 6.6154887
4 6.6193473
4 6.6199717
3 6.6388371
2 6.6416786
5 6.6438804
4 6.6468439
3 6.6531258
1 6.657563
2 6.6608128
3 6.6621165
5 6.6628411
3 6.6638406
2 6.6640768
3 6.6657971
4 6.6665037
3 6.6684591
5 6.6704563
1 6.6713858
3 6.6741902
3 6.6750427
6 6.6753861
4 6.6768111
5 6.6795565
4 6.6804925
3 6.6816976
2 6.6843625
1 6.6858726
2 6.6910133
1 6.6921393
5 6.6930753
3 6.6957316
5 6.6968517
4 6.6973264
2 6.7004193
4 6.7033938
2 6.7034255
2 6.7090614
4 6.7106129
1 6.7115809
3 6.7118418
3 6.7151253
1 6.7229712
4 6.7245573
4 6.7245824
2 6.7270728
2 6.7270948
5 6.7282152
1 6.7287541
3 6.7309823
4 6.7325081
2 6.7376458
3 6.7394592
2 6.7417247
3 6.7421843
1 6.7430276
3 6.7453329
1 6.7508586
4 6.7546469
3 6.7560228
2 6.7609392
4 6.7640097
3 6.7695806
1 6.7699265
2 6.770989
4 6.7798678
2 6.7827275
1 6.787837
1 6.7952329
4 6.79568
3 6.802372
2 6.8042134
3 6.8346212
2 6.8357656
1 6.8570238
1 6.8657601
2 6.8660974
0 6.8675492
5 6.8724216
4 6.8744288
6 6.8798511
5 6.8842922
0 6.909208
2 6.9126438
3 6.9171647
4 6.931403
5 6.9316066
3 6.9552452
5 6.9572352
5 6.9580342
4 6.9688482
6 6.9754727
6 6.9845208
3 6.9849134
6 6.9855003
5 6.9905591
4 6.9955955
6 6.9961774
5 6.9966788
4 6.9991581
3 7.0003977
2 7.0025609
5 7.0054738
4 7.0071179
4 7.0071831
7 7.0095765
4 7.0102644
5 7.011385
3 7.0119345
4 7.0166009
4 7.0265744
5 7.0308071
2 7.0324344
3 7.0332382
4 7.033913
1 7.034263
6 7.0359669
5 7.0362395
7 7.0366155
5 7.0366892
4 7.0367147
6 7.0369095
4 7.0369344
5 7.0375759
4 7.0379341
3 7.0380935
3 7.0394833
7 7.0396706
8 7.0396728
2 7.0397654
3 7.0402346
2 7.0410253
1 7.0412638
4 7.0433274
5 7.0476006
2 7.0476103
4 7.0478166
2 7.0495745
3 7.0511481
6 7.0515908
3 7.0532655
2 7.0588397
4 7.0610613
2 7.0611744
1 7.0676397
3 7.0704419
7 7.0705104
2 7.0707709
3 7.0739948
4 7.0750771
6 7.0757993
3 7.0758241
2 7.0763875
1 7.0767506
3 7.0775488
5 7.0800205
0 7.0821762
4 7.0826283
5 7.0828233
2 7.0845096
5 7.0851742
6 7.0852967
4 7.0853461
5 7.0854221
4 7.0855869
3 7.0856599
3 7.0856777
1 7.085978
7 7.0859864
2 7.0859963
6 7.08609
2 7.0862262
1 7.0863163
4 7.0864231
0 7.0864481
3 7.0869543
1 7.08745
3 7.0879944
1 7.0887258
2 7.0906825
1 7.0936001
3 7.0942303
2 7.0960921
2 7.1032082
4 7.1052021
1 7.1068172
3 7.1097285
3 7.1100161
3 7.1119029
1 7.1168348
2 7.1170815
2 7.1186465
1 7.1193547
1 7.1199707
2 7.1201119
6 7.1201724
5 7.1203005
2 7.1205508
3 7.1207656
2 7.1213044
4 7.1213797
5 7.1213954
3 7.1214374
4 7.121556
3 7.1215886
2 7.1229745
3 7.1304138
2 7.1326264
1 7.1348543
4 7.1352918
3 7.1371881
2 7.1380818
0 7.1428188
1 7.1435986
2 7.1438214
5 7.1440676
4 7.1442085
3 7.1453451
2 7.1455383
3 7.1465732
4 7.1466003
3 7.1467446
5 7.149047
4 7.1535774
2 7.1549719
1 7.1590301
3 7.159226
4 7.159236
2 7.1592654
3 7.159459
1 7.1605956
4 7.1618014
2 7.1651595
3 7.1680152
5 7.1783194
4 7.1808243
2 7.1878768
2 7.1910166
6 7.1913237
5 7.1933847
3 7.1952377
4 7.2058221
3 7.2074594
2 7.2074802
5 7.20931
4 7.2156217
2 7.2175075
5 7.2247404
3 7.2253353
1 7.2261963
4 7.2309299
2 7.2320687
4 7.2325702
1 7.2361423
1 7.2400403
3 7.2506341
4 7.2507572
3 7.2508259
5 7.2521128
2 7.2546113
1 7.2555556
4 7.2555754
5 7.2643837
4 7.2644913
3 7.2655166
4 7.2731583
3 7.2747057
3 7.2756806
2 7.2758643
6 7.2779393
5 7.2779758
6 7.2782048
4 7.2784815
7 7.2786247
5 7.2787878
3 7.2791181
7 7.2792128
4 7.2792668
3 7.2796885
8 7.2801658
3 7.280233
7 7.28067
2 7.2807599
3 7.2850173
1 7.2852592
3 7.2856159
7 7.2893105
5 7.2917605
2 7.2933512
3 7.2941428
2 7.3034275
4 7.3034672
2 7.3053923
6 7.3084633
2 7.3103558
4 7.3107623
1 7.3108214
1 7.3122782
2 7.312566
2 7.3195016
1 7.3246248
5 7.3257088
3 7.3261801
2 7.3281227
1 7.3291199
6 7.3304509
5 7.330783
4 7.331633
6 7.333215
1 7.3342433
7 7.3372774
5 7.337722
4 7.3403893
3 7.3419975
4 7.344263
3 7.346236
4 7.3475886
6 7.3477899
5 7.3479091
5 7.3479266
3 7.3479826
4 7.3480157
2 7.348563
3 7.3487068
7 7.3487777
6 7.3489321
6 7.349109
6 7.3492729
2 7.3493169
7 7.3494681
7 7.351069
8 7.3510758
4 7.352499
6 7.3559385
7 7.3559389
5 7.3559694
6 7.3559695
8 7.3561403
7 7.3561404
5 7.3561424
4 7.3561425
4 7.3563865
3 7.3563867
3 7.356642
2 7.3566422
8 7.356692
9 7.356693
1 7.3568605
2 7.3568609
1 7.3570064
0 7.3570083
1 7.3576943
1 7.3597265
3 7.3635063
5 7.3725361
4 7.374038
1 7.3771376
2 7.378812
3 7.3795771
3 7.3798759
5 7.38002
4 7.381131
3 7.3818448
6 7.3821585
5 7.384043
2 7.385661
1 7.388324
5 7.3973887
4 7.3974804
7 7.3980136
6 7.3981475
4 7.3983189
5 7.3983354
3 7.3983803
4 7.398523
3 7.3992821
2 7.3994148
5 7.3996463
2 7.4002966
5 7.403939
6 7.4039391
5 7.4039569
4 7.4039579
6 7.4039746
7 7.4039752
3 7.4040041
4 7.4040051
2 7.4040589
3 7.4040595
7 7.4040814
8 7.4040815
1 7.4041049
2 7.4041049
5 7.4041781
4 7.4050683
1 7.405473
1 7.410154
2 7.4118353
2 7.416184
3 7.416817
2 7.4196563
4 7.424005
3 7.425004
4 7.4324835
3 7.4325209
2 7.4325757
3 7.4331667
5 7.4341522
4 7.434211
1 7.435149
2 7.4388197
1 7.4388202
6 7.4389539
7 7.4389545
2 7.4389767
3 7.4389772
1 7.439026
3 7.43914
4 7.4391405
5 7.4392181
6 7.4392189
4 7.4392456
5 7.4392476
2 7.443396
3 7.4484652
2 7.449653
4 7.4509046
3 7.4510813
2 7.454996
3 7.4604347
1 7.4611525
2 7.462873
3 7.462874
5 7.4630639
6 7.4630644
4 7.4634064
3 7.4634066
4 7.4635934
5 7.4635938
1 7.4657386
5 7.4705649
5 7.477449
4 7.4774502
4 7.4774516
3 7.4774524
6 7.4843851
4 7.4968488
2 7.5051494
5 7.5071336
3 7.5089311
4 7.5329818
3 7.5390662
4 7.6529034
6 7.6968549
5 7.7109163
4 7.733844
6 7.8154376
File diff suppressed because it is too large Load Diff
+167
View File
@@ -0,0 +1,167 @@
0.5 0
1.5 0.1024345
0.5 3.073386
0.5 4.09694
1.5 4.110705
1.5 4.312376
2.5 4.313144
0.5 4.659918
0.5 4.7083951
1.5 4.7537676
2.5 4.8248185
0.5 5.006042
1.5 5.011146
1.5 5.05891
2.5 5.05997
3.5 5.139663
2.5 5.139663
0.5 5.227021
0.5 5.386224
1.5 5.388693
1.5 5.402625
2.5 5.403286
3.5 5.449733
2.5 5.449733
0.5 5.496501
1.5 5.588185
2.5 5.588678
3.5 5.618088
2.5 5.618088
0.5 5.645827
1.5 5.69945
2.5 5.6998
3.5 5.719501
2.5 5.719501
0.5 5.73729
1.5 5.7712
2.5 5.77134
3.5 5.785253
2.5 5.785253
0.5 5.79733
2.5 5.82026
1.5 5.82026
0.5 5.83883
1.5 5.85479
2.5 5.85479
0.5 5.86872
1.5 5.88041
0.5 5.89099
1.5 5.8998
2.5 5.8999
0.5 5.90802
1.5 5.91481
2.5 5.91493
0.5 5.92131
1.5 5.92669
2.5 5.92675
0.5 5.93191
1.5 5.9362
2.5 5.93624
0.5 5.94045
1.5 5.94396
2.5 5.94399
0.5 5.94752
1.5 5.9504
2.5 5.9504
0.5 5.95335
1.5 5.9557545
2.5 5.9557924
0.5 5.9559907
1.5 5.9560372
0.5 5.95823
1.5 5.9602876
2.5 5.9603202
0.5 5.96242
1.5 5.9641477
2.5 5.9641764
0.5 5.9643297
1.5 5.9643637
0.5 5.96593
1.5 5.96746
2.5 5.96746
0.5 5.96902
1.5 5.9703313
2.5 5.970353
0.5 5.9704734
1.5 5.970498
0.5 5.97165
2.5 5.97278
1.5 5.97278
0.5 5.97402
1.5 5.9750166
2.5 5.9750334
0.5 5.9751288
1.5 5.9751481
0.5 5.97603
2.5 5.97693
0.5 5.97785
1.5 5.9786518
2.5 5.978665
0.5 5.9787422
1.5 5.9787567
1.5 5.9827447
2.5 5.9827553
1.5 5.9865504
2.5 5.9865574
0.5 5.9865973
1.5 5.9866044
0.5 5.990252
1.5 5.990252
1.5 5.990703
0.5 5.990703
1.5 5.991115
0.5 5.991115
0.5 5.991509
1.5 5.991509
0.5 5.991869
1.5 5.991869
0.5 5.992201
1.5 5.992201
1.5 5.992511
0.5 5.992511
1.5 5.992811
0.5 5.992811
1.5 5.993096
0.5 5.993096
0.5 5.993354
1.5 5.993354
0.5 5.993598
1.5 5.993598
0.5 5.993823
1.5 5.993823
1.5 5.994041
0.5 5.994041
0.5 5.9942181
1.5 5.9942181
0.5 5.9944094
1.5 5.9944094
1.5 5.9945897
0.5 5.9945897
1.5 5.994771
0.5 5.994771
1.5 5.99494
0.5 5.99494
1.5 5.995087
0.5 5.995087
0.5 5.995232
1.5 5.995232
0.5 5.995376
1.5 5.995376
0.5 5.995505
1.5 5.995505
0.5 5.995624
1.5 5.995624
0.5 5.995749
1.5 5.995749
1.5 5.995852
0.5 5.995852
1.5 5.995961
0.5 5.995961
1.5 5.996082
0.5 5.996082
0.5 5.996167
1.5 5.996167
0.5 5.99627
1.5 5.99627
0.5 5.996357
1.5 5.996357
+71
View File
@@ -0,0 +1,71 @@
0 0
0 5.872828
1 5.9281945
2 6.044211
1 8.7658597
1 12.763503
0 13.2244495
2 13.3556665
1 14.1113712
2 14.1146463
3 14.1197163
0 14.220426
1 14.286013
2 14.399512
0 14.6834444
1 14.6944163
2 14.7203797
1 14.9463484
2 15.64527
1 16.491175
0 16.581795
0 16.817142
1 17.0053655
2 17.0067378
3 17.0088299
2 17.0270331
3 17.0271805
4 17.0279493
3 17.0283083
2 17.3210191
1 18.0389822
0 18.1046188
2 18.285728
3 18.2858671
4 18.2865772
3 18.2868418
1 18.290191
2 18.290904
3 18.2919938
3 18.327048
4 18.327053
5 18.32717
4 18.327188
2 18.4050486
1 18.836167
0 18.8705022
2 18.9695919
3 18.969784
4 18.9703233
3 18.970769
1 18.977631
2 18.97805
3 18.978695
3 18.9962
4 18.996215
5 18.996316
4 18.996331
2 19.0335217
2 19.38149
3 19.38168
4 19.382126
3 19.3826
3 19.38948
3 19.39966
4 19.39967
5 19.39975
4 19.399776
4 19.66135
3 19.66135
4 19.6615
5 19.66153
+393
View File
@@ -0,0 +1,393 @@
0 0
1 0.06907582
2 0.17481287
2 0.88342447
0 2.02929067
0 4.64341764
1 4.67449007
2 4.8500017
1 4.96191706
2 5.1982515
1 5.7014867
1 5.79815453
2 5.80672299
0 5.88957492
1 5.96219553
3 5.96414827
2 6.0107598
2 6.04126817
2 6.0606281
1 6.0706114
1 6.08463504
3 6.0931286
2 6.15576341
2 6.2077591
3 6.2393144
4 6.296759
0 6.32461235
2 6.3774746
1 6.4106054
0 6.444469
1 6.4656179
0 6.4683181
3 6.5206047
1 6.5522195
2 6.6841894
1 6.716835
1 6.81117701
1 6.8483706
2 6.85212184
2 6.8653286
1 6.8779822
0 6.88152003
2 6.904271
3 6.9082264
1 7.02831184
3 7.0380557
3 7.0384171
4 7.0387646
2 7.0389238
3 7.0414916
3 7.0458284
2 7.0573473
2 7.06062347
1 7.077415
0 7.087977
1 7.089441
2 7.09821218
1 7.1165506
2 7.120527
4 7.13606
0 7.1502091
0 7.16988
1 7.198282
3 7.2026576
3 7.234353
1 7.2424947
3 7.2478713
4 7.2481273
3 7.2555146
2 7.2556466
2 7.2594492
1 7.2606171
5 7.262377
4 7.2628538
2 7.26384757
1 7.270709
2 7.2710609
0 7.2820277
1 7.2829607
2 7.2837795
2 7.3065751
3 7.3080546
1 7.3292938
3 7.349276
4 7.349561
3 7.3501428
2 7.3502438
0 7.3763797
1 7.3800696
3 7.3966977
2 7.4006916
1 7.4052675
1 7.462309
3 7.4661274
2 7.4725562
1 7.472991
2 7.4788032
1 7.4830196
2 7.4890627
3 7.4923536
2 7.4956464
2 7.5030659
1 7.5072379
4 7.5075365
0 7.514344
3 7.5175533
3 7.5177157
4 7.5177444
2 7.5178007
3 7.52065
0 7.5225011
1 7.5319554
0 7.5344252
1 7.545321
3 7.548932
3 7.5633719
4 7.5635761
3 7.5674784
2 7.5675782
5 7.570526
4 7.5709228
2 7.574378
1 7.574733
2 7.574864
1 7.581928
2 7.594531
3 7.596312
2 7.596398
1 7.6055839
3 7.619365
3 7.619722
4 7.619727
2 7.619772
3 7.627846
0 7.629878
2 7.630325
1 7.63076
1 7.633882
2 7.668326
2 7.677408
3 7.678346
3 7.68648
1 7.686666
0 7.692159
1 7.692591
2 7.6938078
0 7.702505
4 7.7025472
1 7.708006
3 7.714018
2 7.715892
2 7.719805
1 7.731053
3 7.73111
3 7.732992
3 7.734128
4 7.734365
0 7.73542
1 7.736482
5 7.738159
4 7.738436
3 7.741279
2 7.743416
1 7.745019
3 7.751861
2 7.752925
2 7.754661
1 7.758527
3 7.763222
3 7.765035
2 7.765777
0 7.766265
1 7.766267
1 7.767314
2 7.780215
3 7.785212
2 7.785409
3 7.786867
1 7.788052
0 7.789142
1 7.789529
2 7.799396
2 7.801836
3 7.802358
1 7.804651
3 7.804842
0 7.806567
1 7.806738
2 7.810458
0 7.815092
2 7.815206
3 7.815624
2 7.816718
3 7.818854
1 7.820069
0 7.820335
1 7.822051
3 7.825109
2 7.825539
2 7.826975
1 7.830402
0 7.831101
1 7.831529
3 7.831899
2 7.83412
2 7.836389
1 7.838037
3 7.838714
3 7.838856
5 7.839239
0 7.839837
1 7.840037
2 7.841284
1 7.842149
2 7.844171
3 7.844643
0 7.84704
1 7.847066
1 7.847373
2 7.847468
3 7.848487
2 7.848843
2 7.850616
1 7.851975
3 7.852791
2 7.852897
0 7.8529
1 7.852931
1 7.853478
2 7.855951
3 7.857417
2 7.857575
1 7.857822
0 7.857955
1 7.858121
2 7.860464
3 7.861568
2 7.861662
1 7.862012
0 7.862186
1 7.86229
2 7.86431
3 7.865179
2 7.865219
1 7.865606
0 7.865794
1 7.865876
2 7.867632
3 7.868321
2 7.868321
1 7.868714
0 7.868903
1 7.868966
2 7.870485
2 7.871028
3 7.871059
1 7.871413
0 7.871612
1 7.871658
2 7.872969
2 7.873404
3 7.873458
1 7.873769
0 7.87396
1 7.874005
2 7.875144
2 7.875505
3 7.875562
1 7.875848
0 7.876039
1 7.876052
2 7.877099
2 7.877363
3 7.87742
1 7.877678
0 7.877883
1 7.877894
2 7.87874
2 7.879005
3 7.879072
1 7.879292
0 7.879482
1 7.879498
2 7.880489
3 7.880547
1 7.880741
0 7.88093
1 7.880948
2 7.881813
3 7.881871
1 7.882035
0 7.882218
1 7.882227
2 7.883007
3 7.883059
1 7.883192
0 7.883378
1 7.883386
2 7.884088
3 7.884127
1 7.884232
0 7.884437
1 7.884453
2 7.88507
3 7.8851
1 7.885166
0 7.885381
1 7.885399
2 7.885942
1 7.886022
2 7.886149
1 7.886265
0 7.886269
2 7.886785
1 7.886789
0 7.887023
2 7.8875
0 7.887723
1 7.888129
2 7.888193
0 7.888413
0 7.88858
1 7.888713
2 7.888787
0 7.889029
1 7.889253
2 7.88939
0 7.889566
1 7.889755
2 7.889846
0 7.890077
1 7.890228
2 7.890343
0 7.89055
1 7.890668
2 7.890788
0 7.890983
1 7.891064
1 7.891469
2 7.891598
1 7.891831
2 7.891959
1 7.892168
2 7.892291
1 7.892489
2 7.892607
1 7.892796
2 7.892898
1 7.893075
2 7.893185
1 7.893342
2 7.893442
1 7.89359
2 7.893675
1 7.89382
2 7.89391
1 7.89405
2 7.894128
1 7.894255
2 7.894337
1 7.894451
2 7.894516
1 7.894628
2 7.894699
1 7.894809
2 7.894874
1 7.894971
2 7.895036
1 7.895135
2 7.895192
1 7.895281
2 7.895335
1 7.895418
2 7.895471
1 7.895565
2 7.895596
1 7.8957
2 7.89573
1 7.895813
2 7.895858
1 7.895917
2 7.895966
1 7.89602
2 7.896079
1 7.896144
2 7.896177
1 7.896231
2 7.89627
2 7.89637
2 7.896462
2 7.896546
3 7.8997
1 8.10211
+80
View File
@@ -0,0 +1,80 @@
0.5 0
1.5 0.2191243
0.5 6.3945947
1.5 6.4832505
2.5 6.6166322
0.5 7.7369893
1.5 8.0609159
2.5 8.0818774
0.5 9.7956013
1.5 9.8401911
1.5 10.0224957
2.5 10.0442819
0.5 10.649071
0.5 11.28457
1.5 11.42176
0.5 11.7517654
1.5 12.4095746
2.5 12.4146384
3.5 12.4377578
2.5 12.4378437
0.5 12.5346097
1.5 12.5527348
0.5 13.382378
1.5 13.685136
2.5 13.687562
3.5 13.700822
2.5 13.700901
3.5 13.7459362
4.5 13.7459403
0.5 13.764267
1.5 13.773597
0.5 14.213359
1.5 14.379414
2.5 14.380775
3.5 14.3872789
2.5 14.387351
4.5 14.41524
3.5 14.41524
0.5 14.427022
1.5 14.43258
0.5 14.695009
1.5 14.796164
2.5 14.796987
3.5 14.80048
2.5 14.800532
3.5 14.8188188
4.5 14.818819
0.5 14.825733
1.5 14.829473
0.5 14.999242
1.5 15.065488
2.5 15.066041
3.5 15.06808
2.5 15.068117
4.5 15.080678
3.5 15.080678
0.5 15.084273
1.5 15.087109
0.5 15.21215
1.5 15.249492
2.5 15.249862
3.5 15.251139
2.5 15.251167
4.5 15.260141
3.5 15.260141
1.5 15.262777
1.5 15.2998
2.5 15.38183
3.5 15.38183
3.5 15.388469
4.5 15.388469
2.5 15.46485
3.5 15.47834
2.5 15.47834
3.5 15.483383
4.5 15.483383
1.5 15.73642
0.5 15.75613
2.5 15.77964
1.5 15.8596
+66
View File
@@ -0,0 +1,66 @@
0.50 0
0.50 10.19880606
1.50 10.19885143
0.50 10.19881044
0.50 12.08749356
1.50 12.087507
0.50 12.08749486
1.50 12.08750698
2.50 12.08751146
0.50 12.74853234
1.50 12.74853801
0.50 12.74853289
1.50 12.748538
2.50 12.74853989
2.50 12.74853989
3.50 12.74854083
0.50 13.05449807
1.50 13.05450098
0.50 13.05449835
1.50 13.05450096
2.50 13.05450193
2.50 13.05450194
3.50 13.05450242
3.50 13.05450242
4.50 13.05450271
0.50 13.22070135
1.50 13.22070303
0.50 13.22070151
1.50 13.22070303
2.50 13.22070359
2.50 13.22070359
3.50 13.22070387
3.50 13.22070387
4.50 13.22070404
4.50 13.22070404
5.50 13.22070415
0.50 13.32091654
1.50 13.32091759
0.50 13.32091664
1.50 13.32091759
2.50 13.32091794
0.50 13.38595997
1.50 13.38596068
0.50 13.38596004
1.50 13.38596067
2.50 13.38596091
0.50 13.43055349
1.50 13.43055399
0.50 13.43055354
1.50 13.43055398
2.50 13.43055415
0.50 13.46245095
1.50 13.46245131
0.50 13.46245098
1.50 13.46245131
2.50 13.46245143
0.50 13.48605144
1.50 13.48605171
0.50 13.48605147
1.50 13.48605171
2.50 13.4860518
0.50 13.50400154
1.50 13.50400175
0.50 13.50400156
1.50 13.50400175
2.50 13.50400182

Some files were not shown because too many files have changed in this diff Show More