Practical guide and verification
A set of notes may fit more than one scale
The same pitch collection can be compatible with several scales or modes, especially when the tonic is unknown. A scale finder gives candidates; musical context determines which interpretation makes sense.
Spelling matters
Enharmonic notes such as F♯ and G♭ can sound the same in equal temperament but communicate different harmonic functions. Key context can determine the more readable spelling.
Incomplete note sets
A melody may use only part of a scale, and chromatic passing tones may introduce notes outside it. Treat a partial match as evidence, not proof.